summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2007-03-09 10:58:00 +0000
committerThomas Schwinge <tschwinge@gnu.org>2007-03-09 10:58:00 +0000
commit2bab80f6bd2c3cf3ebf676adee45dce8058a61ae (patch)
tree9bf432fd78641e782d62258596686a213a92256d
parentb65c6f9ead713bcd44d5dc517052803b78937451 (diff)
none
-rw-r--r--Hurd/DebuggingViaSubhurds.mdwn85
1 files changed, 85 insertions, 0 deletions
diff --git a/Hurd/DebuggingViaSubhurds.mdwn b/Hurd/DebuggingViaSubhurds.mdwn
new file mode 100644
index 00000000..20855da6
--- /dev/null
+++ b/Hurd/DebuggingViaSubhurds.mdwn
@@ -0,0 +1,85 @@
+## <a name="General_Information"> General Information </a>
+
+See the [[SubhurdHowto]] for general information about subhurds.
+
+----
+
+## <a name="Debugging_the_Hurd_Startup_Proce"> Debugging the Hurd Startup Process </a>
+
+_one.full_ is the subhurd's root file system image and has been installed as follows: [TODO]
+
+_Wx_ translates to terminal window _x_.
+
+W1
+
+ $ fsysopts one.full/ --readonly
+ $ sudo boot -I -d -s -D one.full/ one.full/boot/script.boot one.full.ext2
+ Pausing. . .
+
+(In theory it shouldn't be neccessary to run the subhurd as user _root_, but in practice [that doesn't work at the moment](http://savannah.gnu.org/bugs/?17341).)
+
+W2
+
+ $ ps -Af
+ [...]
+ root 851 385 p4 0:00.01 boot -I -d -s -D one.full/ one.full/boot/script.boot one.full.ext2
+ - 853 1 ? 0:00.00 ?
+ - 854 1 ? 0:00.00 ?
+ [...]
+ $ sudo gdb /var/tmp/one.full/hurd/ext2fs.static
+ [...]
+ (gdb) attach 853
+ Attaching to program `/var/tmp/one.full/hurd/ext2fs.static', pid 853
+ warning: Can't modify tracing state for pid 853: No signal thread
+ Can't fetch registers from thread 1: No such thread
+
+(The _boot_ program [could be modified to print out the pids](http://savannah.gnu.org/bugs/?19254), so that one wouldn't have to fumble with _ps_.)
+
+W3
+
+ $ sudo gdb /var/tmp/one.full/hurd/exec
+ [...]
+ (gdb) set solib-absolute-prefix /var/tmp/one.full
+ (gdb) attach 854
+ Attaching to program `/var/tmp/one.full/hurd/exec', pid 854
+ warning: Can't modify tracing state for pid 854: No signal thread
+ Can't fetch registers from thread 1: No such thread
+
+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
+
+W2
+
+ (gdb) continue
+ Continuing.
+ warning: Can't wait for pid 853: No child processes
+
+W1
+
+ Hurd server bootstrap: ext2fs.static[pseudo-root] exec
+
+W3
+
+ (gdb) continue
+ Continuing.
+ warning: Can't wait for pid 854: No child processes
+
+ Program received signal EXC_BAD_ACCESS, Could not access memory.
+ 0x000168f2 in ?? ()
+ (gdb) bt
+ #0 0x000168f2 in ?? ()
+ Cannot access memory at address 0xbeffffe4
+ (gdb) info threads
+ * 1 thread 1005.1 0x000168f2 in ?? ()
+ (gdb) disassemble
+ No function contains program counter for selected frame.
+
+----
+
+Sources:
+
+* <http://www.gnu.org/software/hurd/howto/subhurd.html>
+* <http://lists.gnu.org/archive/html/bug-hurd/2007-02/msg00030.html>