* gdbtk.c (gdb_cmd): If argc > 2, assume that the busy and idle hooks

should not be called.
This commit is contained in:
Keith Seitz 1998-03-28 20:16:06 +00:00
parent 1d33e94615
commit 0b7148e4f5
2 changed files with 20 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Sat Mar 28 12:13:23 1998 Keith Seitz <keiths@onions.cygnus.com>
* gdbtk.c (gdb_cmd): If argc > 2, assume that the busy and idle hooks
should not be called.
Thu Mar 26 22:29:28 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdbtk.c: (gdb_trace_status) new function.

View file

@ -88,6 +88,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#undef SIOCSPGRP
#endif
static int No_Update = 0;
static int load_in_progress = 0;
static int in_fputs = 0;
@ -1081,6 +1082,8 @@ gdb_immediate_command (clientData, interp, argc, argv)
if (running_now || load_in_progress)
return TCL_OK;
No_Update = 0;
Tcl_DStringAppend (result_ptr, "", -1);
save_ptr = result_ptr;
result_ptr = NULL;
@ -1106,12 +1109,19 @@ gdb_cmd (clientData, interp, argc, argv)
{
Tcl_DString *save_ptr = NULL;
if (argc != 2)
if (argc < 2)
error ("wrong # args");
if (running_now || load_in_progress)
return TCL_OK;
/* If there is a third argument, it'll mean that we do NOT want to run
the idle and busy hooks when we call execute_command. */
if (argc > 2)
No_Update = 1;
else
No_Update = 0;
/* for the load instruction (and possibly others later) we
set result_ptr to NULL so gdbtk_fputs() will not buffer
all the data until the command is finished. */
@ -1904,10 +1914,12 @@ gdbtk_call_command (cmdblk, arg, from_tty)
if (cmdblk->class == class_run || cmdblk->class == class_trace)
{
running_now = 1;
Tcl_Eval (interp, "gdbtk_tcl_busy");
if (!No_Update)
Tcl_Eval (interp, "gdbtk_tcl_busy");
(*cmdblk->function.cfunc)(arg, from_tty);
running_now = 0;
Tcl_Eval (interp, "gdbtk_tcl_idle");
if (!No_Update)
Tcl_Eval (interp, "gdbtk_tcl_idle");
}
else
(*cmdblk->function.cfunc)(arg, from_tty);