about summary refs log tree commit diff
path: root/malloc/mtrace.pl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-07-27 08:29:06 +0000
committerUlrich Drepper <drepper@redhat.com>2001-07-27 08:29:06 +0000
commit129d706d77587e4d6627cc1ebef9be0f7cbc65f0 (patch)
tree219bd622277bf2262d16cd4fd0400bd1ef7aea7e /malloc/mtrace.pl
parent6a904bbfc610f98ee2f467844434117a7bca5982 (diff)
downloadglibc-129d706d77587e4d6627cc1ebef9be0f7cbc65f0.tar.gz
glibc-129d706d77587e4d6627cc1ebef9be0f7cbc65f0.tar.xz
glibc-129d706d77587e4d6627cc1ebef9be0f7cbc65f0.zip
Update.
	* libio/fileops.c (_IO_new_file_fopen): Correctly locate ccs=
	substring.  Don't handle ccs= if no descriptor was allocated.
	Normalize codeset name before calling __wcsmbs_named_conv.
	Initialize transliteration elements.  Free step data structure.
	* libio/iofclose.c (_IO_new_fclose): Correct freeing of the step data.
	* libio/iofwide.c (__libio_translit): Renamed from libio_translit
	and made public.  Various little cleanup changes.
	* wcsmbs/wcsmbsload.h (struct gconv_fcts): Add towc_nsteps and
	tomb_nsteps member.
	* wcsmbs/wcsmbsload.c: Add some casts to avoid warnings.
	(__wcsmbs_gconv_fcts): Initialize towc_nsteps and tomb_nsteps member.
	(getfct): Take additional parameter with pointer to variable where the
	number of steps is stored in.  Disable code which allows to use more
	than one step for now.  Adjust all callers.
	(free_mem): New function.  Frees data associated with currently
	selected converters.
Diffstat (limited to 'malloc/mtrace.pl')
-rw-r--r--malloc/mtrace.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/malloc/mtrace.pl b/malloc/mtrace.pl
index e3ed5771dd..7e06c99f29 100644
--- a/malloc/mtrace.pl
+++ b/malloc/mtrace.pl
@@ -125,6 +125,19 @@ sub location {
 	    }
 	}
 	$cache{$addr} = $str = $addr;
+    } elsif ($str =~ /^.*[[](0x[^]]*)]$/) {
+	my $addr = $1;
+	return $cache{$addr} if (exists $cache{$addr});
+	if ($binary ne "" && open (ADDR, "addr2line -e $binary $addr|")) {
+	    my $line = <ADDR>;
+	    chomp $line;
+	    close (ADDR);
+	    if ($line ne '??:0') {
+		$cache{$addr} = $line;
+		return $cache{$addr};
+	    }
+	}
+	$cache{$addr} = $str = $addr;
     }
     return $str;
 }