mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-12-04 10:24:13 +00:00
* gdbtk.c (gdbtk_init): Improve handling for errors in gdbtk.tcl
during startup.
This commit is contained in:
parent
b04a78d487
commit
724498fdc0
@ -1,3 +1,8 @@
|
||||
Wed Jan 11 17:06:55 1995 Stu Grossman (grossman@cygnus.com)
|
||||
|
||||
* gdbtk.c (gdbtk_init): Improve handling for errors in gdbtk.tcl
|
||||
during startup.
|
||||
|
||||
Wed Jan 11 17:53:26 1995 Rob Savoye <rob@darkstar.cygnus.com>
|
||||
|
||||
* array-rom.c: Add support for most commands.
|
||||
|
14
gdb/gdbtk.c
14
gdb/gdbtk.c
@ -1096,7 +1096,6 @@ gdbtk_init ()
|
||||
Tcl_CreateCommand (interp, "gdb_eval", call_wrapper, gdb_eval, NULL);
|
||||
|
||||
command_loop_hook = Tk_MainLoop;
|
||||
fputs_unfiltered_hook = gdbtk_fputs;
|
||||
print_frame_info_listing_hook = null_routine;
|
||||
query_hook = gdbtk_query;
|
||||
flush_hook = gdbtk_flush;
|
||||
@ -1154,8 +1153,19 @@ gdbtk_init ()
|
||||
else
|
||||
gdbtk_filename = GDBTK_FILENAME;
|
||||
|
||||
/* 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;
|
||||
|
||||
if (Tcl_EvalFile (interp, gdbtk_filename) != TCL_OK)
|
||||
error ("Failure reading %s: %s", gdbtk_filename, interp->result);
|
||||
{
|
||||
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));
|
||||
}
|
||||
|
||||
discard_cleanups (old_chain);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user