Use debug_printf in windows-nat.c
authorTom Tromey <tromey@adacore.com>
Wed, 15 Apr 2020 18:37:29 +0000 (12:37 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 15 Apr 2020 18:49:05 +0000 (12:49 -0600)
While debugging a bug on Windows, I noticed that windows-nat.c is not
sending its debugging output to gdb_stdlog.  This is unfortunate
because it means that "set logging debugredirect" doesn't work
properly.

This patch fixes the problem by changing windows-nat.c to use
debug_printf.

Note that get_windows_debug_event also writes one debugging message
unconditionally.  It isn't clear to me if this really ought to use
DEBUG_EVENTS or not, since it seems like perhaps it is intended to
note an unexpected event occurring.  So, I didn't change this.

I'm checking this in.

gdb/ChangeLog
2020-04-15  Tom Tromey  <tromey@adacore.com>

* windows-nat.c (DEBUG_EXEC, DEBUG_EVENTS, DEBUG_MEM)
(DEBUG_EXCEPT): Use debug_printf.

gdb/ChangeLog
gdb/windows-nat.c

index bb5ddeca70f130c20d9793e4b0b95d4b21bc0b32..b0a535a624fa47dff4babeebda930b4c22ee098f 100644 (file)
@@ -1,3 +1,8 @@
+2020-04-15  Tom Tromey  <tromey@adacore.com>
+
+       * windows-nat.c (DEBUG_EXEC, DEBUG_EVENTS, DEBUG_MEM)
+       (DEBUG_EXCEPT): Use debug_printf.
+
 2020-04-15  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * completer.c (class completion_tracker::completion_hash_entry)
index 613153bfac6fc48f70f4cf6065951a59467d3e1c..e82e58ec1f2ea15e918794b3b2d752ab81daafad 100644 (file)
@@ -217,10 +217,10 @@ static int windows_initialization_done;
 #endif
 
 #define CHECK(x)       check (x, __FILE__,__LINE__)
-#define DEBUG_EXEC(x)  if (debug_exec)         printf_unfiltered x
-#define DEBUG_EVENTS(x)        if (debug_events)       printf_unfiltered x
-#define DEBUG_MEM(x)   if (debug_memory)       printf_unfiltered x
-#define DEBUG_EXCEPT(x)        if (debug_exceptions)   printf_unfiltered x
+#define DEBUG_EXEC(x)  if (debug_exec)         debug_printf x
+#define DEBUG_EVENTS(x)        if (debug_events)       debug_printf x
+#define DEBUG_MEM(x)   if (debug_memory)       debug_printf x
+#define DEBUG_EXCEPT(x)        if (debug_exceptions)   debug_printf x
 
 static void cygwin_set_dr (int i, CORE_ADDR addr);
 static void cygwin_set_dr7 (unsigned long val);
This page took 0.029869 seconds and 4 git commands to generate.