Last active
March 11, 2019 14:11
-
-
Save meritozh/99653b38db67d16e5d0dbb4c8987ba08 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CallLogDrawer_LogIter.pm b/CallLogDrawer_LogIter.pm | |
index 5af3272..2de1d3d 100644 | |
--- a/CallLogDrawer_LogIter.pm | |
+++ b/CallLogDrawer_LogIter.pm | |
@@ -19,7 +19,7 @@ sub new { | |
open($fh, "<", $infpath) or die "Failed to open $infpath: $!"; | |
} | |
my ($ana_in, $ana_out); | |
- my $pid = open2($ana_out, $ana_in, "LANG=c addr2line -fps -e $bin"); | |
+ my $pid = open2($ana_in, $ana_out, "LANG=c atos -o $bin"); | |
my $iter = { in => $fh, bin => $bin, pid => $pid, ana_out => $ana_out, ana_in => $ana_in }; | |
bless $iter, $class; | |
$iter | |
@@ -27,11 +27,12 @@ sub new { | |
sub funcinfo_from_addr { | |
my ($iter, $ptr) = @_; | |
- my ($chld_out, $chld_in) = ($iter->{ana_out}, $iter->{ana_in}); | |
+ my ($chld_in, $chld_out) = ($iter->{ana_out}, $iter->{ana_in}); | |
print $chld_in sprintf("0x%x\n", $ptr); | |
my $res = <$chld_out>; | |
+ print STDERR "res=$res"; | |
chomp $res; | |
- if ($res =~ /\s*([_A-Za-z][_A-Za-z0-9]*)\s*at\s*([^:]+?):([0-9]+)/) { | |
+ if ($res =~ /([_a-zA-Z][_a-zA-Z0-9]*)\s+\(.+?\)\s+\((.+):([0-9]+)\)/) { | |
return { func => $1, srcfile => $2, lineno => $3, site => $ptr }; | |
} else { | |
return { func => '#', srcfile => '#', lineno => '#', site => $ptr }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment