summaryrefslogtreecommitdiff
path: root/hurd/debugging
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/debugging')
-rw-r--r--hurd/debugging/glibc.mdwn18
-rw-r--r--hurd/debugging/rpctrace.mdwn1
-rw-r--r--hurd/debugging/subhurd.mdwn6
-rw-r--r--hurd/debugging/translator/gdb.mdwn10
4 files changed, 25 insertions, 10 deletions
diff --git a/hurd/debugging/glibc.mdwn b/hurd/debugging/glibc.mdwn
index a409f392..a5515e29 100644
--- a/hurd/debugging/glibc.mdwn
+++ b/hurd/debugging/glibc.mdwn
@@ -23,9 +23,11 @@ newly created libraries and loader actually work: they'll be used to run the
`rpcgen` program. If that step doesn't succeed, it'll look similar to this:
[...]
- CPP='gcc -E -x c-header' [...]/build/elf/ld.so.1 --library-path [...] [...]/build/sunrpc/rpcgen [...]
+ CPP='gcc -E -x c-header' [...]/build/elf/ld-x86-64.so.1 --library-path [...] [...]/build/sunrpc/rpcgen [...]
Segmentation fault
+Note: use `ld.so.1` instead of `ld-x86-64.so.1` on 32b systems.
+
---
Unless cross-compiling, the next thing you'll probably want to do
@@ -44,24 +46,26 @@ testsuite, use:
To save even more build, stop the build after configure has run, and then you
can restart the build of only libc.so and libc.a with:
- cd build-tree/hurd-i386-libc
- make lib
+ make -C build-tree/hurd-i386-libc lib
or of only libc.so with:
- make objdir=$PWD/build-tree/hurd-i386-libc $PWD/build-tree/hurd-i386-libc/libc.so
+ make -C build-tree/hurd-i386-libc objdir=$PWD/build-tree/hurd-i386-libc $PWD/build-tree/hurd-i386-libc/libc.so
or of the whole tree with:
- cd build-tree/hurd-i386-libc
- make
+ make -C build-tree/hurd-i386-libc
or of just one subdir with for instance:
- make subdir=libpthread -C libpthread ..=../ objdir=$PWD/build-tree/hurd-i386-libc
+ make -C htl subdir=htl ..=../ objdir=$PWD/build-tree/hurd-i386-libc
(note that most subdirs need libc.so built)
+Similarly, you can run the testsuite of a single directory the same way:
+
+ make check -C htl subdir=htl ..=../ objdir=$PWD/build-tree/hurd-i386-libc
+
---
In some cases, printing to stdout/stderr is problematic. One can use a kernel
diff --git a/hurd/debugging/rpctrace.mdwn b/hurd/debugging/rpctrace.mdwn
index 0c19da02..be937939 100644
--- a/hurd/debugging/rpctrace.mdwn
+++ b/hurd/debugging/rpctrace.mdwn
@@ -15,6 +15,7 @@ doing.
See `rpctrace --help` about how to use it.
+ $ rpctrace cat /dev/null
# IRC, freenode, #hurd, 2013-07-29
diff --git a/hurd/debugging/subhurd.mdwn b/hurd/debugging/subhurd.mdwn
index 7b5b07b1..34b3e097 100644
--- a/hurd/debugging/subhurd.mdwn
+++ b/hurd/debugging/subhurd.mdwn
@@ -42,11 +42,11 @@ with _ps_.)
W3
- $ sudo gdb /var/tmp/one.full/lib/ld.so.1
+ $ sudo gdb /var/tmp/one.full/lib/ld-x86-64.so.1
[...]
(gdb) set solib-absolute-prefix /var/tmp/one.full
(gdb) attach 854
- Attaching to program `/var/tmp/one.full/lib/ld.so.1', pid 854
+ Attaching to program `/var/tmp/one.full/lib/ld-x86-64.so.1', pid 854
warning: Can't modify tracing state for pid 854: No signal thread
Can't fetch registers from thread 1: No such thread
@@ -54,7 +54,7 @@ W1
[<Enter>.]
/hurd/ext2fs.static --bootflags=-dsf --host-priv-port=38 --device-master-port=43 --exec-server-task=47 -Tdevice pseudo-root
- /lib/ld.so.1 /hurd/exec
+ /hurd/exec.static
Now that this step has been accomplished, you can set break points in GDB, etc.
diff --git a/hurd/debugging/translator/gdb.mdwn b/hurd/debugging/translator/gdb.mdwn
index 82a50736..fdf6adff 100644
--- a/hurd/debugging/translator/gdb.mdwn
+++ b/hurd/debugging/translator/gdb.mdwn
@@ -12,6 +12,8 @@ Say you want to try running file system server ([[`ext2fs`|translator/ext2fs]],
[[`jfs`|translator/jfs]], ...) against a modified version of
[[`libpager`|libpager]] and debug the latter one using [[debugging/GDB]].
+On Debian you need the `hurd-dbgsym` and `libc0.3-dbg` packages installed.
+
Set the [[hurd/translator]] like this:
$ settrans -fgap ↩
@@ -51,3 +53,11 @@ course):
[...]
Voilà.
+
+If you need to debug the initialization of the translator, start the translator
+like
+
+ $ settrans -Pa /foo /hurd/foofs
+
+The `-P` option will make it
+pause and you will be able to attach [[debugging/GDB]] to the process.