From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id E58663945060; Wed, 8 Apr 2020 20:51:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E58663945060 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Remove some globals from windows-nat.c X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: a816ba1897ae6939518d628cb58d6281c9b64a4f X-Git-Newrev: 29de418deeac717886df20ef0419240aa0dfc32a Message-Id: <20200408205100.E58663945060@sourceware.org> Date: Wed, 8 Apr 2020 20:51:00 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2020 20:51:01 -0000 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=29de418deeac717886df20ef0419240aa0dfc32a commit 29de418deeac717886df20ef0419240aa0dfc32a Author: Tom Tromey Date: Wed Apr 8 14:33:35 2020 -0600 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 2020-04-08 Tom Tromey * windows-nat.c (exception_count, event_count): Remove. (handle_exception, get_windows_debug_event) (do_initial_windows_stuff): Update. Diff: --- gdb/ChangeLog | 6 ++++++ gdb/windows-nat.c | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9a5e4168b1f..d8d5540aa43 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-04-08 Tom Tromey + + * windows-nat.c (exception_count, event_count): Remove. + (handle_exception, get_windows_debug_event) + (do_initial_windows_stuff): Update. + 2020-04-08 Tom Tromey * windows-nat.c (windows_nat::handle_load_dll) diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 81811681ef6..eb550259fe2 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -247,8 +247,6 @@ static unsigned long cygwin_get_dr7 (void); static std::vector thread_list; /* Counts of things. */ -static int exception_count = 0; -static int event_count = 0; static int saw_create; static int open_process_used = 0; #ifdef __x86_64__ @@ -1386,7 +1384,6 @@ handle_exception (struct target_waitstatus *ourstatus) ourstatus->value.sig = GDB_SIGNAL_UNKNOWN; break; } - exception_count++; last_sig = ourstatus->value.sig; return result; } @@ -1737,7 +1734,6 @@ windows_nat_target::get_windows_debug_event (int pid, if (!(debug_event = wait_for_debug_event (¤t_event, 1000))) goto out; - event_count++; continue_status = DBG_CONTINUE; event_code = current_event.dwDebugEventCode; @@ -2154,8 +2150,6 @@ do_initial_windows_stuff (struct target_ops *ops, DWORD pid, int attaching) 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;