Changeset 518793d for memlog2dot


Ignore:
Timestamp:
05/30/15 15:56:39 (10 years ago)
Author:
Hal Finkel <hfinkel@…>
Branches:
master
Children:
a7b97b9, 09f3093
Parents:
24aa734
git-author:
Hal Finkel <hfinkel@…> (05/30/15 15:56:39)
git-committer:
Hal Finkel <hfinkel@…> (05/30/15 15:56:39)
Message:

when file_name is not absolute, fix that

File:
1 edited

Legend:

Unmodified
Added
Removed
  • memlog2dot

    r20b45de r518793d  
    199199 
    200200  my $file_name = $node->{'file_name'}; 
    201   my ($func, $loc) = `addr2line -e $file_name -f 0x$exe_off`; 
     201 
     202  # If we don't have an absolute path, this is probably the base dynamic 
     203  # executable, so ask the shell which one it used (not foolproof because we 
     204  # might not have the same PATH now, but hopefully is generally the right 
     205  # thing). 
     206  if ($file_name !~ /^\//) { 
     207    $file_name = `which '$file_name'`; 
     208    chomp($file_name); 
     209  } 
     210 
     211  my ($func, $loc) = `addr2line -e '$file_name' -f 0x$exe_off`; 
    202212  chomp($func); 
    203213  chomp($loc); 
Note: See TracChangeset for help on using the changeset viewer.