Introduce win32_target_ops::decr_pc_after_break
authorTom Tromey <tromey@adacore.com>
Wed, 8 Apr 2020 20:33:35 +0000 (14:33 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 8 Apr 2020 20:47:59 +0000 (14:47 -0600)
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.

gdbserver/ChangeLog
gdbserver/win32-arm-low.cc
gdbserver/win32-i386-low.cc
gdbserver/win32-low.h

index ee66a4b6d99d62c8837ebe56669ff906b12c4c43..24c42e28d06c9aa027f05eeca15e8d8148021f04 100644 (file)
@@ -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)
index 77200112df135e25c515ba6792225451d9b9cdca..238ee4b05bed36aa9984447028df4b5d725fba59 100644 (file)
@@ -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.  */
index eac15b5694a8e4c4477b6bfe93ae5f44f259bd3f..48893af33b276c2aaf40ac4c75afc34a36f6e995 100644 (file)
@@ -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,
index 56ff8a9baf2a8360881adc5178fed5c667739a4d..d2b39a46fd90943c9fa070687a2a76f23e01ef24 100644 (file)
@@ -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.  */