+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,
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
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;
}
}
-/* 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