Kaydet (Commit) 66add63d authored tarafından Damjan Jovanovic's avatar Damjan Jovanovic Kaydeden (comit) Caolán McNamara

Use %p to print pointers in sal backtraces..

instead of 0x%x + conversion to integer.

Patch by: me

(cherry picked from commit 25f18514)

Change-Id: I49197aed7bc2dc92a4b54d9aa6a7dce95ebadcfb
üst 5c19ef21
...@@ -120,7 +120,7 @@ void backtrace_symbols_fd( void **buffer, int size, int fd ) ...@@ -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, "(%s+0x%x)", dli.dli_sname, offset );
} }
} }
fprintf( fp, "[0x%x]\n", *pFramePtr ); fprintf( fp, "[%p]\n", *pFramePtr );
} }
fflush( fp ); fflush( fp );
...@@ -187,7 +187,7 @@ void backtrace_symbols_fd( void **buffer, int size, int fd ) ...@@ -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, "(%s+0x%" SAL_PRI_PTRDIFFT "x)", dli.dli_sname, offset );
} }
} }
fprintf( fp, "[0x%p]\n", *pFramePtr ); fprintf( fp, "[%p]\n", *pFramePtr );
} }
fflush( fp ); fflush( fp );
fclose( fp ); fclose( fp );
...@@ -257,7 +257,7 @@ void backtrace_symbols_fd( void **buffer, int size, int fd ) ...@@ -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, "(%s+0x%tx)", dli.dli_sname, offset );
} }
} }
fprintf( fp, "[0x%x]\n", (unsigned int)*pFramePtr ); fprintf( fp, "[%p]\n", *pFramePtr );
} }
fflush( fp ); fflush( fp );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment