[01/34] Windows gdb: Dead code in windows_nat_target::do_initial_windows_stuff

Message ID 20240507234233.371123-2-pedro@palves.net
State New
Headers
Series Windows non-stop mode |

Commit Message

Pedro Alves May 7, 2024, 11:42 p.m. UTC
  In windows_nat_target::do_initial_windows_stuff, there's no point in
setting windows_process.current_event.dwProcessId.  It's a nop, given
the following memset.

Change-Id: I2fe460341b598ad293ea60d5f702b10cefc30711
---
 gdb/windows-nat.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Tom Tromey May 8, 2024, 2:39 p.m. UTC | #1
>>>>> "Pedro" == Pedro Alves <pedro@palves.net> writes:

Pedro> In windows_nat_target::do_initial_windows_stuff, there's no point in
Pedro> setting windows_process.current_event.dwProcessId.  It's a nop, given
Pedro> the following memset.

This one looks obvious to me.
Approved-By: Tom Tromey <tom@tromey.com>

Tom
  

Patch

diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 70f955d9797..5578ae250a6 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -1900,7 +1900,6 @@  windows_nat_target::do_initial_windows_stuff (DWORD pid, bool attaching)
   windows_process.cygwin_load_start = 0;
   windows_process.cygwin_load_end = 0;
 #endif
-  windows_process.current_event.dwProcessId = pid;
   memset (&windows_process.current_event, 0,
 	  sizeof (windows_process.current_event));
   inf = current_inferior ();