From a466b86aac9e055dbaf4b1e5087deb52265ff8d5 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Tue, 19 Mar 1996 17:40:12 +0000 Subject: [PATCH] * rs6000-nat.c (exec_one_dummy_insn): Don't clobber the PC in the registers array. From Peter Schauer. --- gdb/ChangeLog | 5 +++++ gdb/rs6000-nat.c | 3 +++ 2 files changed, 8 insertions(+) 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 * 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); } -- 2.7.4