}
}
+/* Implement win32_target_ops "is_sw_breakpoint" method. */
+
+static bool
+i386_is_sw_breakpoint (const EXCEPTION_RECORD *er)
+{
+ return (er->ExceptionCode == EXCEPTION_BREAKPOINT
+ || er->ExceptionCode == STATUS_WX86_BREAKPOINT);
+}
+
struct win32_target_ops the_low_target = {
i386_arch_setup,
i386_win32_num_regs,
i386_remove_point,
x86_stopped_by_watchpoint,
x86_stopped_data_addresses,
+ i386_is_sw_breakpoint,
};
th->stopped_at_software_breakpoint = false;
if (windows_process.current_event.dwDebugEventCode == EXCEPTION_DEBUG_EVENT
- && ((windows_process.current_event.u.Exception.ExceptionRecord.ExceptionCode
- == EXCEPTION_BREAKPOINT)
- || (windows_process.current_event.u.Exception.ExceptionRecord.ExceptionCode
- == STATUS_WX86_BREAKPOINT))
+ && (*the_low_target.is_sw_breakpoint) (&windows_process.current_event
+ .u.Exception.ExceptionRecord)
&& windows_process.child_initialization_done)
{
th->stopped_at_software_breakpoint = true;
int size, struct raw_breakpoint *bp);
int (*stopped_by_watchpoint) (void);
std::vector<CORE_ADDR> (*stopped_data_addresses) ();
+
+ /* Determine if ER contains a software-breakpoint. */
+ bool (*is_sw_breakpoint) (const EXCEPTION_RECORD *er);
};
extern struct win32_target_ops the_low_target;