[14/34] Windows gdb: Pending stop and current_event

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

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed

Commit Message

Pedro Alves May 7, 2024, 11:42 p.m. UTC
  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.

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

Comments

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

Pedro> I noticed that windows_nat_target::get_windows_debug_event does not
Pedro> copy the event recorded in pending stop to
Pedro> windows_process.current_event.  This seems like an oversight.  The
Pedro> equivalent code in gdbserver/win32-low.cc does copy it.

Pedro> This change will become moot later in the series, but I figure its
Pedro> still clearer to correct the buglet as preparatory patch.

Ok.
Approved-By: Tom Tromey <tom@tromey.com>

I wonder if this is observable in any way.

Tom
  

Patch

diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index fb14d8eb55f..196f6a1f72d 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -1555,6 +1555,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);