]> code.delx.au - gnu-emacs/commitdiff
(print_output_debug_flag): New global variable.
authorEli Zaretskii <eliz@gnu.org>
Sat, 25 Mar 2006 17:58:37 +0000 (17:58 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 25 Mar 2006 17:58:37 +0000 (17:58 +0000)
(Fexternal_debugging_output) [WINDOWSNT]: Don't call OutputDebugString if
print_output_debug_flag is zero.

src/print.c

index 622101f2c537bcdad2b403f317ec49fc5c305dc5..3a286361a8cd06ee9d9ac3b154def7639e7b1ea3 100644 (file)
@@ -182,6 +182,9 @@ static int max_print;
 
 void print_interval ();
 
+/* GDB resets this to zero on W32 to disable OutputDebugString calls.  */
+int print_output_debug_flag = 1;
+
 \f
 /* Low level output routines for characters and strings */
 
@@ -909,10 +912,11 @@ to make it write to the debugging output.  */)
 
 #ifdef WINDOWSNT
   /* Send the output to a debugger (nothing happens if there isn't one).  */
-  {
-    char buf[2] = {(char) XINT (character), '\0'};
-    OutputDebugString (buf);
-  }
+  if (print_output_debug_flag)
+    {
+      char buf[2] = {(char) XINT (character), '\0'};
+      OutputDebugString (buf);
+    }
 #endif
 
   return character;