From: K. Richard Pixley Date: Sat, 13 Mar 1993 00:32:10 +0000 (+0000) Subject: * mips-tdep.c (heuristic_proc_start): if we walk the pc into the fence X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8172eea3dfa9ec5597471366a9b155e33a0c398;p=binutils-gdb.git * mips-tdep.c (heuristic_proc_start): if we walk the pc into the fence post without finding the enclosing function, then print a warning. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ea8c8f91c8c..225298ad89d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +Fri Mar 12 16:23:54 1993 K. Richard Pixley (rich@cygnus.com) + + * mips-tdep.c (heuristic_proc_start): if we walk the pc into the + fence post without finding the enclosing function, then print a + warning. + Thu Mar 11 09:33:01 1993 Fred Fish (fnf@cygnus.com) * utils.c (fputs_demangled, fprint_symbol): Remove. diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 3e6c7a4fc5c..b21d269b98e 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -123,6 +123,11 @@ mips_frame_saved_pc(frame) static struct mips_extra_func_info temp_proc_desc; static struct frame_saved_regs temp_saved_regs; +/* This fencepost looks highly suspicious to me. Removing it also + seems suspicious as it could affect remote debugging across serial + lines. At the very least, this needs a warning message. + rich@cygnus.com 12mar93. */ + static CORE_ADDR heuristic_proc_start(pc) CORE_ADDR pc; @@ -135,7 +140,11 @@ heuristic_proc_start(pc) /* search back for previous return */ for (start_pc -= 4; ; start_pc -= 4) - if (start_pc < fence) return 0; + if (start_pc < fence) + { + warning("Cannot find enclosing function for pc 0x%x", pc); + return 0; + } else if (ABOUT_TO_RETURN(start_pc)) break; @@ -757,7 +766,7 @@ void _initialize_mips_tdep () { add_show_from_set - (add_set_cmd ("mips_fpu", class_support, var_boolean, + (add_set_cmd ("mipsfpu", class_support, var_boolean, (char *) &mips_fpu, "Set use of floating point coprocessor.\n\ Turn off to avoid using floating point instructions when calling functions\n\