[binutils-gdb] Windows gdb: Pending stop and current_event

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=95ddaed645ce1797ae88e26fa9f2e632f707e7c3

commit 95ddaed645ce1797ae88e26fa9f2e632f707e7c3
Author: Pedro Alves <[email protected]>
Date:   Thu May 18 19:13:45 2023 +0100

    Windows gdb: Pending stop and current_event
    
    I noticed that windows_nat_target::get_windows_debug_event does not
    copy the event recorded in pending stop to
    windows_process.current_event.  This seems like an oversight.  The
    equivalent code in gdbserver/win32-low.cc does copy it.
    
    This change will become moot later in the series, but I figure its
    still clearer to correct the buglet as preparatory patch.
    
    Approved-By: Tom Tromey <[email protected]>
    Change-Id: Ic8935d854cf67a3a3c4edcbc1a1e8957b800d907

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

diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 2ecb8a105c0..89b7f103dc3 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -911,6 +911,7 @@ windows_nat_target::get_windows_debug_event
     {
       thread_id = stop->thread_id;
       *ourstatus = stop->status;
+      windows_process->current_event = stop->event;
 
       ptid_t ptid (windows_process->current_event.dwProcessId, thread_id);
       windows_thread_info *th = windows_process->find_thread (ptid);
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.