extern int errno;
-/* Nonzero if we just simulated a single step break. */
-int one_stepped;
-
/* Breakpoint shadows for the single step instructions will be kept here. */
static struct sstep_breaks {
/* AIX does not support PT_STEP. Simulate it. */
void
-single_step (signal)
+rs6000_software_single_step (signal, insert_breakpoints_p)
enum target_signal signal;
+ int insert_breakpoints_p;
{
#define INSNLEN(OPCODE) 4
CORE_ADDR breaks[2];
int opcode;
- if (!one_stepped) {
+ if (insert_breakpoints_p) {
+
loc = read_pc ();
insn = read_memory_integer (loc, 4);
stepBreaks[ii].address = breaks[ii];
}
- one_stepped = 1;
} else {
/* remove step breakpoints. */
write_memory
(stepBreaks[ii].address, stepBreaks[ii].data, 4);
- one_stepped = 0;
}
errno = 0; /* FIXME, don't ignore errors! */
/* What errors? {read,write}_memory call error(). */