aboutsummaryrefslogtreecommitdiff
path: root/gprof/tahoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'gprof/tahoe.c')
-rw-r--r--gprof/tahoe.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/gprof/tahoe.c b/gprof/tahoe.c
index c1d9c42..93d2997 100644
--- a/gprof/tahoe.c
+++ b/gprof/tahoe.c
@@ -298,21 +298,24 @@ tahoe_find_call (Sym *parent, bfd_vma p_lowpc, bfd_vma p_highpc)
if (hist_check_address (destpc))
{
child = sym_lookup (&symtab, destpc);
- DBG (CALLDEBUG,
- printf ("[findcall]\tdestpc 0x%lx",
- (unsigned long) destpc);
- printf (" child->name %s", child->name);
- printf (" child->addr 0x%lx\n",
- (unsigned long) child->addr);
- );
- if (child->addr == destpc)
+ if (child)
{
- /*
- * a hit
- */
- arc_add (parent, child, (unsigned long) 0);
- length += tahoe_operandlength (instructp + length);
- continue;
+ DBG (CALLDEBUG,
+ printf ("[findcall]\tdestpc 0x%lx",
+ (unsigned long) destpc);
+ printf (" child->name %s", child->name);
+ printf (" child->addr 0x%lx\n",
+ (unsigned long) child->addr);
+ );
+ if (child->addr == destpc)
+ {
+ /*
+ * a hit
+ */
+ arc_add (parent, child, (unsigned long) 0);
+ length += tahoe_operandlength (instructp + length);
+ continue;
+ }
}
goto botched;
}