changeset 8868:4d812facab0e

write debugging location info directly to std::cerr
author John W. Eaton <jwe@octave.org>
date Wed, 25 Feb 2009 03:02:28 -0500
parents ff89a265592b
children c3b743b1b1c6
files src/ChangeLog src/input.cc src/pt-eval.cc
diffstat 3 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Feb 25 02:44:24 2009 -0500
+++ b/src/ChangeLog	Wed Feb 25 03:02:28 2009 -0500
@@ -1,5 +1,10 @@
 2009-02-25  John W. Eaton  <jwe@octave.org>
 
+	* input.cc (get_debug_input): Write debugging location info
+	directly to std::cerr instead of calling message.
+	* pt-eval.cc (tree_evaluator::do_breakpoint): Write debugging
+	location info directly to std::cerr, not octave_stdout.
+
 	* defaults.h.in (OCTAVE_DOC_CACHE_FILE): New macro.
 	* defaults.cc (set_default_doc_cache_file): New function.
 	(install_defaults): Call it.
--- a/src/input.cc	Wed Feb 25 02:44:24 2009 -0500
+++ b/src/input.cc	Wed Feb 25 03:02:28 2009 -0500
@@ -645,7 +645,12 @@
   std::string msg = buf.str ();
 
   if (! msg.empty ())
-    message (Vgud_mode ? 0 : "keyboard", "%s", msg.c_str ());
+    {
+      if (! Vgud_mode)
+	std::cerr << "keyboard: ";
+
+      std::cerr << msg << std::endl;
+    }
 
   unwind_protect::begin_frame ("get_debug_input");
 
--- a/src/pt-eval.cc	Wed Feb 25 02:44:24 2009 -0500
+++ b/src/pt-eval.cc	Wed Feb 25 03:02:28 2009 -0500
@@ -1190,9 +1190,9 @@
       octave_function *xfcn = octave_call_stack::current ();
 
       if (xfcn)
-	octave_stdout << xfcn->name () << ": "; 
+	std::cerr << xfcn->name () << ": "; 
 
-      octave_stdout << "line " << l << ", " << "column " << c << std::endl;
+      std::cerr << "line " << l << ", " << "column " << c << std::endl;
 
       db_line = l;
       db_column = c;