diff options
author | Damjan Jovanovic <damjan@apache.org> | 2015-12-13 23:35:09 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-15 13:52:22 +0000 |
commit | 66add63dda22321476653d06a61bc61090fafc58 (patch) | |
tree | e8f832fc2727c1e09c103c406cc82e0603515a37 /sal | |
parent | 5c19ef214f0f96bc304f3b45168143021b782d3d (diff) |
Use %p to print pointers in sal backtraces..
instead of 0x%x + conversion to integer.
Patch by: me
(cherry picked from commit 25f185144085ebe06405a5d8f19a11544ed7f794)
Change-Id: I49197aed7bc2dc92a4b54d9aa6a7dce95ebadcfb
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/backtrace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sal/osl/unx/backtrace.c b/sal/osl/unx/backtrace.c index a8177e64a937..a03ab7d1090f 100644 --- a/sal/osl/unx/backtrace.c +++ b/sal/osl/unx/backtrace.c @@ -120,7 +120,7 @@ void backtrace_symbols_fd( void **buffer, int size, int fd ) fprintf( fp, "(%s+0x%x)", dli.dli_sname, offset ); } } - fprintf( fp, "[0x%x]\n", *pFramePtr ); + fprintf( fp, "[%p]\n", *pFramePtr ); } fflush( fp ); @@ -187,7 +187,7 @@ void backtrace_symbols_fd( void **buffer, int size, int fd ) fprintf( fp, "(%s+0x%" SAL_PRI_PTRDIFFT "x)", dli.dli_sname, offset ); } } - fprintf( fp, "[0x%p]\n", *pFramePtr ); + fprintf( fp, "[%p]\n", *pFramePtr ); } fflush( fp ); fclose( fp ); @@ -257,7 +257,7 @@ void backtrace_symbols_fd( void **buffer, int size, int fd ) fprintf( fp, "(%s+0x%tx)", dli.dli_sname, offset ); } } - fprintf( fp, "[0x%x]\n", (unsigned int)*pFramePtr ); + fprintf( fp, "[%p]\n", *pFramePtr ); } fflush( fp ); |