public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Use debug_printf in windows-nat.c
@ 2020-04-15 18:49 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2020-04-15 18:49 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ce127a96c912965e0fe24906d6083e5e9c79a92f

commit ce127a96c912965e0fe24906d6083e5e9c79a92f
Author: Tom Tromey <tromey@adacore.com>
Date:   Wed Apr 15 12:37:29 2020 -0600

    Use debug_printf in windows-nat.c
    
    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.

Diff:
---
 gdb/ChangeLog     | 5 +++++
 gdb/windows-nat.c | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bb5ddeca70f..b0a535a624f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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)
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 613153bfac6..e82e58ec1f2 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-15 18:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15 18:49 [binutils-gdb] Use debug_printf in windows-nat.c Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).