[binutils-gdb] Windows gdb: Dead code in windows_nat_target::do_initial_windows_stuff

Pedro Alves via Gdb-cvs <[email protected]>
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fb1546987b21e3a63e43d4587d320fcbddf83025

commit fb1546987b21e3a63e43d4587d320fcbddf83025
Author: Pedro Alves <[email protected]>
Date:   Tue May 2 20:42:35 2023 +0100

    Windows gdb: Dead code in windows_nat_target::do_initial_windows_stuff
    
    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.
    
    Approved-By: Tom Tromey <[email protected]>
    Change-Id: I2fe460341b598ad293ea60d5f702b10cefc30711

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

diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index d1328375e55..507a25199c8 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -1235,7 +1235,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 ();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.