From d401d98a57f2e2d30befd5dbe479aaa2d5e83deb Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 12 Feb 2009 12:47:39 +0000 Subject: * corefile.c (core_create_function_syms): Remove "" and "" sentinels. * gprof.c: Likewise. * cg_print.c (cg_print_function_ordering): Likewise. * alpha.c (alpha_find_call): Add check for return value of sym_lookup. * mips.c (mips_find_call): Likewise. * sparc.c (sparc_find_call): Likewise. * tahoe.c (tahoe_find_call): Likewise. * vax.c (vax_find_call): Likewise. --- gprof/sparc.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'gprof/sparc.c') diff --git a/gprof/sparc.c b/gprof/sparc.c index 47592d8..44724c4 100644 --- a/gprof/sparc.c +++ b/gprof/sparc.c @@ -68,15 +68,18 @@ sparc_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 ("\tdest_pc=0x%lx, (name=%s, addr=0x%lx)\n", - (unsigned long) dest_pc, child->name, - (unsigned long) child->addr)); - if (child->addr == dest_pc) + if (child) { - /* a hit: */ - arc_add (parent, child, (unsigned long) 0); - continue; + DBG (CALLDEBUG, + printf ("\tdest_pc=0x%lx, (name=%s, addr=0x%lx)\n", + (unsigned long) dest_pc, child->name, + (unsigned long) child->addr)); + if (child->addr == dest_pc) + { + /* a hit: */ + arc_add (parent, child, (unsigned long) 0); + continue; + } } } /* -- cgit v1.1