X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=gprof%2Fmips.c;fp=gprof%2Fmips.c;h=2de87cfb578a040917dee5d95b71fa818c6a09c9;hp=7a7344df0d4e6b7ffbda915fee4d290e5b0f49df;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 diff --git a/gprof/mips.c b/gprof/mips.c index 7a7344d..2de87cf 100644 --- a/gprof/mips.c +++ b/gprof/mips.c @@ -74,16 +74,19 @@ mips_find_call (Sym *parent, bfd_vma p_lowpc, bfd_vma p_highpc) if (hist_check_address (dest_pc)) { child = sym_lookup (&symtab, dest_pc); - DBG (CALLDEBUG, - printf (" 0x%lx\t; name=%s, addr=0x%lx", - (unsigned long) dest_pc, child->name, - (unsigned long) child->addr)); - if (child->addr == dest_pc) + if (child) { - DBG (CALLDEBUG, printf ("\n")); - /* a hit: */ - arc_add (parent, child, (unsigned long) 0); - continue; + DBG (CALLDEBUG, + printf (" 0x%lx\t; name=%s, addr=0x%lx", + (unsigned long) dest_pc, child->name, + (unsigned long) child->addr)); + if (child->addr == dest_pc) + { + DBG (CALLDEBUG, printf ("\n")); + /* a hit: */ + arc_add (parent, child, (unsigned long) 0); + continue; + } } } /* Something funny going on. */