6 my $executable = $ARGV[0];
9 my %functionNames = ();
21 my $line = $lines{$addr};
22 if (!defined($line)) {
23 $line = `addr2line -f -e $executable $addr`;
26 $lines{$addr} = $line;
31 while (<STDIN
> =~ /(\w)\t([^\t]+)\t([^t]*)\t(\S+)/) {
32 my ($action, $calledaddr, $calleraddr, $time) = ($1, $2, $3, $4);
34 my $called = getline
($calledaddr);
35 my $caller = getline
($calleraddr);
37 if ($called =~ /^\(null\) (.*)/) {
38 if (defined $functionNames{$1}) {
39 $called = "$functionNames{$1} $1";
44 elsif ($called =~ /^(\S+) (.*)/) {
45 $functionNames{$2} = $1;
48 print "$action\t$called\t$caller\t$time\n";