diff options
author | Stu Grossman <grossman@cygnus> | 1995-10-24 21:22:56 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1995-10-24 21:22:56 +0000 |
commit | 3f687c7896795bac80f4e2e15f565562f34b4e30 (patch) | |
tree | adbadb7834dc6daf11650767e4f4a2ef85097906 /gdb/infrun.c | |
parent | 43b428a7bf92c725de4d5560807cd0a4682c0962 (diff) | |
download | gdb-3f687c7896795bac80f4e2e15f565562f34b4e30.zip gdb-3f687c7896795bac80f4e2e15f565562f34b4e30.tar.gz gdb-3f687c7896795bac80f4e2e15f565562f34b4e30.tar.bz2 |
* infrun.c (wait_for_inferior): Disable questionable code near
the step range test. Replace call detection test with much
simpler (and more efficient) test that doesn't require prologue
examination (as often).
* symtab.c symtab.h (in_prologue): New function that indicates
whether or not we are in a function prologue. This uses the
symbol table, and then falls back to prologue examination if that
fails. It's much more efficient for remote debugging because it
avoids examining memory, which is very slow. This is used in
wait_for_inferior to determine if we've made a function call that
needs to be skipped over (for next/nexti).
* mips-tdep.c (after_prologue): New function, returns the PC
after the prologue. Uses PDRs and the symbol table.
(mips_find_saved_regs): Use in_prologue() to avoid costly
prologue examination if possible.
(mips_skip_prologue): Use after_prologue() if possible to avoid
costly prologue examination.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index a55744a..73647aa 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "gdb_string.h" @@ -1068,6 +1068,10 @@ wait_for_inferior () /* If stepping through a line, keep going if still within it. */ if (stop_pc >= step_range_start && stop_pc < step_range_end +#if 0 +/* I haven't a clue what might trigger this clause, and it seems wrong anyway, + so I've disabled it until someone complains. -Stu 10/24/95 */ + /* The step range might include the start of the function, so if we are at the start of the step range and either the stack or frame pointers @@ -1075,7 +1079,9 @@ wait_for_inferior () && !(stop_pc == step_range_start && FRAME_FP (get_current_frame ()) && (read_sp () INNER_THAN step_sp - || FRAME_FP (get_current_frame ()) != step_frame_address))) + || FRAME_FP (get_current_frame ()) != step_frame_address)) +#endif +) { /* We might be doing a BPSTAT_WHAT_SINGLE and getting a signal. So definately need to check for sigtramp here. */ @@ -1131,7 +1137,13 @@ wait_for_inferior () goto keep_going; } -#if 1 +#if 0 + /* I disabled this test because it was too complicated and slow. The + SKIP_PROLOGUE was especially slow, because it caused unnecessary + prologue examination on various architectures. The code in the #else + clause has been tested on the Sparc, Mips, PA, and Power + architectures, so it's pretty likely to be correct. -Stu 10/24/95 */ + /* See if we left the step range due to a subroutine call that we should proceed to the end of. */ @@ -1199,10 +1211,12 @@ wait_for_inferior () /* This is experimental code which greatly simplifies the subroutine call test. I've actually tested on the Alpha, and it works great. -Stu */ - if (in_prologue (stop_pc, NULL) - || (prev_func_start != 0 - && stop_func_start == 0)) + if (stop_pc == stop_func_start /* Quick test */ + || in_prologue (stop_pc, stop_func_start) + || IN_SOLIB_CALL_TRAMPOLINE (stop_pc, stop_func_name) + || stop_func_start == 0) #endif + { /* It's a subroutine call. */ |