diff options
author | K. Richard Pixley <rich@cygnus> | 1993-03-13 00:32:10 +0000 |
---|---|---|
committer | K. Richard Pixley <rich@cygnus> | 1993-03-13 00:32:10 +0000 |
commit | a8172eea3dfa9ec5597471366a9b155e33a0c398 (patch) | |
tree | 6e4473e39c1d96b788a68a857e84323cc4375d01 /gdb | |
parent | 2aefe6e4ae94d53cb92cedc371f3602853945e68 (diff) | |
download | gdb-a8172eea3dfa9ec5597471366a9b155e33a0c398.zip gdb-a8172eea3dfa9ec5597471366a9b155e33a0c398.tar.gz gdb-a8172eea3dfa9ec5597471366a9b155e33a0c398.tar.bz2 |
* mips-tdep.c (heuristic_proc_start): if we walk the pc into the fence
post without finding the enclosing function, then print a warning.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 13 |
2 files changed, 17 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ea8c8f9..225298a 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 3e6c7a4..b21d269 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\ |