From: Jakub Jelinek Date: Tue, 16 Dec 2014 11:35:34 +0000 (+0100) Subject: sanitizer_symbolizer_libbacktrace.cc, [...]: Cherry pick upstream r224308. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f2798565b4f2551ec0a2bc7e95c7f2a7a23db7d3;p=gcc.git sanitizer_symbolizer_libbacktrace.cc, [...]: Cherry pick upstream r224308. * sanitizer_common/sanitizer_symbolizer_libbacktrace.cc, sanitizer_common/sanitizer_symbolizer_libbacktrace.h, sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc: Cherry pick upstream r224308. From-SVN: r218778 --- diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog index e5f389bb439..8b2eb82bbde 100644 --- a/libsanitizer/ChangeLog +++ b/libsanitizer/ChangeLog @@ -1,3 +1,10 @@ +2014-12-16 Jakub Jelinek + + * sanitizer_common/sanitizer_symbolizer_libbacktrace.cc, + sanitizer_common/sanitizer_symbolizer_libbacktrace.h, + sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc: Cherry pick + upstream r224308. + 2014-11-21 H.J. Lu PR bootstrap/63784 diff --git a/libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc b/libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc index 905079475b8..8bae57bfe66 100644 --- a/libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc +++ b/libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc @@ -165,9 +165,9 @@ uptr LibbacktraceSymbolizer::SymbolizeCode(uptr addr, AddressInfo *frames, return data.n_frames; } -bool LibbacktraceSymbolizer::SymbolizeData(DataInfo *info) { - backtrace_syminfo((backtrace_state *)state_, info->start, - SymbolizeDataCallback, ErrorCallback, info); +bool LibbacktraceSymbolizer::SymbolizeData(uptr addr, DataInfo *info) { + backtrace_syminfo((backtrace_state *)state_, addr, SymbolizeDataCallback, + ErrorCallback, info); return true; } @@ -185,7 +185,7 @@ uptr LibbacktraceSymbolizer::SymbolizeCode(uptr addr, AddressInfo *frames, return 0; } -bool LibbacktraceSymbolizer::SymbolizeData(DataInfo *info) { +bool LibbacktraceSymbolizer::SymbolizeData(uptr addr, DataInfo *info) { return false; } diff --git a/libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.h b/libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.h index c7a83bfca92..aa75a7907df 100644 --- a/libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.h +++ b/libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.h @@ -33,7 +33,7 @@ class LibbacktraceSymbolizer { uptr SymbolizeCode(uptr addr, AddressInfo *frames, uptr max_frames, const char *module_name, uptr module_offset); - bool SymbolizeData(DataInfo *info); + bool SymbolizeData(uptr addr, DataInfo *info); // May return NULL if demangling failed. static char *Demangle(const char *name, bool always_alloc = false); diff --git a/libsanitizer/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc index ccd2d70f0f0..5cc21d3f2bf 100644 --- a/libsanitizer/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc +++ b/libsanitizer/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc @@ -593,7 +593,7 @@ class POSIXSymbolizer : public Symbolizer { // First, try to use libbacktrace symbolizer (if it's available). if (libbacktrace_symbolizer_ != 0) { mu_.CheckLocked(); - if (libbacktrace_symbolizer_->SymbolizeData(info)) + if (libbacktrace_symbolizer_->SymbolizeData(addr, info)) return true; } const char *str = SendCommand(true, module_name, module_offset);