Fix debugging of WOW64 processes
The new code regarding pending stops only checks for EXCEPTION_BREAKPOINT, but for WOW64 processes STATUS_WX86_BREAKPOINT is necessary as well. Also, ignore_first_breakpoint is used now in nat/windows-nat.c as well, but was not available there. gdb/ChangeLog: 2020-04-10 Hannes Domani <ssbssa@yahoo.de> * nat/windows-nat.c (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP): Move to... * nat/windows-nat.h (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP): ... here. * windows-nat.c (windows_nat_target::get_windows_debug_event): Check for STATUS_WX86_BREAKPOINT. (windows_nat_target::wait): Same.
This commit is contained in:
parent
a5d214978f
commit
13302e956f
4 changed files with 30 additions and 8 deletions
|
@ -235,7 +235,6 @@ static int saw_create;
|
|||
static int open_process_used = 0;
|
||||
#ifdef __x86_64__
|
||||
static bool wow64_process = false;
|
||||
static bool ignore_first_breakpoint = false;
|
||||
#endif
|
||||
|
||||
/* User options. */
|
||||
|
@ -1721,8 +1720,10 @@ windows_nat_target::get_windows_debug_event (int pid,
|
|||
thread_id, desired_stop_thread_id));
|
||||
|
||||
if (current_event.dwDebugEventCode == EXCEPTION_DEBUG_EVENT
|
||||
&& (current_event.u.Exception.ExceptionRecord.ExceptionCode
|
||||
== EXCEPTION_BREAKPOINT)
|
||||
&& ((current_event.u.Exception.ExceptionRecord.ExceptionCode
|
||||
== EXCEPTION_BREAKPOINT)
|
||||
|| (current_event.u.Exception.ExceptionRecord.ExceptionCode
|
||||
== STATUS_WX86_BREAKPOINT))
|
||||
&& windows_initialization_done)
|
||||
{
|
||||
ptid_t ptid = ptid_t (current_event.dwProcessId, thread_id, 0);
|
||||
|
@ -1801,8 +1802,10 @@ windows_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
|
|||
{
|
||||
current_windows_thread->stopped_at_software_breakpoint = false;
|
||||
if (current_event.dwDebugEventCode == EXCEPTION_DEBUG_EVENT
|
||||
&& (current_event.u.Exception.ExceptionRecord.ExceptionCode
|
||||
== EXCEPTION_BREAKPOINT)
|
||||
&& ((current_event.u.Exception.ExceptionRecord.ExceptionCode
|
||||
== EXCEPTION_BREAKPOINT)
|
||||
|| (current_event.u.Exception.ExceptionRecord.ExceptionCode
|
||||
== STATUS_WX86_BREAKPOINT))
|
||||
&& windows_initialization_done)
|
||||
current_windows_thread->stopped_at_software_breakpoint = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue