diff options
Diffstat (limited to 'gdb/nat')
-rw-r--r-- | gdb/nat/windows-nat.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c index bdf6f3f..659a756 100644 --- a/gdb/nat/windows-nat.c +++ b/gdb/nat/windows-nat.c @@ -47,7 +47,9 @@ bool ignore_first_breakpoint = false; /* Note that 'debug_events' must be locally defined in the relevant functions. */ -#define DEBUG_EVENTS(x) if (debug_events) debug_printf x +#define DEBUG_EVENTS(fmt, ...) \ + debug_prefixed_printf_cond (debug_events, "windows events", fmt, \ + ## __VA_ARGS__) windows_thread_info::~windows_thread_info () { @@ -334,9 +336,8 @@ matching_pending_stop (bool debug_events) if (desired_stop_thread_id == -1 || desired_stop_thread_id == item.thread_id) { - DEBUG_EVENTS (("windows_continue - pending stop anticipated, " - "desired=0x%x, item=0x%x\n", - desired_stop_thread_id, item.thread_id)); + DEBUG_EVENTS ("pending stop anticipated, desired=0x%x, item=0x%x", + desired_stop_thread_id, item.thread_id); return true; } } @@ -360,9 +361,8 @@ fetch_pending_stop (bool debug_events) result = *iter; current_event = iter->event; - DEBUG_EVENTS (("get_windows_debug_event - " - "pending stop found in 0x%x (desired=0x%x)\n", - iter->thread_id, desired_stop_thread_id)); + DEBUG_EVENTS ("pending stop found in 0x%x (desired=0x%x)", + iter->thread_id, desired_stop_thread_id); pending_stops.erase (iter); break; @@ -377,11 +377,11 @@ fetch_pending_stop (bool debug_events) BOOL continue_last_debug_event (DWORD continue_status, bool debug_events) { - DEBUG_EVENTS (("ContinueDebugEvent (cpid=%d, ctid=0x%x, %s);\n", - (unsigned) last_wait_event.dwProcessId, - (unsigned) last_wait_event.dwThreadId, - continue_status == DBG_CONTINUE ? - "DBG_CONTINUE" : "DBG_EXCEPTION_NOT_HANDLED")); + DEBUG_EVENTS ("ContinueDebugEvent (cpid=%d, ctid=0x%x, %s)", + (unsigned) last_wait_event.dwProcessId, + (unsigned) last_wait_event.dwThreadId, + continue_status == DBG_CONTINUE ? + "DBG_CONTINUE" : "DBG_EXCEPTION_NOT_HANDLED"); return ContinueDebugEvent (last_wait_event.dwProcessId, last_wait_event.dwThreadId, |