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

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

Make last_wait_event static

Now that last_wait_event is entirely handled in nat/windows-nat.c, it
can be made static.

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

	* nat/windows-nat.h (last_wait_event): Don't declare.
	(wait_for_debug_event): Update comment.
	* nat/windows-nat.c (last_wait_event): Now static.

Change-Id: I67ea86e1d2ede0b4e0fb96761261ece01ef514b2
---
M gdb/ChangeLog
M gdb/nat/windows-nat.c
M gdb/nat/windows-nat.h
3 files changed, 15 insertions(+), 9 deletions(-)



diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index afe6ae9..f859445 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
 2019-11-26  Tom Tromey  <tromey@adacore.com>
 
+	* nat/windows-nat.h (last_wait_event): Don't declare.
+	(wait_for_debug_event): Update comment.
+	* nat/windows-nat.c (last_wait_event): Now static.
+
+2019-11-26  Tom Tromey  <tromey@adacore.com>
+
 	* windows-nat.c (wait_for_debug_event): Move to
 	nat/windows-nat.c.
 	* nat/windows-nat.h (wait_for_debug_event): Declare.
diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c
index 8b00142..8206edd 100644
--- a/gdb/nat/windows-nat.c
+++ b/gdb/nat/windows-nat.c
@@ -28,7 +28,14 @@
 DWORD main_thread_id;
 enum gdb_signal last_sig = GDB_SIGNAL_0;
 DEBUG_EVENT current_event;
-DEBUG_EVENT last_wait_event;
+
+/* The most recent event from WaitForDebugEvent.  Unlike
+   current_event, this is guaranteed never to come from a pending
+   stop.  This is important because only data from the most recent
+   event from WaitForDebugEvent can be used when calling
+   ContinueDebugEvent.  */
+static DEBUG_EVENT last_wait_event;
+
 windows_thread_info *current_windows_thread;
 DWORD desired_stop_thread_id = -1;
 std::vector<pending_stop> pending_stops;
diff --git a/gdb/nat/windows-nat.h b/gdb/nat/windows-nat.h
index ebdbacd..5c99c43 100644
--- a/gdb/nat/windows-nat.h
+++ b/gdb/nat/windows-nat.h
@@ -155,13 +155,6 @@
    stop.  */
 extern DEBUG_EVENT current_event;
 
-/* The most recent event from WaitForDebugEvent.  Unlike
-   current_event, this is guaranteed never to come from a pending
-   stop.  This is important because only data from the most recent
-   event from WaitForDebugEvent can be used when calling
-   ContinueDebugEvent.  */
-extern DEBUG_EVENT last_wait_event;
-
 /* Info on currently selected thread */
 extern windows_thread_info *current_windows_thread;
 
@@ -231,7 +224,7 @@
 extern BOOL continue_last_debug_event (DWORD continue_status,
 				       bool debug_events);
 
-/* A simple wrapper for WaitForDebugEvent that also sets
+/* A simple wrapper for WaitForDebugEvent that also sets the internal
    'last_wait_event' on success.  */
 
 extern BOOL wait_for_debug_event (DEBUG_EVENT *event, DWORD timeout);

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

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

* [review] Make last_wait_event static
  2019-11-26 17:21 [review] Make last_wait_event static Tom Tromey (Code Review)
@ 2019-11-27  1:04 ` Luis Machado (Code Review)
  2019-11-29 20:56 ` Pedro Alves (Code Review)
  1 sibling, 0 replies; 5+ messages in thread
From: Luis Machado (Code Review) @ 2019-11-27  1:04 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/+/720
......................................................................


Patch Set 1: Code-Review+1

LGTM


-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I67ea86e1d2ede0b4e0fb96761261ece01ef514b2
Gerrit-Change-Number: 720
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 01:04:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

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

* [review] Make last_wait_event static
  2019-11-26 17:21 [review] Make last_wait_event static Tom Tromey (Code Review)
  2019-11-27  1:04 ` Luis Machado (Code Review)
@ 2019-11-29 20:56 ` Pedro Alves (Code Review)
  1 sibling, 0 replies; 5+ messages in thread
From: Pedro Alves (Code Review) @ 2019-11-29 20:56 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/+/720
......................................................................


Patch Set 1: Code-Review+2


