public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [review] Normalize get_windows_debug_event API
@ 2019-11-26 17:12 Tom Tromey (Code Review)
  2019-11-29 19:52 ` Pedro Alves (Code Review)
  0 siblings, 1 reply; 4+ 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/+/712
......................................................................

Normalize get_windows_debug_event API

This changes gdb's implementation of get_windows_debug_event to have
the same API as that of gdbserver.  This allows more code sharing in a
subsequent patch.

gdb/ChangeLog
2019-11-26  Tom Tromey  <tromey@adacore.com>

	* windows-nat.c (get_windows_debug_event): Remove parameters.
	(windows_nat_target::wait): Update.

Change-Id: Ib279ec62e72b3f42a8dec172154df24c6911fefa
---
M gdb/ChangeLog
M gdb/windows-nat.c
2 files changed, 7 insertions(+), 5 deletions(-)



diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 976c19a..42ebe64 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2019-11-26  Tom Tromey  <tromey@adacore.com>
 
+	* windows-nat.c (get_windows_debug_event): Remove parameters.
+	(windows_nat_target::wait): Update.
+
+2019-11-26  Tom Tromey  <tromey@adacore.com>
+
 	* windows-nat.c (windows_nat::handle_output_debug_string):
 	Rename.  No longer static.
 	* nat/windows-nat.h (handle_output_debug_string): Declare.
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 083e05b..f718a8e 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -1489,8 +1489,7 @@
 /* Get the next event from the child.  Returns a non-zero thread id if the event
    requires handling by WFI (or whatever).  */
 static int
-get_windows_debug_event (struct target_ops *ops,
-			 int pid, struct target_waitstatus *ourstatus)
+get_windows_debug_event (struct target_waitstatus *ourstatus)
 {
   BOOL debug_event;
   DWORD continue_status, event_code;
@@ -1739,8 +1738,6 @@
 windows_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
 			  int options)
 {
-  int pid = -1;
-
   /* We loop when we get a non-standard exception rather than return
      with a SPURIOUS because resume can try and step or modify things,
      which needs a current_thread->h.  But some of these exceptions mark
@@ -1778,7 +1775,7 @@
 	     the user tries to resume the execution in the inferior.
 	     This is a classic race that we should try to fix one day.  */
       SetConsoleCtrlHandler (&ctrl_c_handler, TRUE);
-      retval = get_windows_debug_event (this, pid, ourstatus);
+      retval = get_windows_debug_event (ourstatus);
       SetConsoleCtrlHandler (&ctrl_c_handler, FALSE);
 
       if (retval)

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

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

* [review] Normalize get_windows_debug_event API
  2019-11-26 17:12 [review] Normalize get_windows_debug_event API Tom Tromey (Code Review)
@ 2019-11-29 19:52 ` Pedro Alves (Code Review)
  0 siblings, 0 replies; 4+ messages in thread
From: Pedro Alves (Code Review) @ 2019-11-29 19:52 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/+/712
......................................................................


Patch Set 1: Code-Review+2


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

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

* [review] Normalize get_windows_debug_event API
  2019-10-29 17:58 Tom Tromey (Code Review)
@ 2019-11-27  0:05 ` Luis Machado (Code Review)
  0 siblings, 0 replies; 4+ messages in thread
From: Luis Machado (Code Review) @ 2019-11-27  0:05 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/+/421
......................................................................


Patch Set 1: Code-Review+1

LGTM.


-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I4d6767efb32de5b36d944b0defdfbeac4009dbb7
Gerrit-Change-Number: 421
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:05:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

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

* [review] Normalize get_windows_debug_event API
@ 2019-10-29 17:58 Tom Tromey (Code Review)
  2019-11-27  0:05 ` Luis Machado (Code Review)
  0 siblings, 1 reply; 4+ 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/+/421
......................................................................

Normalize get_windows_debug_event API

This changes gdb's implementation of get_windows_debug_event to have
the same API as that of gdbserver.  This allows more code sharing in a
subsequent patch.

Change-Id: Ib279ec62e72b3f42a8dec172154df24c6911fefa

gdb/ChangeLog
2019-10-29  Tom Tromey  <tromey@adacore.com>

	* windows-nat.c (get_windows_debug_event): Remove parameters.
	(windows_nat_target::wait): Update.

Change-Id: I4d6767efb32de5b36d944b0defdfbeac4009dbb7
---
M gdb/ChangeLog
M gdb/windows-nat.c
2 files changed, 7 insertions(+), 5 deletions(-)



diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 81c52ca..d706ebb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2019-10-29  Tom Tromey  <tromey@adacore.com>
 
+	* windows-nat.c (get_windows_debug_event): Remove parameters.
+	(windows_nat_target::wait): Update.
+
+2019-10-29  Tom Tromey  <tromey@adacore.com>
+
 	* windows-nat.c (windows_nat::handle_output_debug_string):
 	Rename.  No longer static.
 	* nat/windows-nat.h (handle_output_debug_string): Declare.
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 38b3828..d175bd7 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -1465,8 +1465,7 @@
 /* Get the next event from the child.  Returns a non-zero thread id if the event
    requires handling by WFI (or whatever).  */
 static int
-get_windows_debug_event (struct target_ops *ops,
-			 int pid, struct target_waitstatus *ourstatus)
+get_windows_debug_event (struct target_waitstatus *ourstatus)
 {
   BOOL debug_event;
   DWORD continue_status, event_code;
@@ -1706,8 +1705,6 @@
 windows_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
 			  int options)
 {
-  int pid = -1;
-
   /* We loop when we get a non-standard exception rather than return
      with a SPURIOUS because resume can try and step or modify things,
      which needs a current_thread->h.  But some of these exceptions mark
@@ -1745,7 +1742,7 @@
 	     the user tries to resume the execution in the inferior.
 	     This is a classic race that we should try to fix one day.  */
       SetConsoleCtrlHandler (&ctrl_c_handler, TRUE);
-      retval = get_windows_debug_event (this, pid, ourstatus);
+      retval = get_windows_debug_event (ourstatus);
       SetConsoleCtrlHandler (&ctrl_c_handler, FALSE);
 
       if (retval)

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

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 17:12 [review] Normalize get_windows_debug_event API Tom Tromey (Code Review)
2019-11-29 19:52 ` Pedro Alves (Code Review)
  -- strict thread matches above, loose matches on Subject: below --
2019-10-29 17:58 Tom Tromey (Code Review)
2019-11-27  0:05 ` Luis Machado (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).