public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [review] Introduce win32_target_ops::decr_pc_after_break
@ 2019-11-26 17:12 Tom Tromey (Code Review)
  2019-11-27  0:57 ` Luis Machado (Code Review)
  2019-11-29 20:58 ` Pedro Alves (Code Review)
  0 siblings, 2 replies; 5+ messages in thread
From: Tom Tromey (Code Review) @ 2019-11-26 17:12 UTC (permalink / raw)
  To: gdb-patches

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(-)



diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index df6206e..0002bf7 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -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
diff --git a/gdb/gdbserver/win32-arm-low.c b/gdb/gdbserver/win32-arm-low.c
index c13089a..d80197d 100644
--- a/gdb/gdbserver/win32-arm-low.c
+++ b/gdb/gdbserver/win32-arm-low.c
@@ -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.  */
diff --git a/gdb/gdbserver/win32-i386-low.c b/gdb/gdbserver/win32-i386-low.c
index b99afcf..575607d 100644
--- a/gdb/gdbserver/win32-i386-low.c
+++ b/gdb/gdbserver/win32-i386-low.c
@@ -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,
diff --git a/gdb/gdbserver/win32-low.h b/gdb/gdbserver/win32-low.h
index 73ceb4b..3ada7c8 100644
--- a/gdb/gdbserver/win32-low.h
+++ b/gdb/gdbserver/win32-low.h
@@ -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.  */

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Ie0092b0cecb913e80d05e4e3e72fe800e090305e
Gerrit-Change-Number: 722
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newchange

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [review] Introduce win32_target_ops::decr_pc_after_break
  2019-11-26 17:12 [review] Introduce win32_target_ops::decr_pc_after_break Tom Tromey (Code Review)
@ 2019-11-27  0:57 ` Luis Machado (Code Review)
  2019-11-29 20:58 ` Pedro Alves (Code Review)
  1 sibling, 0 replies; 5+ messages in thread
From: Luis Machado (Code Review) @ 2019-11-27  0:57 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

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.


-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Ie0092b0cecb913e80d05e4e3e72fe800e090305e
Gerrit-Change-Number: 722
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Luis Machado <luis.machado@linaro.org>
Gerrit-Comment-Date: Wed, 27 Nov 2019 00:57:24 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [review] Introduce win32_target_ops::decr_pc_after_break
  2019-11-26 17:12 [review] Introduce win32_target_ops::decr_pc_after_break Tom Tromey (Code Review)
  2019-11-27  0:57 ` Luis Machado (Code Review)
@ 2019-11-29 20:58 ` Pedro Alves (Code Review)
  1 sibling, 0 replies; 5+ messages in thread
From: Pedro Alves (Code Review) @ 2019-11-29 20:58 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches; +Cc: Luis Machado

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


-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Ie0092b0cecb913e80d05e4e3e72fe800e090305e
Gerrit-Change-Number: 722
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Luis Machado <luis.machado@linaro.org>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-Comment-Date: Fri, 29 Nov 2019 20:58:02 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [review] Introduce win32_target_ops::decr_pc_after_break
  2019-10-29 17:58 Tom Tromey (Code Review)
@ 2019-11-21 18:44 ` Pedro Alves (Code Review)
  0 siblings, 0 replies; 5+ messages in thread
From: Pedro Alves (Code Review) @ 2019-11-21 18:44 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

Pedro Alves has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/431
......................................................................


Patch Set 1: Code-Review+2

OK.

If ARM needed a value != 0, then this would need to be a function, since ARM/Thumb/Thumb-2 have breakpoint instructions with different widths.  But it doesn't, so this is OK as is.


-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I2f412d4f597406d9045bcf5a18a205c6d8974db2
Gerrit-Change-Number: 431
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-Comment-Date: Thu, 21 Nov 2019 18:44:29 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [review] Introduce win32_target_ops::decr_pc_after_break
@ 2019-10-29 17:58 Tom Tromey (Code Review)
  2019-11-21 18:44 ` Pedro Alves (Code Review)
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Tromey (Code Review) @ 2019-10-29 17:58 UTC (permalink / raw)
  To: gdb-patches

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/431
......................................................................

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.

Change-Id: Ie0092b0cecb913e80d05e4e3e72fe800e090305e

gdb/gdbserver/ChangeLog
2019-10-29  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: I2f412d4f597406d9045bcf5a18a205c6d8974db2
---
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(-)



diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index fb2fbef..a6896d6 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,12 @@
 2019-10-29  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-10-29  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
diff --git a/gdb/gdbserver/win32-arm-low.c b/gdb/gdbserver/win32-arm-low.c
index f2052c6..ee1e7f5 100644
--- a/gdb/gdbserver/win32-arm-low.c
+++ b/gdb/gdbserver/win32-arm-low.c
@@ -142,6 +142,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.  */
diff --git a/gdb/gdbserver/win32-i386-low.c b/gdb/gdbserver/win32-i386-low.c
index 421f969..b5766b7 100644
--- a/gdb/gdbserver/win32-i386-low.c
+++ b/gdb/gdbserver/win32-i386-low.c
@@ -500,6 +500,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,
diff --git a/gdb/gdbserver/win32-low.h b/gdb/gdbserver/win32-low.h
index 73ceb4b..3ada7c8 100644
--- a/gdb/gdbserver/win32-low.h
+++ b/gdb/gdbserver/win32-low.h
@@ -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.  */

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I2f412d4f597406d9045bcf5a18a205c6d8974db2
Gerrit-Change-Number: 431
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newchange

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-29 20:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 17:12 [review] Introduce win32_target_ops::decr_pc_after_break Tom Tromey (Code Review)
2019-11-27  0:57 ` Luis Machado (Code Review)
2019-11-29 20:58 ` Pedro Alves (Code Review)
  -- strict thread matches above, loose matches on Subject: below --
2019-10-29 17:58 Tom Tromey (Code Review)
2019-11-21 18:44 ` Pedro Alves (Code Review)

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).