aboutsummaryrefslogtreecommitdiff
path: root/gprof/gprof.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1994-05-27 16:58:05 +0000
committerKen Raeburn <raeburn@cygnus>1994-05-27 16:58:05 +0000
commitc06e55d99ac38bd32492481f46b69ec62ee1e433 (patch)
tree7567d7ea926780a1d5242d47399b3a267283bb3a /gprof/gprof.c
parent60e8a534070c8dc181b2fb4971b8199597a168f1 (diff)
downloadgdb-c06e55d99ac38bd32492481f46b69ec62ee1e433.zip
gdb-c06e55d99ac38bd32492481f46b69ec62ee1e433.tar.gz
gdb-c06e55d99ac38bd32492481f46b69ec62ee1e433.tar.bz2
changes from gas-2.3/binutils-2.4 dist (details in branch log msgs, changelogs)
Diffstat (limited to 'gprof/gprof.c')
-rw-r--r--gprof/gprof.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gprof/gprof.c b/gprof/gprof.c
index 683b758..c8e0995 100644
--- a/gprof/gprof.c
+++ b/gprof/gprof.c
@@ -31,6 +31,10 @@ static char sccsid[] = "@(#)gprof.c 5.6 (Berkeley) 6/1/90";
#include "gprof.h"
+#ifndef FOPEN_RB
+#define FOPEN_RB "r"
+#endif
+
bfd *abfd;
char *whoami;
@@ -391,7 +395,7 @@ openpfile(filename)
struct rawhdr raw;
FILE *pfile;
- if((pfile = fopen(filename, "r")) == NULL) {
+ if((pfile = fopen(filename, FOPEN_RB)) == NULL) {
perror(filename);
done();
}
@@ -769,7 +773,11 @@ funcsymbol( symp )
* Perhaps it should be made configurable.
*/
- if (symprefix && symprefix != *symp->name)
+ if (symprefix && symprefix != *symp->name
+ /* Gcc may add special symbols to help gdb figure out the file
+ language. We want to ignore these, since sometimes they
+ mask the real function. (dj@ctron) */
+ || !strncmp (symp->name, "__gnu_compiled", 14))
return FALSE;
return TRUE;