[review] Introduce win32_target_ops::decr_pc_after_break
Commit Message
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/722
......................................................................
Introduce win32_target_ops::decr_pc_after_break
This adds a decr_pc_after_break member to win32_target_ops and updates
the two Windows targets to set it.
Note that I can't test the win32-arm-low.c change.
2019-11-26 Tom Tromey <tromey@adacore.com>
* win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
field.
* win32-i386-low.c (the_low_target): Update.
* win32-arm-low.c (the_low_target): Update.
Change-Id: Ie0092b0cecb913e80d05e4e3e72fe800e090305e
---
M gdb/gdbserver/ChangeLog
M gdb/gdbserver/win32-arm-low.c
M gdb/gdbserver/win32-i386-low.c
M gdb/gdbserver/win32-low.h
4 files changed, 13 insertions(+), 0 deletions(-)
Comments
Luis Machado has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/722
......................................................................
Patch Set 1: Code-Review+1
Looks sane.
Pedro Alves has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/722
......................................................................
Patch Set 1: Code-Review+2
@@ -1,5 +1,12 @@
2019-11-26 Tom Tromey <tromey@adacore.com>
+ * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
+ field.
+ * win32-i386-low.c (the_low_target): Update.
+ * win32-arm-low.c (the_low_target): Update.
+
+2019-11-26 Tom Tromey <tromey@adacore.com>
+
* win32-low.c (win32_read_pc, win32_write_pc): New functions.
(win32_target_ops): Update.
* win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
@@ -146,6 +146,7 @@
NULL, /* single_step */
(const unsigned char *) &arm_wince_breakpoint,
arm_wince_breakpoint_len,
+ 0,
arm_win32_get_pc,
arm_win32_set_pc,
/* Watchpoint related functions. See target.h for comments. */
@@ -504,6 +504,7 @@
i386_single_step,
&i386_win32_breakpoint,
i386_win32_breakpoint_len,
+ 1,
i386_win32_get_pc,
i386_win32_set_pc,
i386_supports_z_point_type,
@@ -63,6 +63,10 @@
const unsigned char *breakpoint;
int breakpoint_len;
+ /* Amount by which to decrement the PC after a breakpoint is
+ hit. */
+ int decr_pc_after_break;
+
/* Get the PC register from REGCACHE. */
CORE_ADDR (*get_pc) (struct regcache *regcache);
/* Set the PC register in REGCACHE. */