diff options
author | Stu Grossman <grossman@cygnus> | 1995-01-26 02:27:06 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1995-01-26 02:27:06 +0000 |
commit | b66051ec1950ddd647fbfa629bcec40ba8bd5d25 (patch) | |
tree | ffc98ed0640a34c74cdbd2bd5d623f42c6a394e7 /gdb/gdbtk.c | |
parent | ee3a45e7b7974472247806e364a034a230b3d61e (diff) | |
download | gdb-b66051ec1950ddd647fbfa629bcec40ba8bd5d25.zip gdb-b66051ec1950ddd647fbfa629bcec40ba8bd5d25.tar.gz gdb-b66051ec1950ddd647fbfa629bcec40ba8bd5d25.tar.bz2 |
* gdbtk.c (gdbtk_init): Prevent segfault when gdbtk.tcl can't be
found.
* gdbtk.tcl: Initialize expr_update_list() to prevent errors when
popping up expression window for the first time.
Diffstat (limited to 'gdb/gdbtk.c')
-rw-r--r-- | gdb/gdbtk.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c index ca7ef40..35b2a91 100644 --- a/gdb/gdbtk.c +++ b/gdb/gdbtk.c @@ -1184,11 +1184,16 @@ gdbtk_init () if (Tcl_EvalFile (interp, gdbtk_filename) != TCL_OK) { + char *err; + fputs_unfiltered_hook = NULL; /* Force errors to stdout/stderr */ fprintf_unfiltered (stderr, "%s:%d: %s\n", gdbtk_filename, interp->errorLine, interp->result); - error ("Stack trace:\n%s", Tcl_GetVar (interp, "errorInfo", 0)); + + fputs_unfiltered ("Stack trace:\n", gdb_stderr); + fputs_unfiltered (Tcl_GetVar (interp, "errorInfo", 0), gdb_stderr); + error (""); } discard_cleanups (old_chain); |