summaryrefslogtreecommitdiff
path: root/malloc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-09-01 17:19:00 +0000
committerUlrich Drepper <drepper@redhat.com>1998-09-01 17:19:00 +0000
commita8a1269d8814fe54d5d25619ca138849bca29b78 (patch)
treee0b08b062f4003cdb7912c771517fb6a3df0fb91 /malloc
parent052b6a6c94cc330dfbc09ff7b5f03c943deb7ca2 (diff)
Update.
1998-09-01 15:36 Ulrich Drepper <drepper@cygnus.com> * malloc/Makefile: Include Makeconfig before testing config-sysdirs. * malloc/mtrace.c: Add bug report address. Update email address. Add more @XXX@ to print correct address size. * elf/dl-addr.c (_dl_addr): Make sure that map to be examined is really initialized. * elf/dl-close.c (_dl_close): Use l_map_start and l_map_end info for munmap call instead of examining phdr again. Free all malloc()ed strings and arrays.
Diffstat (limited to 'malloc')
-rw-r--r--malloc/Makefile2
-rw-r--r--malloc/mtrace.pl14
2 files changed, 10 insertions, 6 deletions
diff --git a/malloc/Makefile b/malloc/Makefile
index 89a49a29a9..521037a51a 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -44,6 +44,8 @@ extra-objs = mcheck-init.o libmcheck.a
# Include the cleanup handler.
aux := set-freeres
+include ../Makeconfig
+
# The AWK script to analyze the output of the mtrace functions.
ifneq ($(PERL),no)
install-bin = mtrace
diff --git a/malloc/mtrace.pl b/malloc/mtrace.pl
index f889294c1d..e2032d4c0a 100644
--- a/malloc/mtrace.pl
+++ b/malloc/mtrace.pl
@@ -29,6 +29,8 @@ sub usage {
print "Usage: mtrace [OPTION]... [Binary] MtraceData\n";
print " --help print this help, then exit\n";
print " --version print version number, then exit\n";
+ print "\n";
+ print "Report bugs using the `glibcbug' script to <bugs@gnu.org>.\n";
exit 0;
}
@@ -42,10 +44,10 @@ arglist: while (@ARGV) {
$ARGV[0] eq "--vers" || $ARGV[0] eq "--versi" ||
$ARGV[0] eq "--versio" || $ARGV[0] eq "--version") {
print "mtrace (GNU $PACKAGE) $VERSION\n";
- print "Copyright (C) 1997 Free Software Foundation, Inc.\n";
+ print "Copyright (C) 1997, 1998 Free Software Foundation, Inc.\n";
print "This is free software; see the source for copying conditions. There is NO\n";
print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
- print "Written by Ulrich Drepper <drepper\@gnu.ai.mit.edu>\n";
+ print "Written by Ulrich Drepper <drepper\@gnu.org>\n";
exit 0;
} elsif ($ARGV[0] eq "--h" || $ARGV[0] eq "--he" || $ARGV[0] eq "--hel" ||
@@ -125,7 +127,7 @@ while (<DATA>) {
SWITCH: {
if ($cols[$n] eq "+") {
if (defined $allocated{$allocaddr}) {
- printf ("+ %#010x Alloc %d duplicate: %s %s\n",
+ printf ("+ %#0@XXX@x Alloc %d duplicate: %s %s\n",
hex($allocaddr), $nr, $wherewas{$allocaddr}, $where);
} else {
$allocated{$allocaddr}=$howmuch;
@@ -138,7 +140,7 @@ while (<DATA>) {
undef $allocated{$allocaddr};
undef $wherewas{$allocaddr};
} else {
- printf ("- %#010x Free %d was never alloc'd %s\n",
+ printf ("- %#0@XXX@x Free %d was never alloc'd %s\n",
hex($allocaddr), $nr, &location($where));
}
last SWITCH;
@@ -148,14 +150,14 @@ while (<DATA>) {
undef $allocated{$allocaddr};
undef $wherewas{$allocaddr};
} else {
- printf ("- %#010x Realloc %d was never alloc'd %s\n",
+ printf ("- %#0@XXX@x Realloc %d was never alloc'd %s\n",
hex($allocaddr), $nr, &location($where));
}
last SWITCH;
}
if ($cols[$n] eq ">") {
if (defined $allocated{$allocaddr}) {
- printf ("+ %#010x Realloc %d duplicate: %#010x %s %s\n",
+ printf ("+ %#0@XXX@x Realloc %d duplicate: %#010x %s %s\n",
hex($allocaddr), $nr, $allocated{$allocaddr},
$wherewas{$allocaddr}, &location($where));
} else {