summaryrefslogtreecommitdiff
path: root/overlay/mgdb/gdb/winnt-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'overlay/mgdb/gdb/winnt-nat.c')
-rw-r--r--overlay/mgdb/gdb/winnt-nat.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/overlay/mgdb/gdb/winnt-nat.c b/overlay/mgdb/gdb/winnt-nat.c
index 5e924dc..21b1e35 100644
--- a/overlay/mgdb/gdb/winnt-nat.c
+++ b/overlay/mgdb/gdb/winnt-nat.c
@@ -775,6 +775,7 @@ static struct __dbg_event * winnt_wait_event(ptid_t ptid)
struct winnt_process * pdbg;
struct winnt_process * pcap;
struct winnt_process * pidinfo;
+ struct winnt_thread * thread;
struct pollfd pollfdbuf[512];
struct pollfd * pfds;
struct pollfd * pfd;
@@ -820,6 +821,16 @@ static struct __dbg_event * winnt_wait_event(ptid_t ptid)
memcpy(&pidinfo->event,&event,sizeof(event));
+ if ((thread = winnt_get_thread(pidinfo,event.systid))) {
+ __dbg_regs_fetch(
+ pidinfo->pfd,event.systid,
+ &thread->regctx);
+
+ winnt_set_thread_context_state(
+ thread,
+ WINNT_THREAD_CONTEXT_READY);
+ }
+
return &pidinfo->event;
}