aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-01-06 19:29:33 +0000
committerUlrich Drepper <drepper@redhat.com>2001-01-06 19:29:33 +0000
commite1fa173022d528b3934e94577a0c9fcfbc46eb2c (patch)
tree34592d22a9d552fac76ab30773ee0b013e2bc6ef
parentaa44a9de3dcc4bbe55f31b03313e49164b50fa84 (diff)
downloadglibc-e1fa173022d528b3934e94577a0c9fcfbc46eb2c.zip
glibc-e1fa173022d528b3934e94577a0c9fcfbc46eb2c.tar.gz
glibc-e1fa173022d528b3934e94577a0c9fcfbc46eb2c.tar.bz2
Fix matching of addresses.
-rw-r--r--malloc/mtrace.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/malloc/mtrace.pl b/malloc/mtrace.pl
index 8647a69..7fbab48 100644
--- a/malloc/mtrace.pl
+++ b/malloc/mtrace.pl
@@ -75,7 +75,7 @@ if ($#ARGV == 0) {
sub location {
my $str = pop(@_);
return $str if ($str eq "");
- if ($str =~ /[[](0x[^]]*)]:(.)*/) {
+ if ($str =~ /.*[[](0x[^]]*)]:(.)*/) {
my $addr = $1;
my $fct = $2;
return $cache{$addr} if (exists $cache{$addr});
@@ -89,7 +89,7 @@ sub location {
}
}
$cache{$addr} = $str = "$fct @ $addr";
- } elsif ($str =~ /^[[](0x[^]]*)]$/) {
+ } elsif ($str =~ /^.*[[](0x[^]]*)]$/) {
my $addr = $1;
return $cache{$addr} if (exists $cache{$addr});
if ($binary ne "" && open (ADDR, "addr2line -e $binary $addr|")) {