aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorHarald Weppner <harald.weppner@tidalscale.com>2014-03-18 00:00:14 -0700
committerHarald Weppner <harald.weppner@tidalscale.com>2014-03-18 00:00:14 -0700
commit4bbf8181f384d6bd8a634b22543f83e5b949b609 (patch)
tree516c9c1c91c033b7081f60cb06da70106bfc5d1e /bin
parentbf543df20ccd9e2c422751908cabf073bc7f5d4b (diff)
downloadjemalloc-4bbf8181f384d6bd8a634b22543f83e5b949b609.tar.gz
Consistently use debug lib(s) if present
Fixes a situation where nm uses the debug lib but addr2line does not, which completely messes up the symbol lookup.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pprof8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/pprof b/bin/pprof
index 08c9ea3..a309943 100755
--- a/bin/pprof
+++ b/bin/pprof
@@ -4607,6 +4607,12 @@ sub ExtractSymbols {
my $finish = $lib->[2];
my $offset = $lib->[3];
+ # Use debug library if it exists
+ my $debug_libname = DebuggingLibrary($libname);
+ if ($debug_libname) {
+ $libname = $debug_libname;
+ }
+
# Get list of pcs that belong in this library.
my $contained = [];
my ($start_pc_index, $finish_pc_index);
@@ -5037,7 +5043,7 @@ sub GetProcedureBoundariesViaNm {
# Tag this routine with the starting address in case the image
# has multiple occurrences of this routine. We use a syntax
- # that resembles template paramters that are automatically
+ # that resembles template parameters that are automatically
# stripped out by ShortFunctionName()
$this_routine .= "<$start_val>";