]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Windows gdb: Pending stop and current_event
authorPedro Alves <pedro@palves.net>
Thu, 18 May 2023 18:13:45 +0000 (19:13 +0100)
committerPedro Alves <pedro@palves.net>
Mon, 19 May 2025 13:12:37 +0000 (14:12 +0100)
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 <tom@tromey.com>
Change-Id: Ic8935d854cf67a3a3c4edcbc1a1e8957b800d907

gdb/windows-nat.c

index 1f6293aa8c07f249be71c99ad945fbc6e6d1cc86..2bed29edc502fa18fb044ab6079a0d17b59583a5 100644 (file)
@@ -1452,6 +1452,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);