From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1]) by sourceware.org (Postfix) with ESMTP id 3E36C3AAA097 for ; Fri, 13 Mar 2020 19:09:05 +0000 (GMT) Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 37EAB561B1; Fri, 13 Mar 2020 15:09:05 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Qyc2ZFCFm6l1; Fri, 13 Mar 2020 15:09:05 -0400 (EDT) Received: from murgatroyd.Home (184-96-250-69.hlrn.qwest.net [184.96.250.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id E8264561B4; Fri, 13 Mar 2020 15:09:04 -0400 (EDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v3 25/29] Make last_wait_event static Date: Fri, 13 Mar 2020 13:08:51 -0600 Message-Id: <20200313190855.28662-26-tromey@adacore.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200313190855.28662-1-tromey@adacore.com> References: <20200313190855.28662-1-tromey@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-25.0 required=5.0 tests=GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 19:09:05 -0000 Now that last_wait_event is entirely handled in nat/windows-nat.c, it can be made static. gdb/ChangeLog 2020-03-13 Tom Tromey * 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. --- gdb/ChangeLog | 6 ++++++ gdb/nat/windows-nat.c | 9 ++++++++- gdb/nat/windows-nat.h | 9 +-------- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c index bb28e9b13c7..94e7f572c0a 100644 --- a/gdb/nat/windows-nat.c +++ b/gdb/nat/windows-nat.c @@ -31,7 +31,14 @@ DWORD current_process_id; 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_stops; diff --git a/gdb/nat/windows-nat.h b/gdb/nat/windows-nat.h index 846fa67f407..0597120c218 100644 --- a/gdb/nat/windows-nat.h +++ b/gdb/nat/windows-nat.h @@ -165,13 +165,6 @@ extern enum gdb_signal last_sig; 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; @@ -245,7 +238,7 @@ extern gdb::optional fetch_pending_stop (bool debug_events); 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); -- 2.21.1