From: Keith Seitz Date: Sat, 28 Mar 1998 20:16:06 +0000 (+0000) Subject: * gdbtk.c (gdb_cmd): If argc > 2, assume that the busy and idle hooks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0b7148e4f570aebd9d7f340efed2f7b92726992c;p=binutils-gdb.git * gdbtk.c (gdb_cmd): If argc > 2, assume that the busy and idle hooks should not be called. --- diff --git a/gdb/ChangeLog-gdbtk b/gdb/ChangeLog-gdbtk index 1cba5565db3..0bb53f24bed 100644 --- a/gdb/ChangeLog-gdbtk +++ b/gdb/ChangeLog-gdbtk @@ -1,3 +1,8 @@ +Sat Mar 28 12:13:23 1998 Keith Seitz + + * 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 * gdbtk.c: (gdb_trace_status) new function. diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c index d9a0324a780..33091548a13 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);