aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>1999-01-30 04:20:31 +0000
committerJim Ingham <jingham@apple.com>1999-01-30 04:20:31 +0000
commit1d70b547cb62cd3b23dfc5df091e119eed78ccc7 (patch)
tree4ca7435e9d36882ac5e3a01836242f0c9636aff7
parentb845066654fb6cf4ec1ffb9724e035364286924c (diff)
downloadgdb-1d70b547cb62cd3b23dfc5df091e119eed78ccc7.zip
gdb-1d70b547cb62cd3b23dfc5df091e119eed78ccc7.tar.gz
gdb-1d70b547cb62cd3b23dfc5df091e119eed78ccc7.tar.bz2
1999-01-29 James Ingham <jingham@cygnus.com>
* gdbtk.c (gdbtk_init): Set the fputs_unfiltered_hook to gdbtk_fputs BEFORE you eval script. The old code was setting it to null until after you did this, but that is wrong, because it will cause the output of CAUGHT errors to go to gdb_stderr, which is wrong. You only want to write errors to the console if the eval generates an error.
-rw-r--r--gdb/ChangeLog-gdbtk9
-rw-r--r--gdb/gdbtk.c10
2 files changed, 13 insertions, 6 deletions
diff --git a/gdb/ChangeLog-gdbtk b/gdb/ChangeLog-gdbtk
index 9bfc149..d3de720 100644
--- a/gdb/ChangeLog-gdbtk
+++ b/gdb/ChangeLog-gdbtk
@@ -1,3 +1,12 @@
+1999-01-29 James Ingham <jingham@cygnus.com>
+
+ * gdbtk.c (gdbtk_init): Set the fputs_unfiltered_hook to
+ gdbtk_fputs BEFORE you eval script. The old code was setting it
+ to null until after you did this, but that is wrong, because it
+ will cause the output of CAUGHT errors to go to gdb_stderr, which
+ is wrong. You only want to write errors to the console if the
+ eval generates an error.
+
1999-01-29 Martin Hunt <hunt@cygnus.com>
* gdbtk-cmds.c (gdb_get_breakpoint_info): When printing addresses,
diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c
index 61075fb..3e96505 100644
--- a/gdb/gdbtk.c
+++ b/gdb/gdbtk.c
@@ -558,7 +558,7 @@ proc gdbtk_find_main {} {\n\
gdbtk_find_main";
#endif /* NO_TCLPRO_DEBUGGER */
- fputs_unfiltered_hook = NULL; /* Force errors to stdout/stderr */
+ /* fputs_unfiltered_hook = NULL; */ /* Force errors to stdout/stderr */
/*
* Set the variables for external editor, do this before eval'ing main.tcl
@@ -570,7 +570,9 @@ gdbtk_find_main";
Tcl_SetVar (gdbtk_interp, "external_editor_command",
external_editor_command, 0);
- if (Tcl_GlobalEval (gdbtk_interp, (char *) script) != TCL_OK)
+ fputs_unfiltered_hook = gdbtk_fputs;
+
+ if (Tcl_GlobalEval (gdbtk_interp, (char *) script) != TCL_OK)
{
char *msg;
@@ -592,10 +594,6 @@ gdbtk_find_main";
}
}
-/* Defer setup of fputs_unfiltered_hook to near the end so that error messages
- prior to this point go to stdout/stderr. */
-
- fputs_unfiltered_hook = gdbtk_fputs;
/* start-sanitize-ide */
#ifdef IDE