diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-03-21 22:07:14 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-03-21 22:07:14 +0000 |
commit | 0f579087abbd52ef11e1c0dc0236e0393ccfaba0 (patch) | |
tree | 4219135568b5e7b910d0e79702c9cad8924380e6 /gprof/gmon_io.c | |
parent | 9e4ebb1b3a69d506af5f46c3704458ff5bbfc999 (diff) | |
download | gdb-0f579087abbd52ef11e1c0dc0236e0393ccfaba0.zip gdb-0f579087abbd52ef11e1c0dc0236e0393ccfaba0.tar.gz gdb-0f579087abbd52ef11e1c0dc0236e0393ccfaba0.tar.bz2 |
Thu Mar 21 17:02:02 1996 David Mosberger-Tang <davidm@azstarnet.com>
* gprof.c (default_excluded_list): Add "__mcount".
* gprof.c (main): Change ifdef __osf__ to __alpha__.
* gmon_io.c (gmon_out_read): If BSD44_FORMAT is defined, get the
profiling rate from the header.
* gmon.h (struct raw_phdr): Only include pad if both __alpha__ and
__osf__ are defined. Add new fields if BSD44_FORMAT is defined.
* alpha.h (MIN_INSN_SIZE): Define.
* core.c (MIN_INSN_SIZE): If not defined, define as 1.
(core_sym_class): Ignore debugging symbols.
(core_create_line_syms): Use MIN_INSN_SIZE when gathering line
information.
Diffstat (limited to 'gprof/gmon_io.c')
-rw-r--r-- | gprof/gmon_io.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/gprof/gmon_io.c b/gprof/gmon_io.c index 82c3caa..1f0e1ac 100644 --- a/gprof/gmon_io.c +++ b/gprof/gmon_io.c @@ -180,9 +180,27 @@ DEFUN (gmon_out_read, (filename), const char *filename) filename); done (1); } - tmp.low_pc = get_vma (core_bfd, (bfd_byte *) & raw.low_pc[0]); - tmp.high_pc = get_vma (core_bfd, (bfd_byte *) & raw.high_pc[0]); - tmp.ncnt = bfd_get_32 (core_bfd, (bfd_byte *) & raw.ncnt[0]); + tmp.low_pc = get_vma (core_bfd, (bfd_byte *) &raw.low_pc[0]); + tmp.high_pc = get_vma (core_bfd, (bfd_byte *) &raw.high_pc[0]); + tmp.ncnt = bfd_get_32 (core_bfd, (bfd_byte *) &raw.ncnt[0]); + +#ifdef BSD44_FORMAT + { + int profrate; + + profrate = bfd_get_32 (core_bfd, (bfd_byte *) &raw.version[0]); + if (!s_highpc) + hz = profrate; + else if (hz != profrate) + { + fprintf (stderr, + "%s: profiling rate incompatible with first gmon file\n", + filename); + done (1); + } + } +#endif + if (s_highpc && (tmp.low_pc != h.low_pc || tmp.high_pc != h.high_pc || tmp.ncnt != h.ncnt)) { |