#endif
/* For SVR4 shared libraries, each call goes through a small piece of
- trampoline code in the ".init" section. IN_SOLIB_TRAMPOLINE evaluates
+ trampoline code in the ".plt" section. IN_SOLIB_TRAMPOLINE evaluates
to nonzero if we are current stopped in one of these. */
#ifndef IN_SOLIB_TRAMPOLINE
#define IN_SOLIB_TRAMPOLINE(pc,name) 0
if (breakpoint_here_p (read_pc ()))
oneproc = 1;
+
+#ifdef STEP_SKIPS_DELAY
+ /* Check breakpoint_here_p first, because breakpoint_here_p is fast
+ (it just checks internal GDB data structures) and STEP_SKIPS_DELAY
+ is slow (it needs to read memory from the target). */
+ if (breakpoint_here_p (read_pc () + 4)
+ && STEP_SKIPS_DELAY (read_pc ()))
+ oneproc = 1;
+#endif /* STEP_SKIPS_DELAY */
}
else
write_pc (addr);
single_step (0); /* This actually cleans up the ss */
#endif /* NO_SINGLE_STEP */
-/* If PC is pointing at a nullified instruction, then step beyond it so that
- the user won't be confused when GDB appears to be ready to execute it. */
+ /* If PC is pointing at a nullified instruction, then step beyond
+ it so that the user won't be confused when GDB appears to be ready
+ to execute it. */
if (INSTRUCTION_NULLIFIED)
{
continue;
}
- set_current_frame ( create_new_frame (read_fp (), stop_pc));
+ set_current_frame (create_new_frame (read_fp (), stop_pc));
+ select_frame (get_current_frame (), 0);
+
+#ifdef HAVE_STEPPABLE_WATCHPOINT
+ /* It may not be necessary to disable the watchpoint to stop over
+ it. For example, the PA can (with some kernel cooperation)
+ single step over a watchpoint without disabling the watchpoint. */
+ if (STOPPED_BY_WATCHPOINT (w))
+ {
+ resume (1, 0);
+ continue;
+ }
+#endif
+
+#ifdef HAVE_NONSTEPPABLE_WATCHPOINT
+ /* It is far more common to need to disable a watchpoint
+ to step the inferior over it. FIXME. What else might
+ a debug register or page protection watchpoint scheme need
+ here? */
+ if (STOPPED_BY_WATCHPOINT (w))
+ {
+ remove_breakpoints ();
+ resume (1, 0);
+ insert_breakpoints ();
+ continue;
+ }
+#endif
stop_frame_address = FRAME_FP (get_current_frame ());
stop_sp = read_sp ();
sr_sal.pc = prev_pc;
sr_sal.symtab = NULL;
sr_sal.line = 0;
- /* We perhaps could set the frame if we kept track of what
- the frame corresponding to prev_pc was. But we don't,
- so don't. */
+ /* We could probably be setting the frame to
+ prev_frame_address; the reason we don't is that it didn't used
+ to exist. */
step_resume_breakpoint =
set_momentary_breakpoint (sr_sal, NULL, bp_step_resume);
if (breakpoints_inserted)
to one-proceed past a breakpoint. */
/* If we've just finished a special step resume and we don't
want to hit a breakpoint, pull em out. */
- if (step_resume_breakpoint == NULL &&
- remove_breakpoints_on_following_step)
+ if (step_resume_breakpoint == NULL
+ && through_sigtramp_breakpoint == NULL
+ && remove_breakpoints_on_following_step)
{
remove_breakpoints_on_following_step = 0;
remove_breakpoints ();
if we have one. */
if (!stop_stack_dummy)
{
- select_frame (get_current_frame (), 0);
-
if (stop_print_frame)
{
int source_only;
printf_filtered ("\n");
/* These ugly casts brought to you by the native VAX compiler. */
- for (oursig = 0;
+ for (oursig = TARGET_SIGNAL_FIRST;
(int)oursig < (int)TARGET_SIGNAL_LAST;
oursig = (enum target_signal)((int)oursig + 1))
{