aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtk.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@cygnus>1998-03-28 20:16:06 +0000
committerKeith Seitz <keiths@cygnus>1998-03-28 20:16:06 +0000
commit0b7148e4f570aebd9d7f340efed2f7b92726992c (patch)
tree85d33e75bf2980e2fb3a2d90f55e7138b2b4ced2 /gdb/gdbtk.c
parent1d33e9461551c661d32213568df5a9b1ce9b326d (diff)
downloadgdb-0b7148e4f570aebd9d7f340efed2f7b92726992c.zip
gdb-0b7148e4f570aebd9d7f340efed2f7b92726992c.tar.gz
gdb-0b7148e4f570aebd9d7f340efed2f7b92726992c.tar.bz2
* gdbtk.c (gdb_cmd): If argc > 2, assume that the busy and idle hooks
should not be called.
Diffstat (limited to 'gdb/gdbtk.c')
-rw-r--r--gdb/gdbtk.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c
index d9a0324..3309154 100644
--- a/gdb/gdbtk.c
+++ b/gdb/gdbtk.c
@@ -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);