diff options
author | Tom Tromey <tromey@adacore.com> | 2022-04-28 13:40:37 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-05-13 08:21:16 -0600 |
commit | 4eab18b566a0a10d8436eb221c606df4a2803edc (patch) | |
tree | 2cf9211b06e48d6a6db73c875cebb4083c4abe58 /gdbserver | |
parent | 0e90c441629bcf1f53ba484f7d855ed8eb68f138 (diff) | |
download | gdb-4eab18b566a0a10d8436eb221c606df4a2803edc.zip gdb-4eab18b566a0a10d8436eb221c606df4a2803edc.tar.gz gdb-4eab18b566a0a10d8436eb221c606df4a2803edc.tar.bz2 |
Remove windows_process_info::id
I noticed that windows_process_info::id is only used by gdbserver, and
not really necessary. This patch removes it.
Diffstat (limited to 'gdbserver')
-rw-r--r-- | gdbserver/win32-low.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc index 192ea46..5b91ab7 100644 --- a/gdbserver/win32-low.cc +++ b/gdbserver/win32-low.cc @@ -337,7 +337,6 @@ do_initial_child_stuff (HANDLE proch, DWORD pid, int attached) windows_process.last_sig = GDB_SIGNAL_0; windows_process.handle = proch; - windows_process.id = pid; windows_process.main_thread_id = 0; soft_interrupt_requested = 0; @@ -678,12 +677,12 @@ win32_process_target::create_inferior (const char *program, /* Wait till we are at 1st instruction in program, return new pid (assuming success). */ - cs.last_ptid = wait (ptid_t (windows_process.id), &cs.last_status, 0); + cs.last_ptid = wait (ptid_t (pi.dwProcessId), &cs.last_status, 0); /* Necessary for handle_v_kill. */ - signal_pid = windows_process.id; + signal_pid = pi.dwProcessId; - return windows_process.id; + return pi.dwProcessId; } /* Attach to a running process. @@ -816,7 +815,7 @@ win32_process_target::detach (process_info *process) resume.sig = 0; this->resume (&resume, 1); - if (!DebugActiveProcessStop (windows_process.id)) + if (!DebugActiveProcessStop (process->pid)) return -1; DebugSetProcessKillOnExit (FALSE); @@ -1375,7 +1374,7 @@ win32_process_target::write_memory (CORE_ADDR memaddr, void win32_process_target::request_interrupt () { - if (GenerateConsoleCtrlEvent (CTRL_BREAK_EVENT, windows_process.id)) + if (GenerateConsoleCtrlEvent (CTRL_BREAK_EVENT, signal_pid)) return; /* GenerateConsoleCtrlEvent can fail if process id being debugged is |