From patchwork Tue Nov 26 17:11:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Simon Marchi (Code Review)" X-Patchwork-Id: 36226 Received: (qmail 96364 invoked by alias); 26 Nov 2019 17:12:13 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 95244 invoked by uid 89); 26 Nov 2019 17:12:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=HX-Languages-Length:2400 X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Nov 2019 17:12:03 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 3C4D920C08; Tue, 26 Nov 2019 12:12:01 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id 3DA1F20D22 for ; Tue, 26 Nov 2019 12:11:33 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id F1D6D28179 for ; Tue, 26 Nov 2019 12:11:32 -0500 (EST) X-Gerrit-PatchSet: 1 Date: Tue, 26 Nov 2019 12:11:32 -0500 From: "Tom Tromey (Code Review)" To: gdb-patches@sourceware.org Message-ID: Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange Subject: [review] Remove some globals from windows-nat.c X-Gerrit-Change-Id: I5e0553eb0627e5e764cc79aced3d451ab88bb04f X-Gerrit-Change-Number: 715 X-Gerrit-ChangeURL: X-Gerrit-Commit: 21353c11aefec38d10c02f8bbd39e2190836cacc References: Reply-To: tromey@sourceware.org, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/715 ...................................................................... Remove some globals from windows-nat.c windows-nat.c has a few "count" globals that don't seem to be used. Possibly they were used for debugging at some point, but they no longer seem useful to me. Because they get in the way of some code sharing, this patch removes them. gdb/ChangeLog 2019-11-26 Tom Tromey * windows-nat.c (exception_count, event_count): Remove. (handle_exception, get_windows_debug_event) (do_initial_windows_stuff): Update. Change-Id: I5e0553eb0627e5e764cc79aced3d451ab88bb04f --- M gdb/ChangeLog M gdb/windows-nat.c 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 188da7e..221a6e7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2019-11-26 Tom Tromey + * windows-nat.c (exception_count, event_count): Remove. + (handle_exception, get_windows_debug_event) + (do_initial_windows_stuff): Update. + +2019-11-26 Tom Tromey + * windows-nat.c (windows_nat::handle_load_dll) (windows_nat::handle_unload_dll): Rename. No longer static. * nat/windows-nat.h (handle_load_dll, handle_unload_dll): diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index caa71dd..c046f91 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -217,8 +217,6 @@ /* Counts of things. */ -static int exception_count = 0; -static int event_count = 0; static int saw_create; static int open_process_used = 0; @@ -1234,7 +1232,6 @@ ourstatus->value.sig = GDB_SIGNAL_UNKNOWN; break; } - exception_count++; last_sig = ourstatus->value.sig; return result; } @@ -1519,7 +1516,6 @@ if (!(debug_event = wait_for_debug_event (¤t_event, 1000))) goto out; - event_count++; continue_status = DBG_CONTINUE; event_code = current_event.dwDebugEventCode; @@ -1853,8 +1849,6 @@ struct inferior *inf; last_sig = GDB_SIGNAL_0; - event_count = 0; - exception_count = 0; open_process_used = 0; debug_registers_changed = 0; debug_registers_used = 0;