public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [review] Remove some globals from windows-nat.c
@ 2019-11-26 17:12 Tom Tromey (Code Review)
  2019-11-29 19:56 ` Pedro Alves (Code Review)
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey (Code Review) @ 2019-11-26 17:12 UTC (permalink / raw)
  To: gdb-patches

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  <tromey@adacore.com>

	* 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  <tromey@adacore.com>
 
+	* windows-nat.c (exception_count, event_count): Remove.
+	(handle_exception, get_windows_debug_event)
+	(do_initial_windows_stuff): Update.
+
+2019-11-26  Tom Tromey  <tromey@adacore.com>
+
 	* 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 (&current_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;

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

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

* [review] Remove some globals from windows-nat.c
  2019-11-26 17:12 [review] Remove some globals from windows-nat.c Tom Tromey (Code Review)
@ 2019-11-29 19:56 ` Pedro Alves (Code Review)
  0 siblings, 0 replies; 4+ messages in thread
From: Pedro Alves (Code Review) @ 2019-11-29 19:56 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/+/715
......................................................................


Patch Set 1: Code-Review+2


-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I5e0553eb0627e5e764cc79aced3d451ab88bb04f
Gerrit-Change-Number: 715
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-Comment-Date: Fri, 29 Nov 2019 19:56:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

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

* [review] Remove some globals from windows-nat.c
  2019-10-29 18:05 Tom Tromey (Code Review)
@ 2019-11-19 22:41 ` Pedro Alves (Code Review)
  0 siblings, 0 replies; 4+ messages in thread
From: Pedro Alves (Code Review) @ 2019-11-19 22: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/+/424
......................................................................


Patch Set 1: Code-Review+2

LGTM.


-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I44f3d150deefc9046ddcdc7321a8989bc4f7a16a
Gerrit-Change-Number: 424
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-Comment-Date: Tue, 19 Nov 2019 22:41:43 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

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

* [review] Remove some globals from windows-nat.c
@ 2019-10-29 18:05 Tom Tromey (Code Review)
  2019-11-19 22:41 ` Pedro Alves (Code Review)
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey (Code Review) @ 2019-10-29 18:05 UTC (permalink / raw)
  To: gdb-patches

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

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.

Change-Id: I5e0553eb0627e5e764cc79aced3d451ab88bb04f

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

	* windows-nat.c (exception_count, event_count): Remove.
	(handle_exception, get_windows_debug_event)
	(do_initial_windows_stuff): Update.

Change-Id: I44f3d150deefc9046ddcdc7321a8989bc4f7a16a
---
M gdb/ChangeLog
M gdb/windows-nat.c
2 files changed, 6 insertions(+), 6 deletions(-)



diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c8e9228..bf55033 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
 2019-10-29  Tom Tromey  <tromey@adacore.com>
 
+	* windows-nat.c (exception_count, event_count): Remove.
+	(handle_exception, get_windows_debug_event)
+	(do_initial_windows_stuff): Update.
+
+2019-10-29  Tom Tromey  <tromey@adacore.com>
+
 	* 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 8bad871..159b093 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;
 
@@ -1209,7 +1207,6 @@
       ourstatus->value.sig = GDB_SIGNAL_UNKNOWN;
       break;
     }
-  exception_count++;
   last_sig = ourstatus->value.sig;
   return result;
 }
@@ -1495,7 +1492,6 @@
   if (!(debug_event = wait_for_debug_event (&current_event, 1000)))
     goto out;
 
-  event_count++;
   continue_status = DBG_CONTINUE;
 
   event_code = current_event.dwDebugEventCode;
@@ -1827,8 +1823,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;

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

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

end of thread, other threads:[~2019-11-29 19:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 17:12 [review] Remove some globals from windows-nat.c Tom Tromey (Code Review)
2019-11-29 19:56 ` Pedro Alves (Code Review)
  -- strict thread matches above, loose matches on Subject: below --
2019-10-29 18:05 Tom Tromey (Code Review)
2019-11-19 22: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).