* rs6000-nat.c (exec_one_dummy_insn): Don't clobber the

PC in the registers array.  From Peter Schauer.
This commit is contained in:
Jeff Law 1996-03-19 17:40:12 +00:00
parent a912e811fc
commit a466b86aac
2 changed files with 8 additions and 0 deletions

View file

@ -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

View file

@ -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);
}