+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.
+
2020-04-10 Tom de Vries <tdevries@suse.de>
PR cli/25808
#include "nat/windows-nat.h"
#include "gdbsupport/common-debug.h"
-#define STATUS_WX86_BREAKPOINT 0x4000001F
-#define STATUS_WX86_SINGLE_STEP 0x4000001E
-
namespace windows_nat
{
std::vector<pending_stop> pending_stops;
EXCEPTION_RECORD siginfo_er;
+#ifdef __x86_64__
+bool ignore_first_breakpoint = false;
+#endif
+
/* Note that 'debug_events' must be locally defined in the relevant
functions. */
#define DEBUG_EVENTS(x) if (debug_events) debug_printf x
#include "gdbsupport/gdb_optional.h"
#include "target/waitstatus.h"
+#define STATUS_WX86_BREAKPOINT 0x4000001F
+#define STATUS_WX86_SINGLE_STEP 0x4000001E
+
namespace windows_nat
{
/* Contents of $_siginfo */
extern EXCEPTION_RECORD siginfo_er;
+#ifdef __x86_64__
+/* Ignore first breakpoint exception of WOW64 process */
+extern bool ignore_first_breakpoint;
+#endif
+
/* Return the name of the DLL referenced by H at ADDRESS. UNICODE
determines what sort of string is read from the inferior. Returns
the name of the DLL, or NULL on error. If a name is returned, it
static int open_process_used = 0;
#ifdef __x86_64__
static bool wow64_process = false;
-static bool ignore_first_breakpoint = false;
#endif
/* User options. */
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);
{
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;
}