[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sal/osl
Pedro Giffuni
pfg at apache.org
Wed Nov 25 16:08:18 PST 2015
sal/osl/unx/backtrace.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 24e9542bcfaec3b49e5e825bf36d4bf524d69080
Author: Pedro Giffuni <pfg at apache.org>
Date: Wed Nov 25 22:08:04 2015 +0000
i66807 - Fix GCC warning in backtrace.c
The Bugzilla issue has another fix for sparc but I have no way ot test it.
diff --git a/sal/osl/unx/backtrace.c b/sal/osl/unx/backtrace.c
index 6d0836e..2e57fb6 100644
--- a/sal/osl/unx/backtrace.c
+++ b/sal/osl/unx/backtrace.c
@@ -184,15 +184,23 @@ void backtrace_symbols_fd( void **buffer, int size, int fd )
if ( dli.dli_fname && dli.dli_fbase )
{
offset = (ptrdiff_t)*pFramePtr - (ptrdiff_t)dli.dli_fbase;
+#if defined X86_64
+ fprintf( fp, "%s+0x%lx", dli.dli_fname, offset );
+#else
fprintf( fp, "%s+0x%x", dli.dli_fname, offset );
+#endif
}
if ( dli.dli_sname && dli.dli_saddr )
{
offset = (ptrdiff_t)*pFramePtr - (ptrdiff_t)dli.dli_saddr;
+#if defined X86_64
+ fprintf( fp, "(%s+0x%lx)", dli.dli_sname, offset );
+#else
fprintf( fp, "(%s+0x%x)", dli.dli_sname, offset );
+#endif
}
}
- fprintf( fp, "[0x%x]\n", *pFramePtr );
+ fprintf( fp, "[0x%p]\n", *pFramePtr );
}
fflush( fp );
fclose( fp );
More information about the Libreoffice-commits
mailing list