X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=gprof%2Ftahoe.c;fp=gprof%2Ftahoe.c;h=93d2997ea913571f2d19ea3e1a4303dc7a583381;hp=c1d9c42742ac5fedeb8c865920530abc0100e769;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 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; }