summaryrefslogtreecommitdiffstats
path: root/runtime/sym.c
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-01-17 21:52:42 -0500
committerFrank Ch. Eigler <fche@elastic.org>2008-01-17 21:52:42 -0500
commit7ee3e80ec0b7880c33d0ca3018025855d9dd5123 (patch)
treec39e234447fed3ca04c6467784fae5ddc85ce7d6 /runtime/sym.c
parent2b7f11a05877405a3dd232ac297e11f9d8253c2d (diff)
parentaf3047833424103c4e17728e849670da865d37c3 (diff)
downloadsystemtap-steved-7ee3e80ec0b7880c33d0ca3018025855d9dd5123.tar.gz
systemtap-steved-7ee3e80ec0b7880c33d0ca3018025855d9dd5123.tar.xz
systemtap-steved-7ee3e80ec0b7880c33d0ca3018025855d9dd5123.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'runtime/sym.c')
-rw-r--r--runtime/sym.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/runtime/sym.c b/runtime/sym.c
index c40f48db..56c93064 100644
--- a/runtime/sym.c
+++ b/runtime/sym.c
@@ -193,7 +193,7 @@ void _stp_symbol_print (unsigned long address)
_stp_printf ("%p", (int64_t)address);
if (name) {
- if (modname)
+ if (modname && *modname)
_stp_printf (" : %s+%#lx/%#lx [%s]", name, offset, size, modname);
else
_stp_printf (" : %s+%#lx/%#lx", name, offset, size);
@@ -202,22 +202,28 @@ void _stp_symbol_print (unsigned long address)
/* Like _stp_symbol_print, except only print if the address is a valid function address */
-void _stp_func_print (unsigned long address, int verbose)
+void _stp_func_print (unsigned long address, int verbose, int exact)
{
char *modname;
const char *name;
unsigned long offset, size;
+ char *exstr;
+
+ if (exact)
+ exstr = "";
+ else
+ exstr = " (inexact)";
name = _stp_kallsyms_lookup(address, &size, &offset, &modname, NULL);
if (name) {
if (verbose) {
- if (modname)
- _stp_printf (" %p : %s+%#lx/%#lx [%s]\n",
- (int64_t)address, name, offset, size, modname);
+ if (modname && *modname)
+ _stp_printf (" %p : %s+%#lx/%#lx [%s]%s\n",
+ (int64_t)address, name, offset, size, modname, exstr);
else
- _stp_printf (" %p : %s+%#lx/%#lx\n",
- (int64_t)address, name, offset, size);
+ _stp_printf (" %p : %s+%#lx/%#lx%s\n",
+ (int64_t)address, name, offset, size, exstr);
} else
_stp_printf ("%p ", (int64_t)address);
}