diff options
author | midipix <writeonce@midipix.org> | 2019-09-18 02:56:49 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2019-09-19 03:34:00 +0000 |
commit | fe1b075f7d999e4cc467727a7e5e7cef52c36935 (patch) | |
tree | a93e5ac6d74423d481c2c0c7e9f18b8e29881af0 /overlay/mgdb/gdb | |
parent | 76dafe56a4c06427cab68118c733768a14b4cd4b (diff) | |
download | chainport-fe1b075f7d999e4cc467727a7e5e7cef52c36935.tar.bz2 chainport-fe1b075f7d999e4cc467727a7e5e7cef52c36935.tar.xz |
mgdb: winnt_wait_event(): fetch registers whenever applicable.
Diffstat (limited to 'overlay/mgdb/gdb')
-rw-r--r-- | overlay/mgdb/gdb/winnt-nat.c | 11 |
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; } |