[review] Make last_wait_event static
Commit Message
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(-)
Comments
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.
@@ -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.
@@ -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;
@@ -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);