diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 542e9a9aa6f..64619ee2a53 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,11 @@ +2009-11-26 Pedro Alves + + * win32-low.c (LOG): Delete. + (OUTMSG): Output to stderr. + (OUTMSG2): Conditionalize on `debug_threads' variable, instead of + on compile time LOG macro. + (win32_wait): Fix debug output. + 2009-11-26 Pedro Alves * win32-low.c (win32_add_one_solib): If the dll name is diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c index ff46b2de282..3b9ae591329 100644 --- a/gdb/gdbserver/win32-low.c +++ b/gdb/gdbserver/win32-low.c @@ -38,14 +38,17 @@ #include #endif -#define LOG 0 +#define OUTMSG(X) do { printf X; fflush (stderr); } while (0) -#define OUTMSG(X) do { printf X; fflush (stdout); } while (0) -#if LOG -#define OUTMSG2(X) do { printf X; fflush (stdout); } while (0) -#else -#define OUTMSG2(X) do ; while (0) -#endif +#define OUTMSG2(X) \ + do \ + { \ + if (debug_threads) \ + { \ + printf X; \ + fflush (stderr); \ + } \ + } while (0) #ifndef _T #define _T(x) TEXT (x) @@ -1586,7 +1589,7 @@ win32_wait (ptid_t ptid, struct target_waitstatus *ourstatus, int options) case TARGET_WAITKIND_STOPPED: case TARGET_WAITKIND_LOADED: OUTMSG2 (("Child Stopped with signal = %d \n", - our_status.value.sig)); + ourstatus->value.sig)); child_fetch_inferior_registers (-1);