diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-05-29 12:49:38 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-05-29 12:49:38 +0200 |
commit | c63f1d2151b551faeb437839a7e7903dde503dcd (patch) | |
tree | b5440ff8fa2bf8bd2acf3b28dd6ac3d4e188db3e /hurd | |
parent | 4f8a486f7b44c6ed44e262a35129d141cc2686f9 (diff) |
Add static assembly version of mach_print, in case it may be useful
Diffstat (limited to 'hurd')
-rw-r--r-- | hurd/debugging/glibc.mdwn | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hurd/debugging/glibc.mdwn b/hurd/debugging/glibc.mdwn index 10a41503..a409f392 100644 --- a/hurd/debugging/glibc.mdwn +++ b/hurd/debugging/glibc.mdwn @@ -75,6 +75,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: |