summaryrefslogtreecommitdiff
path: root/hurd/debugging/glibc.mdwn
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/debugging/glibc.mdwn')
-rw-r--r--hurd/debugging/glibc.mdwn24
1 files changed, 18 insertions, 6 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: