aboutsummaryrefslogtreecommitdiff
path: root/gprof/core.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1995-12-25 04:32:29 +0000
committerJeff Law <law@redhat.com>1995-12-25 04:32:29 +0000
commit32843f948c896c825b38465b5495044f9f6cb298 (patch)
tree9eed0cebd32f609fb20ec5fc2b5ef95ec7ffe377 /gprof/core.c
parent7920c1d195114002311c4a8b1209603a8c57d315 (diff)
downloadgdb-32843f948c896c825b38465b5495044f9f6cb298.zip
gdb-32843f948c896c825b38465b5495044f9f6cb298.tar.gz
gdb-32843f948c896c825b38465b5495044f9f6cb298.tar.bz2
* core.c (core_sym_class): Ignore symbols without BSF_FUNCTION
set if ignore_non_function is set. * gprof.h (ignore_non_functions): Declare. * gprof.c (ignore_non_functions): Define. (long_options): Add "ignore-non-functions". (usage): Add new options. (main): Recognize "-D" and "--ignore-non-functions" option. So we can get more accurate information on Solaris, HPUX and other systems that can uniquely identify function symbols.
Diffstat (limited to 'gprof/core.c')
-rw-r--r--gprof/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gprof/core.c b/gprof/core.c
index 19c6e59..aa6012a 100644
--- a/gprof/core.c
+++ b/gprof/core.c
@@ -179,6 +179,12 @@ DEFUN (core_sym_class, (sym), asymbol * sym)
{
return 0;
}
+
+ /* If the object file supports marking of function symbols, then we can
+ zap anything that doesn't have BSF_FUNCTION set. */
+ if (ignore_non_functions && (sym->flags & BSF_FUNCTION) == 0)
+ return 0;
+
return 't'; /* it's a static text symbol */
}