-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I67ea86e1d2ede0b4e0fb96761261ece01ef514b2
Gerrit-Change-Number: 720
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:55:59 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

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

* [review] Make last_wait_event static
  2019-10-29 17:58 Tom Tromey (Code Review)
@ 2019-11-21 18:41 ` Pedro Alves (Code Review)
  0 siblings, 0 replies; 5+ messages in thread
From: Pedro Alves (Code Review) @ 2019-11-21 18:41 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/+/429
......................................................................


Patch Set 1: Code-Review+2

OK.


-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I929d63d03244def0b7fd26d2465a6ef09070cb83
Gerrit-Change-Number: 429
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:41:19 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

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

* [review] Make last_wait_event static
@ 2019-10-29 17:58 Tom Tromey (Code Review)
  2019-11-21 18:41 ` 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/+/429
......................................................................

Make last_wait_event static

Now that last_wait_event is entirely handled in nat/windows-nat.c, it
can be made static.

Change-Id: I67ea86e1d2ede0b4e0fb96761261ece01ef514b2

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

	* nat/windows-nat.h (last_wait_event): Don't declare.
	(wait_for_debug_event): Update comment.
	* nat/windows-nat.c (last_wait_event): Now static.

Change-Id: I929d63d03244def0b7fd26d2465a6ef09070cb83
---
M gdb/ChangeLog
M gdb/nat/windows-nat.c
M gdb/nat/windows-nat.h
3 files changed, 15 insertions(+), 9 deletions(-)



diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6ac74cd..dbd1aeb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
 2019-10-29  Tom Tromey  <tromey@adacore.com>
 
+	* nat/windows-nat.h (last_wait_event): Don't declare.
+	(wait_for_debug_event): Update comment.
+	* nat/windows-nat.c (last_wait_event): Now static.
+
+2019-10-29  Tom Tromey  <tromey@adacore.com>
+
 	* windows-nat.c (wait_for_debug_event): Move to
 	nat/windows-nat.c.
 	* nat/windows-nat.h (wait_for_debug_event): Declare.
diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c
index 133fc9c..8ebde45 100644
--- a/gdb/nat/windows-nat.c
+++ b/gdb/nat/windows-nat.c
@@ -28,7 +28,14 @@
 DWORD main_thread_id;
 enum gdb_signal last_sig = GDB_SIGNAL_0;
 DEBUG_EVENT current_event;
-DEBUG_EVENT last_wait_event;
+
+/* The most recent event from WaitForDebugEvent.  Unlike
+   current_event, this is guaranteed never to come from a pending
+   stop.  This is important because only data from the most recent
+   event from WaitForDebugEvent can be used when calling
+   ContinueDebugEvent.  */
+static DEBUG_EVENT last_wait_event;
+
 windows_thread_info *current_windows_thread;
 DWORD desired_stop_thread_id = -1;
 std::vector<pending_stop> pending_stops;
diff --git a/gdb/nat/windows-nat.h b/gdb/nat/windows-nat.h
index 3ab1af6..235ac1a 100644
--- a/gdb/nat/windows-nat.h
+++ b/gdb/nat/windows-nat.h
@@ -148,13 +148,6 @@
    stop.  */
 extern DEBUG_EVENT current_event;
 
-/* The most recent event from WaitForDebugEvent.  Unlike
-   current_event, this is guaranteed never to come from a pending
-   stop.  This is important because only data from the most recent
-   event from WaitForDebugEvent can be used when calling
-   ContinueDebugEvent.  */
-extern DEBUG_EVENT last_wait_event;
-
 /* Info on currently selected thread */
 extern windows_thread_info *current_windows_thread;
 
@@ -228,7 +221,7 @@
 extern BOOL continue_last_debug_event (DWORD continue_status,
 				       bool debug_events);
 
-/* A simple wrapper for WaitForDebugEvent that also sets
+/* A simple wrapper for WaitForDebugEvent that also sets the internal
    'last_wait_event' on success.  */
 
 extern BOOL wait_for_debug_event (DEBUG_EVENT *event, DWORD timeout);

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I929d63d03244def0b7fd26d2465a6ef09070cb83
Gerrit-Change-Number: 429
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:56 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:21 [review] Make last_wait_event static Tom Tromey (Code Review)
2019-11-27  1:04 ` Luis Machado (Code Review)
2019-11-29 20:56 ` 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:41 ` 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).