From 0559700dcafedfae4673ea2b918a0a9a2b79419b 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/vax.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'gprof/vax.c') diff --git a/gprof/vax.c b/gprof/vax.c index a6904c1e98..99719b9fb7 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; } -- cgit v1.2.1