diff options
author | Ian Lance Taylor <ian@airs.com> | 1998-08-12 19:06:24 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1998-08-12 19:06:24 +0000 |
commit | 8c73afb3537b7271772a31466ec614a4d0634436 (patch) | |
tree | 639323c1b8888bf5fe9abcccb505211b1d56383b /gprof/gmon_io.c | |
parent | 15ec5eb33b983e2900205cffd919cca52f8e1394 (diff) | |
download | gdb-8c73afb3537b7271772a31466ec614a4d0634436.zip gdb-8c73afb3537b7271772a31466ec614a4d0634436.tar.gz gdb-8c73afb3537b7271772a31466ec614a4d0634436.tar.bz2 |
Avoid some overflow cases:
* basic_blocks.h (bb_min_calls): Change to unsigned long.
* call_graph.h (cg_tally): Change count parameter to unsigned
long.
* cg_arcs.h (Arc): Change count field to unsigned long.
(arc_add): Change count parameter to unsigned long.
* source.h (Source_File): Change ncalls field to unsigned long.
* symtab.h (Sym): Change fields ncalls, bb_calls, and
cg.self_calls to unsigned long.
* Many files: Update accordingly.
Diffstat (limited to 'gprof/gmon_io.c')
-rw-r--r-- | gprof/gmon_io.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gprof/gmon_io.c b/gprof/gmon_io.c index af4d8ac..6cf9167 100644 --- a/gprof/gmon_io.c +++ b/gprof/gmon_io.c @@ -149,7 +149,8 @@ DEFUN (gmon_out_read, (filename), const char *filename) bfd_vma high_pc; int ncnt; }; - int i, samp_bytes, count; + int i, samp_bytes; + unsigned long count; bfd_vma from_pc, self_pc; struct raw_arc raw_arc; struct raw_phdr raw; @@ -260,7 +261,7 @@ DEFUN (gmon_out_read, (filename), const char *filename) self_pc = get_vma (core_bfd, (bfd_byte *) raw_arc.self_pc); count = bfd_get_32 (core_bfd, (bfd_byte *) raw_arc.count); DBG (SAMPLEDEBUG, - printf ("[gmon_out_read] frompc 0x%lx selfpc 0x%lx count %d\n", + printf ("[gmon_out_read] frompc 0x%lx selfpc 0x%lx count %lu\n", from_pc, self_pc, count)); /* add this arc: */ cg_tally (from_pc, self_pc, count); @@ -399,7 +400,7 @@ DEFUN (gmon_out_write, (filename), const char *filename) done (1); } DBG (SAMPLEDEBUG, - printf ("[dumpsum] frompc 0x%lx selfpc 0x%lx count %d\n", + printf ("[dumpsum] frompc 0x%lx selfpc 0x%lx count %lu\n", arc->parent->addr, arc->child->addr, arc->count)); } } |