diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-06-15 20:14:44 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-06-15 20:14:44 +0000 |
commit | f5d08871d3ecec7a6daf3ec0dabcdf440b614e02 (patch) | |
tree | 4f837821303376f538e0c5b3322b36ae9bbc1520 /ldso/ldso/ld_hash.h | |
parent | 5792927ed57ac3f6c655c25a4cd9d1f3f1ff5549 (diff) |
Make some nice SEND_ADDRESS_STDERR and SEND_NUMBER_STDERR macros that
operate inline, to help when debugging ldso (i.e. before we can do
things like function calls).
-Erik
Diffstat (limited to 'ldso/ldso/ld_hash.h')
-rw-r--r-- | ldso/ldso/ld_hash.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ldso/ldso/ld_hash.h b/ldso/ldso/ld_hash.h index cc1c56c42..c7fee6c97 100644 --- a/ldso/ldso/ld_hash.h +++ b/ldso/ldso/ld_hash.h @@ -82,6 +82,24 @@ extern int _dl_linux_dynamic_link(void); #else #define SEND_STDERR(X) _dl_write(2, X, _dl_strlen_inline(X)); #endif + +#define SEND_ADDRESS_STDERR(X, add_a_newline) { \ + char tmp[13]; \ + _dl_write(2, _dl_simple_ltoahex_inline( tmp, (unsigned long)(X)), 12); \ + if (add_a_newline) { \ + tmp[0]='\n'; \ + _dl_write(2, tmp, 1); \ + } \ +}; + +#define SEND_NUMBER_STDERR(X, add_a_newline) { \ + char tmp[13]; \ + _dl_write(2, (void *)_dl_simple_ltoahex_inline( tmp, (unsigned long)(X)), 12); \ + if (add_a_newline) { \ + tmp[0]='\n'; \ + _dl_write(2, tmp, 1); \ + } \ +}; extern int _dl_fdprintf(int, const char *, ...); extern char * _dl_library_path; extern char * _dl_not_lazy; |