diff options
author | Pedro Alves <palves@redhat.com> | 2009-11-26 22:16:29 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2009-11-26 22:16:29 +0000 |
commit | 103579754b2cae70f41b0420cc266b03aab77c87 (patch) | |
tree | a8798d34db08f657d6f85616def790c621d4f869 /gdb/gdbserver/win32-low.c | |
parent | cf6e347119cedaea5da620bda5c2c94eeb73fab6 (diff) | |
download | gdb-103579754b2cae70f41b0420cc266b03aab77c87.zip gdb-103579754b2cae70f41b0420cc266b03aab77c87.tar.gz gdb-103579754b2cae70f41b0420cc266b03aab77c87.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/gdbserver/win32-low.c')
-rw-r--r-- | gdb/gdbserver/win32-low.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c index ff46b2d..3b9ae59 100644 --- a/gdb/gdbserver/win32-low.c +++ b/gdb/gdbserver/win32-low.c @@ -38,14 +38,17 @@ #include <sys/cygwin.h> #endif -#define LOG 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 OUTMSG(X) do { printf X; fflush (stderr); } while (0) + +#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); |