summaryrefslogtreecommitdiff
path: root/tests/memanalyze.pl
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-06-30 14:07:52 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-06-30 14:07:52 +0000
commit27926030f94d28e3f8f97b1aa0709cc1b218ad0b (patch)
tree02c5c8d65368d92ff91cad5677caa4e3dec086b9 /tests/memanalyze.pl
parent701de67b7930a4e4953dd82095c141beda917b48 (diff)
downloadcurl-27926030f94d28e3f8f97b1aa0709cc1b218ad0b.tar.gz
add more info when this script gets confused, and added getaddrinfo and
freeaddrinfo to the trace output
Diffstat (limited to 'tests/memanalyze.pl')
-rwxr-xr-xtests/memanalyze.pl16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/memanalyze.pl b/tests/memanalyze.pl
index 169c0fe2a..b8f17b550 100755
--- a/tests/memanalyze.pl
+++ b/tests/memanalyze.pl
@@ -67,11 +67,11 @@ if($showlimit) {
}
-
+my $lnum=0;
while(<FILE>) {
chomp $_;
$line = $_;
-
+ $lnum++;
if($line =~ /^LIMIT ([^ ]*):(\d*) (.*)/) {
# new memory limit test prefix
my $i = $3;
@@ -116,7 +116,8 @@ while(<FILE>) {
if($sizeataddr{$addr}>0) {
# this means weeeeeirdo
- print "Mixed debug compile, rebuild curl now\n";
+ print "Mixed debug compile ($source:$linenum at line $lnum), rebuild curl now\n";
+ print "We think $sizeataddr{$addr} bytes are already allocated at that memory address: $addr!\n";
}
$sizeataddr{$addr}=$size;
@@ -281,6 +282,9 @@ while(<FILE>) {
$addrinfofile{$add}="$source:$linenum";
$addrinfos++;
}
+ if($trace) {
+ printf("GETADDRINFO ($source:$linenum)\n");
+ }
}
# fclose(0x1026c8)
elsif($function =~ /freeaddrinfo\(0x([0-9a-f]*)\)/) {
@@ -291,9 +295,11 @@ while(<FILE>) {
$addrinfo{$1}=0;
$addrinfos--;
}
+ if($trace) {
+ printf("FREEADDRINFO ($source:$linenum)\n");
+ }
}
-
-
+
}
else {
print "Not recognized prefix line: $line\n";