diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-02-23 09:20:59 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-02-23 09:20:59 +0000 |
commit | 7fec4f2f70d417b858127d340f7e8f66d8053572 (patch) | |
tree | c511d342ff5b55a1eaf970a60a1b8ff972dc6ec3 /elf/sprof.c | |
parent | 557fab43bd3cf75f87ba7efb65c9f4884e261a6c (diff) | |
download | glibc-7fec4f2f70d417b858127d340f7e8f66d8053572.tar.gz |
Update.
* elf/sprof.c (load_profdata): If do_test provide information as
to why loading failed.
* elf/dl-profile.c (_dl_start_profile): Initialize all of
hist_hdr.dimen.
Diffstat (limited to 'elf/sprof.c')
-rw-r--r-- | elf/sprof.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/elf/sprof.c b/elf/sprof.c index 7d7fd9f978..3424282044 100644 --- a/elf/sprof.c +++ b/elf/sprof.c @@ -752,9 +752,21 @@ load_profdata (const char *name, struct shobj *shobj) sizeof (struct gmon_hist_hdr)) != 0 || narcsp[-1] != GMON_TAG_CG_ARC) { - free (result); error (0, 0, _("`%s' is no correct profile data file for `%s'"), name, shobj->name); + if (do_test) + { + if (memcmp (addr, &gmon_hdr, sizeof (struct gmon_hdr)) != 0) + puts ("gmon_hdr differs"); + if (*(uint32_t *) result->hist != GMON_TAG_TIME_HIST) + puts ("result->hist differs"); + if (memcmp (result->hist_hdr, &hist_hdr, + sizeof (struct gmon_hist_hdr)) != 0) + puts ("hist_hdr differs"); + if (narcsp[-1] != GMON_TAG_CG_ARC) + puts ("narcsp[-1] differs"); + } + free (result); munmap (addr, st.st_size); return NULL; } |