aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/rs6000-nat.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ab7c172..68e3973 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+Tue Mar 19 10:39:15 1996 Jeffrey A Law (law@cygnus.com)
+
+ * rs6000-nat.c (exec_one_dummy_insn): Don't clobber the
+ PC in the registers array. From Peter Schauer.
+
Mon Mar 18 13:47:09 1996 Fred Fish <fnf@cygnus.com>
* symfile.c (reread_symbols): Reinitialize bcache struct
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 8293b56..b9ad387 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -231,6 +231,7 @@ exec_one_dummy_insn ()
char shadow_contents[BREAKPOINT_MAX]; /* Stash old bkpt addr contents */
unsigned int status, pid;
+ CORE_ADDR prev_pc;
/* We plant one dummy breakpoint into DUMMY_INSN_ADDR address. We assume that
this address will never be executed again by the real code. */
@@ -244,6 +245,7 @@ exec_one_dummy_insn ()
on. However, rs6000-ibm-aix4.1.3 seems to have screwed this up --
the inferior never hits the breakpoint (it's also worth noting
powerpc-ibm-aix4.1.3 works correctly). */
+ prev_pc = read_pc ();
write_pc (DUMMY_INSN_ADDR);
ptrace (PT_CONTINUE, inferior_pid, (PTRACE_ARG3_TYPE)1, 0, 0);
@@ -254,6 +256,7 @@ exec_one_dummy_insn ()
pid = wait (&status);
} while (pid != inferior_pid);
+ write_pc (prev_pc);
target_remove_breakpoint (DUMMY_INSN_ADDR, shadow_contents);
}