public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Introduce win32_target_ops::decr_pc_after_break
@ 2020-04-08 20:51 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2020-04-08 20:51 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e54e59297a747bb4f396345aa090d43f155b5576

commit e54e59297a747bb4f396345aa090d43f155b5576
Author: Tom Tromey <tromey@adacore.com>
Date:   Wed Apr 8 14:33:35 2020 -0600

    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.
    
    gdbserver/ChangeLog
    2020-04-08  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.

Diff:
---
 gdbserver/ChangeLog         | 7 +++++++
 gdbserver/win32-arm-low.cc  | 1 +
 gdbserver/win32-i386-low.cc | 1 +
 gdbserver/win32-low.h       | 4 ++++
 4 files changed, 13 insertions(+)

diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog
index ee66a4b6d99..24c42e28d06 100644
--- a/gdbserver/ChangeLog
+++ b/gdbserver/ChangeLog
@@ -1,3 +1,10 @@
+2020-04-08  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.
+
 2020-04-08  Tom Tromey  <tromey@adacore.com>
 
 	* win32-low.h (win32_process_target::read_pc)
diff --git a/gdbserver/win32-arm-low.cc b/gdbserver/win32-arm-low.cc
index 77200112df1..238ee4b05be 100644
--- a/gdbserver/win32-arm-low.cc
+++ b/gdbserver/win32-arm-low.cc
@@ -148,6 +148,7 @@ struct win32_target_ops the_low_target = {
   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.  */
diff --git a/gdbserver/win32-i386-low.cc b/gdbserver/win32-i386-low.cc
index eac15b5694a..48893af33b2 100644
--- a/gdbserver/win32-i386-low.cc
+++ b/gdbserver/win32-i386-low.cc
@@ -506,6 +506,7 @@ struct win32_target_ops the_low_target = {
   i386_single_step,
   &i386_win32_breakpoint,
   i386_win32_breakpoint_len,
+  1,
   i386_win32_get_pc,
   i386_win32_set_pc,
   i386_supports_z_point_type,
diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h
index 56ff8a9baf2..d2b39a46fd9 100644
--- a/gdbserver/win32-low.h
+++ b/gdbserver/win32-low.h
@@ -63,6 +63,10 @@ struct win32_target_ops
   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.  */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-08 20:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08 20:51 [binutils-gdb] Introduce win32_target_ops::decr_pc_after_break Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).