summaryrefslogtreecommitdiff
path: root/hurd/debugging
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/debugging')
-rw-r--r--hurd/debugging/glibc.mdwn24
-rw-r--r--hurd/debugging/translator/capturing_stdout_and_stderr.mdwn2
2 files changed, 19 insertions, 7 deletions
diff --git a/hurd/debugging/glibc.mdwn b/hurd/debugging/glibc.mdwn
index 10a41503..1b7e6ab1 100644
--- a/hurd/debugging/glibc.mdwn
+++ b/hurd/debugging/glibc.mdwn
@@ -44,24 +44,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
@@ -75,6 +77,16 @@ If your `mach_traps.h` does not have the declaration, use:
extern void mach_print(const char *s);
+If you can't use the libc-provided `mach_print` for some reason, you can use as last resort:
+
+ asm("\
+ my_mach_print:\n\
+ mov $-30,%eax\n\
+ lcall $7,$0\n\
+ ret\n\
+ ");
+ extern void my_mach_print(const char *s);
+
This call does not support any formatting. You can use this kind of helper to
format a message before passing to gnumach:
diff --git a/hurd/debugging/translator/capturing_stdout_and_stderr.mdwn b/hurd/debugging/translator/capturing_stdout_and_stderr.mdwn
index 47fbbc48..c1abc7f9 100644
--- a/hurd/debugging/translator/capturing_stdout_and_stderr.mdwn
+++ b/hurd/debugging/translator/capturing_stdout_and_stderr.mdwn
@@ -16,7 +16,7 @@ silently dying all the time, without any console output:
$ sudo settrans -fgap ↩
/servers/socket/2 ↩
/bin/sh -c 'exec >> /root/pfinet.log 2>&1 && date && ↩
- /hurd/pfinet -i eth0 -a [...]'
+ /hurd/pfinet -i /dev/eth0 -a [...]'
$ [...]
$ cat /root/pfinet.log
[date]