diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-09-29 00:53:04 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-09-29 00:53:04 +0000 |
commit | 99e40580307d91e399af1c0293a6676b10efefea (patch) | |
tree | 3c951a5f939f575645b767865063ddbc6ddfd0b3 /gdb/rs6000-tdep.c | |
parent | 69368a60a4878ec4ef1060732020e9eaf19b32b0 (diff) | |
download | binutils-gdb-99e40580307d91e399af1c0293a6676b10efefea.tar.gz |
* gdbarch.sh (displaced_step_hw_singlestep): New callback.
* gdbarch.c, gdbarch.h: Regenerate.
* arch-utils.c (default_displaced_step_hw_singlestep): New function.
* arch-utils.h (default_displaced_step_hw_singlestep): Add prototype.
* ppc-linux-tdep.c (ppc_displaced_step_hw_singlestep): New function.
(rs6000_gdbarch_init): Install it.
* infrun.c (displaced_step_fixup): Use new callback to determine
whether to "step" or "continue" displaced copy.
(resume): Likewise. Do not call maybe_software_singlestep
for displaced stepping.
(maybe_software_singlestep): Do not handle displaced stepping.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r-- | gdb/rs6000-tdep.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index fae5c284b6f..26ae10981e4 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -1058,6 +1058,15 @@ ppc_displaced_step_fixup (struct gdbarch *gdbarch, from + offset); } +/* Always use hardware single-stepping to execute the + displaced instruction. */ +static int +ppc_displaced_step_hw_singlestep (struct gdbarch *gdbarch, + struct displaced_step_closure *closure) +{ + return 1; +} + /* Instruction masks used during single-stepping of atomic sequences. */ #define LWARX_MASK 0xfc0007fe #define LWARX_INSTRUCTION 0x7c000028 @@ -3898,6 +3907,8 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Setup displaced stepping. */ set_gdbarch_displaced_step_copy_insn (gdbarch, simple_displaced_step_copy_insn); + set_gdbarch_displaced_step_hw_singlestep (gdbarch, + ppc_displaced_step_hw_singlestep); set_gdbarch_displaced_step_fixup (gdbarch, ppc_displaced_step_fixup); set_gdbarch_displaced_step_free_closure (gdbarch, simple_displaced_step_free_closure); |