#define IN_SOLIB_TRAMPOLINE(pc,name) 0
#endif
+/* On some systems, the PC may be left pointing at an instruction that won't
+ actually be executed. This is usually indicated by a bit in the PSW. If
+ we find ourselves in such a state, then we step the target beyond the
+ nullified instruction before returning control to the user so as to avoid
+ confusion. */
+
+#ifndef INSTRUCTION_NULLIFIED
+#define INSTRUCTION_NULLIFIED 0
+#endif
+
#ifdef TDESC
#include "tdesc.h"
int safe_to_init_tdesc_context = 0;
int remove_breakpoints_on_following_step = 0;
int current_line;
int handling_longjmp = 0; /* FIXME */
+ struct symtab *symtab;
sal = find_pc_line(prev_pc, 0);
current_line = sal.line;
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 (INSTRUCTION_NULLIFIED)
+ {
+ resume (1, 0);
+ continue;
+ }
+
stop_pc = read_pc ();
set_current_frame ( create_new_frame (read_register (FP_REGNUM),
read_pc ()));
if (tmp != 0)
stop_func_start = tmp;
- if (find_pc_function (stop_func_start) != 0)
- goto step_into_function;
+ symtab = find_pc_symtab (stop_func_start);
+ if (symtab && LINETABLE (symtab))
+ goto step_into_function;
step_over_function:
/* A subroutine call has happened. */
void
normal_stop ()
{
- char *tem;
- struct cmd_list_element *c;
-
/* Make sure that the current_frame's pc is correct. This
is a correction for setting up the frame info before doing
DECR_PC_AFTER_BREAK */
char *cmd;
{
execute_user_command ((struct cmd_list_element *)cmd, 0);
+ return (0);
}
\f
Ignore is a synonym for nopass and noignore is a synonym for pass.\n\
Pass and Stop may be combined.");
- stop_command = add_cmd ("stop", class_pseudo, NO_FUNCTION,
+ stop_command = add_cmd ("stop", class_obscure, not_just_help_class_command,
"There is no `stop' command, but you can set a hook on `stop'.\n\
This allows you to set a list of commands to be run each time execution\n\
of the inferior program stops.", &cmdlist);