aboutsummaryrefslogtreecommitdiff
path: root/gprof
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-03-30 22:06:39 +0000
committerIan Lance Taylor <ian@airs.com>1994-03-30 22:06:39 +0000
commitbd7fc39d753fe063c4cfbeffbf75b282891c6756 (patch)
treeebac26ca006f565e7e72ce641aed64f32ae5dd26 /gprof
parentae5d2ff57303b2e33829c3802694be98893a80fc (diff)
downloadgdb-bd7fc39d753fe063c4cfbeffbf75b282891c6756.zip
gdb-bd7fc39d753fe063c4cfbeffbf75b282891c6756.tar.gz
gdb-bd7fc39d753fe063c4cfbeffbf75b282891c6756.tar.bz2
* gprof.c (getsymtab): Change nosyms to long. Rename
get_symtab_upper_bound to bfd_get_symtab_upper_bound. Check for errors from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
Diffstat (limited to 'gprof')
-rw-r--r--gprof/ChangeLog7
-rw-r--r--gprof/gprof.c20
2 files changed, 23 insertions, 4 deletions
diff --git a/gprof/ChangeLog b/gprof/ChangeLog
index ae96c04..611e379 100644
--- a/gprof/ChangeLog
+++ b/gprof/ChangeLog
@@ -1,3 +1,10 @@
+Wed Mar 30 16:12:40 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * gprof.c (getsymtab): Change nosyms to long. Rename
+ get_symtab_upper_bound to bfd_get_symtab_upper_bound. Check for
+ errors from bfd_get_symtab_upper_bound and
+ bfd_canonicalize_symtab.
+
Tue Mar 22 10:50:52 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
* gprof.c (funcsymbol): Use bfd_get_symbol_info instead of
diff --git a/gprof/gprof.c b/gprof/gprof.c
index 7cfeaf0..683b758 100644
--- a/gprof/gprof.c
+++ b/gprof/gprof.c
@@ -244,13 +244,25 @@ bfd *abfd;
{
register long i;
int askfor;
- int nosyms;
+ long nosyms;
asymbol **syms;
- i = get_symtab_upper_bound (abfd); /* This will probably give us more
- * than we need, but that's ok.
- */
+ i = bfd_get_symtab_upper_bound (abfd);/* This will probably give us more
+ * than we need, but that's ok.
+ */
+ if (i < 0)
+ {
+ fprintf (stderr, "%s: %s: %s\n", whoami, a_outname,
+ bfd_errmsg (bfd_get_error ()));
+ exit (1);
+ }
syms = (asymbol**)xmalloc (i);
nosyms = bfd_canonicalize_symtab (abfd, syms);
+ if (nosyms < 0)
+ {
+ fprintf (stderr, "%s: %s: %s\n", whoami, a_outname,
+ bfd_errmsg (bfd_get_error ()));
+ exit (1);
+ }
nname = 0;
for (i = 0; i < nosyms; i++) {