summaryrefslogtreecommitdiff
path: root/hurd/debugging
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/debugging')
-rw-r--r--hurd/debugging/glibc.mdwn4
-rw-r--r--hurd/debugging/subhurd.mdwn6
-rw-r--r--hurd/debugging/translator/gdb.mdwn10
3 files changed, 16 insertions, 4 deletions
diff --git a/hurd/debugging/glibc.mdwn b/hurd/debugging/glibc.mdwn
index 1b7e6ab1..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
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.