X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=gprof%2Fvax.c;fp=gprof%2Fvax.c;h=99719b9fb7e110d2f4204d15329a9805b809416e;hp=a6904c1e98811485a6e5786663a0aab88072199a;hb=88750007d7869f178f0ba528f41efd3b74c424cf;hpb=6df9443a374e2b81278c61b8afc0a1eef7db280b diff --git a/gprof/vax.c b/gprof/vax.c index a6904c1..99719b9 100644 --- a/gprof/vax.c +++ b/gprof/vax.c @@ -309,21 +309,24 @@ vax_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 += vax_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 += vax_operandlength (instructp + length); + continue; + } } goto botched; }