* 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.
This commit is contained in:
Stu Grossman 1995-01-26 02:27:06 +00:00
parent ee3a45e7b7
commit b66051ec19
3 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,10 @@
Wed Jan 25 18:23:46 1995 Stu Grossman (grossman@cygnus.com)
* 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.
Wed Jan 25 18:13:14 1995 Per Bothner <bothner@kalessin.cygnus.com>
* eval.c (evaluate_subexp case OP_ARRAY): Fix calls to memset:

View File

@ -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);

View File

@ -31,6 +31,7 @@ set cfunc NIL
set line_numbers 1
set breakpoint_file(-1) {[garbage]}
set disassemble_with_source nosource
set expr_update_list(0) 0
#option add *Foreground Black
#option add *Background White