OSDN Git Service

* library/interface.tcl (gdb_busy_hook): Deprecate.
authorKeith Seitz <keiths@redhat.com>
Thu, 31 May 2001 15:21:41 +0000 (15:21 +0000)
committerKeith Seitz <keiths@redhat.com>
Thu, 31 May 2001 15:21:41 +0000 (15:21 +0000)
(gdbtk_busy): Create and dispatch a BusyEvent instead
of running hooks.
* library/ehandler.ith (busy): New event handler.
* library/gdbevent.ith (BusyEvent): New event class.
* library/console.ith: Inherit from GDBEventHandler.
(busy): Match event handler definition.
* library/console.itb (busy): Ditto.
(constructor): Remove gdb_busy_event.
(destructor): Ditto.
* library/kod.ith (busy): Match event handler definition.
* library/kod.itb (busy): Ditto.
(constructor): Remove gdb_busy_hook.
(destructor): Ditto.
* library/memwin.ith (busy): Match event handler definition.
* library/memwin.itb (busy): Ditto.
(constructor): Remove gdb_busy_hook.
(destructor): Ditto.
* library/pluginwin.itcl (running): Rename to "busy" and
match event handler definition.
(consturctor): Remove gdb_busy_hook.
(destructor): Ditto.
* library/process.ith (busy): Match event handler definition.
* library/process.itb (busy): Ditto.
(constructor): Remove gdb_busy_hook.
(destructor): Ditto.
* library/regwin.ith (busy): Match event handler definition.
* library/regwin.itb (busy): Ditto.
(constructor): Remove gdb_busy_hook.
(destructor): Ditto.
* library/srcbar.itcl (constructor): Remove gdb_busy_hook.
(destructor): Ditto.
(busy): New method.
* library/srcwin.ith (busy): Match event handler definition.
* library/srcwin.itb (busy): Ditto.
Only do the "busy" stuff if do_updates is set.
(toggle_updates): Remove gdb_busy_hook.
(constructor): Ditto.
(destructor): Ditto.
* library/stackwin.ith (busy): Match event handler definition.
* library/stackwin.itb (busy): Ditto.
(constructor): Remove gdb_busy_hook.
(destructor): Ditto.
* library/variables.tcl (constructor): Ditto.
(destructor): Ditto.
(disable_ui): Rename to "busy" and match event handler
definition.
* library/plugins/rhabout/rhabout.itcl (running): Rename
to "busy" and match new event handler definition.
* library/tclIndex: Regenerated.

23 files changed:
gdb/gdbtk/ChangeLog
gdb/gdbtk/library/console.itb
gdb/gdbtk/library/console.ith
gdb/gdbtk/library/ehandler.ith
gdb/gdbtk/library/gdbevent.ith
gdb/gdbtk/library/interface.tcl
gdb/gdbtk/library/kod.itb
gdb/gdbtk/library/kod.ith
gdb/gdbtk/library/memwin.itb
gdb/gdbtk/library/memwin.ith
gdb/gdbtk/library/plugins/rhabout/rhabout.itcl
gdb/gdbtk/library/pluginwin.itcl
gdb/gdbtk/library/process.itb
gdb/gdbtk/library/process.ith
gdb/gdbtk/library/regwin.itb
gdb/gdbtk/library/regwin.ith
gdb/gdbtk/library/srcbar.itcl
gdb/gdbtk/library/srcwin.itb
gdb/gdbtk/library/srcwin.ith
gdb/gdbtk/library/stackwin.itb
gdb/gdbtk/library/stackwin.ith
gdb/gdbtk/library/tclIndex
gdb/gdbtk/library/variables.tcl

index 6409e72..8f2c7a9 100644 (file)
@@ -1,3 +1,56 @@
+2001-05-31  Keith Seitz  <keiths@redhat.com>
+
+       * library/interface.tcl (gdb_busy_hook): Deprecate.
+       (gdbtk_busy): Create and dispatch a BusyEvent instead
+       of running hooks.
+       * library/ehandler.ith (busy): New event handler.
+       * library/gdbevent.ith (BusyEvent): New event class.
+       * library/console.ith: Inherit from GDBEventHandler.
+       (busy): Match event handler definition.
+       * library/console.itb (busy): Ditto.
+       (constructor): Remove gdb_busy_event.
+       (destructor): Ditto.
+       * library/kod.ith (busy): Match event handler definition.
+       * library/kod.itb (busy): Ditto.
+       (constructor): Remove gdb_busy_hook.
+       (destructor): Ditto.
+       * library/memwin.ith (busy): Match event handler definition.
+       * library/memwin.itb (busy): Ditto.
+       (constructor): Remove gdb_busy_hook.
+       (destructor): Ditto.
+       * library/pluginwin.itcl (running): Rename to "busy" and
+       match event handler definition.
+       (consturctor): Remove gdb_busy_hook.
+       (destructor): Ditto.
+       * library/process.ith (busy): Match event handler definition.
+       * library/process.itb (busy): Ditto.
+       (constructor): Remove gdb_busy_hook.
+       (destructor): Ditto.
+       * library/regwin.ith (busy): Match event handler definition.
+       * library/regwin.itb (busy): Ditto.
+       (constructor): Remove gdb_busy_hook.
+       (destructor): Ditto.
+       * library/srcbar.itcl (constructor): Remove gdb_busy_hook.
+       (destructor): Ditto.
+       (busy): New method.
+       * library/srcwin.ith (busy): Match event handler definition.
+       * library/srcwin.itb (busy): Ditto.
+       Only do the "busy" stuff if do_updates is set.
+       (toggle_updates): Remove gdb_busy_hook.
+       (constructor): Ditto.
+       (destructor): Ditto.
+       * library/stackwin.ith (busy): Match event handler definition.
+       * library/stackwin.itb (busy): Ditto.
+       (constructor): Remove gdb_busy_hook.
+       (destructor): Ditto.
+       * library/variables.tcl (constructor): Ditto.
+       (destructor): Ditto.
+       (disable_ui): Rename to "busy" and match event handler
+       definition.
+       * library/plugins/rhabout/rhabout.itcl (running): Rename
+       to "busy" and match new event handler definition.
+       * library/tclIndex: Regenerated.
+
 2001-05-25  Keith Seitz  <keiths@cygnus.com>
 
        * generic/gdbtk-cmds.c (bin2hex): New function.
index 26e0946..120208b 100644 (file)
@@ -19,7 +19,6 @@ body Console::constructor {args} {
   debug "$args"
   _build_win
   eval itk_initialize $args
-  add_hook gdb_busy_hook [list $this busy]
   add_hook gdb_idle_hook [list $this idle]
   add_hook gdb_no_inferior_hook [list $this idle]
 
@@ -40,7 +39,6 @@ body Console::constructor {args} {
 body Console::destructor {} {
   global gdbtk_state
   set gdbtk_state(console) ""
-  remove_hook gdb_busy_hook [list $this busy]
   remove_hook gdb_idle_hook [list $this idle]
   remove_hook gdb_no_inferior_hook [list $this idle]
 
@@ -205,7 +203,10 @@ body Console::idle {} {
   set _running 0
 }
 
-body Console::busy {} {
+# ------------------------------------------------------------------
+#  METHOD: busy - busy event handler
+# ------------------------------------------------------------------
+body Console::busy {event} {
   set _running 1
 }
 
index b214e54..82fc4c8 100644 (file)
@@ -18,7 +18,7 @@
 # ----------------------------------------------------------------------
 
 class Console {
-  inherit EmbeddedWin
+  inherit EmbeddedWin GDBEventHandler
 
   public {
     #Approximate maximum number of lines allowed in widget
@@ -27,13 +27,17 @@ class Console {
     method constructor {args}
     method destructor {}   
     method idle {}
-    method busy {}
     method insert {line}
     method einsert {line tag}
     method invoke {}
     method _insertion {args}
     method get_text {}
     method activate {{prompt {}}}
+
+    #
+    # GDB Events
+    #
+    method busy {event}
   }
 
   private {
index f38e666..54e4bae 100644 (file)
@@ -32,5 +32,8 @@ class GDBEventHandler {
 
     # Set variable
     method set_variable {event} {}
+
+    # Busy event
+    method busy {event} {}
   }
 }
index 6166edc..b523379 100644 (file)
@@ -147,3 +147,15 @@ class SetVariableEvent {
   public method get {what}
   public method handler {} { return "set_variable" }
 }
+
+# BUSY EVENT
+#
+# This event is created/dispatched whenever the GUI or GDB is "busy".
+# This could happen when the inferior is executing or when the GUI
+# is, for example, fetching memory from the target.
+
+class BusyEvent {
+  inherit GDBEvent
+
+  public method handler {} { return "busy" }
+}
index ca046e8..3c1259f 100644 (file)
@@ -47,6 +47,7 @@ proc gdbtk_tcl_set_variable {var val} {
 # For debugging purposes, please put debug statements at the very
 # beginning and ends of all GUI state hooks.
 
+# *** DEPRECATED: Use GDBEventHandler::busy instead.
 # GDB_BUSY_HOOK
 #   This hook is used to register a callback when the UI should
 #   be disabled because the debugger is either busy or talking
@@ -54,7 +55,7 @@ proc gdbtk_tcl_set_variable {var val} {
 #
 #   All callbacks should disable ALL user input which could cause
 #   any state changes in either the target or the debugger.
-define_hook gdb_busy_hook
+#define_hook gdb_busy_hook
 
 # GDB_IDLE_HOOK
 #   This hook is used to register a callback when the UI should
@@ -122,19 +123,17 @@ proc gdbtk_tcl_preloop { } {
 
 
 # ------------------------------------------------------------------
-#  PROCEDURE:  gdbtk_busy - run all busy hooks
+#  PROCEDURE:  gdbtk_busy - Dispatch a busy event
 #
 #         Use this procedure from within GUI code to indicate that
 #         the debugger is busy, either running the inferior or
-#         talking to the target. This will call all the registered
-#         gdb_busy_hook's.
+#         talking to the target.
 # ------------------------------------------------------------------
 proc gdbtk_busy {} {
 
-  set err [catch {run_hooks gdb_busy_hook} txt]
-  if {$err} { 
-    dbug E "$txt" 
-  }
+  set e [BusyEvent \#auto]
+  GDBEventHandler::dispatch $e
+  delete object $e
 
   # Force the screen to update
   update
index 22a7af4..981e6c1 100644 (file)
@@ -34,7 +34,6 @@ body KodWin::constructor {args} {
 
   # Add hooks for this object
   add_hook gdb_update_hook [code $this update]
-  add_hook gdb_busy_hook [code $this busy]
   add_hook gdb_idle_hook [code $this idle]
 }
 
@@ -400,7 +399,6 @@ body KodWin::destructor {} {
 
   remove_hook gdb_update_hook [code $this update]
   remove_hook gdb_idle_hook [code $this idle]
-  remove_hook gdb_busy_hook [code $this busy]
 }
 
 # ------------------------------------------------------------------
@@ -427,13 +425,13 @@ body KodWin::reconfig {} {
 }
 
 # ------------------------------------------------------------------
-#  METHOD:  busy - gdb_busy_hook
+#  METHOD:  busy - BusyEvent handler
 #
 #        This method should accomplish blocking
 #        - clicks in the window
 #        - change mouse pointer
 # ------------------------------------------------------------------
-body KodWin::busy {} {
+body KodWin::busy {event} {
   set Running 1
   _disable_buttons
   cursor watch
index c2a5e55..0324d97 100644 (file)
@@ -43,7 +43,6 @@ class KodWin {
     method clear {}
     method top {}
     method up {}
-    method busy {}
     method idle {}
     method cursor {glyph}
     method _disable_buttons {}
@@ -59,5 +58,6 @@ class KodWin {
     # Gdb Events
     #
     method set_variable {event}
+    method busy {event}
   }
 }
index fb2164a..58f1703 100644 (file)
@@ -50,7 +50,6 @@ body MemWin::constructor {args} {
   gdbtk_idle
 
   add_hook gdb_update_hook "$this update"
-  add_hook gdb_busy_hook [list $this busy]
   add_hook gdb_idle_hook [list $this idle]
 }
 
@@ -62,7 +61,6 @@ body MemWin::destructor {} {
     $prefs_win cancel
   }
   remove_hook gdb_update_hook "$this update"
-  remove_hook gdb_busy_hook [list $this busy]
   remove_hook gdb_idle_hook [list $this idle]
 }
 
@@ -404,9 +402,10 @@ body MemWin::idle {} {
 
 
 # ------------------------------------------------------------------
-#  METHOD: busy - disable menus 'cause we're busy updating things
+#  METHOD: busy - BusyEvent handler
+#                 Disable menus 'cause we're busy updating things.
 # ------------------------------------------------------------------
-body MemWin::busy {} {
+body MemWin::busy {event} {
   # Fencepost
   set Running 1
 
index cae6ab5..6ab585f 100644 (file)
@@ -62,7 +62,6 @@ class MemWin {
     method toggle_enabled {}
     method update {}
     method idle {}
-    method busy {}
     method newsize {height}
     method update_address_cb {}
     method update_address { {ae ""} }
@@ -75,5 +74,10 @@ class MemWin {
     method goto {addr}
     method memMoveCell {w x y}
     method error_dialog {msg {modality task} {type ok}}
+
+    #
+    # GDB Events
+    #
+    method busy {event}
   }
 }
index 0f56c5d..1518bac 100644 (file)
@@ -58,13 +58,13 @@ class RHAbout {
     window_name "About Red Hat Insight Plug-In"
   }
 
-  # You can overload the base class running method, but make sure
+  # You can overload the base class busy method, but make sure
   # to call it as well or the menu and button status will not be updated
   # (unless this is what you want)
-  private method running {} {
+  public method busy {event} {
     debug
     # Call the baseclass version
-    PluginWindow::running
+    PluginWindow::busy $event
 
     # Display something in the status area
     $_status configure -text "Running..."
index fded5a9..30a5559 100644 (file)
@@ -29,7 +29,7 @@
 # ----------------------------------------------------------------------
 
 class PluginWindow {
-  inherit ManagedWin
+  inherit ManagedWin GDBEventHandler
 
   # ------------------------------------------------------------------
   #  CONSTRUCTOR - create widget
@@ -53,7 +53,6 @@ class PluginWindow {
 
     eval itk_initialize $args
     add_hook gdb_idle_hook [code $this stopped]
-    add_hook gdb_busy_hook [code $this running]
     add_hook gdb_no_inferior_hook [code $this no_inferior]
   }
 
@@ -62,7 +61,6 @@ class PluginWindow {
   # ------------------------------------------------------------------
   destructor {
     remove_hook gdb_idle_hook [code $this stopped]
-    remove_hook gdb_busy_hook [code $this running]
     remove_hook gdb_no_inferior_hook [code $this no_inferior]
 
     #destroy $this
@@ -91,11 +89,11 @@ class PluginWindow {
   }
 
   # ------------------------------------------------------------------
-  #  METHOD:  running
+  #  METHOD:  busy - BusyEvent handler
   #             Invoked when gdb is going to run the inferior
   # ------------------------------------------------------------------
-  protected method running {} {
-    debug "PluginWindow::running"
+  public method busy {event} {
+    debug "PluginWindow::busy"
     enable_ui 0
   }
 
index 07638d5..e1f1de7 100644 (file)
@@ -28,7 +28,6 @@ body ProcessWin::constructor {args} {
 
   # Add hooks for this object
   add_hook gdb_update_hook [code $this update]
-  add_hook gdb_busy_hook [code $this busy]
   add_hook gdb_no_inferior_hook [code $this idle]
   add_hook gdb_idle_hook [code $this idle]
 }
@@ -130,7 +129,6 @@ body ProcessWin::change_context {y} {
 body ProcessWin::destructor {} {
   remove_hook gdb_update_hook [code $this update]
   remove_hook gdb_idle_hook [code $this idle]
-  remove_hook gdb_busy_hook [code $this busy]
   remove_hook gdb_no_inferior_hook [code $this no_inferior]
 }
 
@@ -143,13 +141,13 @@ body ProcessWin::reconfig {} {
 }
 
 # ------------------------------------------------------------------
-#  METHOD:  busy - gdb_busy_hook
+#  METHOD:  busy - BusyEvent handler
 #
 #        This method should accomplish blocking
 #        - clicks in the window
 #        - change mouse pointer
 # ------------------------------------------------------------------
-body ProcessWin::busy {} {
+body ProcessWin::busy {event} {
   set Running 1
   cursor watch
 }
index d9b8fec..0fbadc1 100644 (file)
@@ -28,7 +28,6 @@ class ProcessWin {
     method cursor {glyph}
     method change_frame {y}
     method update {}
-    method busy {}
     method idle {}
   }
 
@@ -36,5 +35,10 @@ class ProcessWin {
     method reconfig {}
     method constructor {args} 
     method destructor {}
+
+    #
+    # Event
+    #
+    method busy {event}    
   }
 }
\ No newline at end of file
index 1bd56a5..9136472 100644 (file)
@@ -33,7 +33,6 @@ body RegWin::constructor {args} {
   
   gdbtk_idle
   add_hook gdb_update_hook "$this update"
-  add_hook gdb_busy_hook [list $this busy]
   add_hook gdb_idle_hook [list $this idle]
 }
 
@@ -44,7 +43,6 @@ body RegWin::destructor {} {
   debug
   save_reg_display_vars
   remove_hook gdb_update_hook "$this update"
-  remove_hook gdb_busy_hook [list $this busy]
   remove_hook gdb_idle_hook [list $this idle]
 }
   
@@ -677,9 +675,9 @@ body RegWin::reconfig {} {
 }
   
 # ------------------------------------------------------------------
-#  PRIVATE METHOD:  busy - gdb_busy_hook
+#  PUBLIC METHOD:  busy - BusyEvent handler
 # ------------------------------------------------------------------
-body RegWin::busy {} {
+body RegWin::busy {event} {
   # Cancel edits
   unedit
   
index c48532c..53d3403 100644 (file)
@@ -62,12 +62,12 @@ class RegWin {
     method update {}
     method idle {}
     method reconfig {}
-    method busy {}
 
     #
     # Gdb Events
     #
     method set_variable {event}
+    method busy {event}
   }
 
 
index 337ef14..99627fe 100644 (file)
@@ -66,7 +66,6 @@ class SrcBar {
 
     eval itk_initialize $args
     add_hook gdb_idle_hook "$this enable_ui 1"
-    add_hook gdb_busy_hook "$this enable_ui 0"
     add_hook gdb_no_inferior_hook "$this enable_ui 2"
     add_hook gdb_trace_find_hook "$this handle_trace_find_hook"
   }
@@ -79,7 +78,6 @@ class SrcBar {
 
     unset GDBSrcBar_state($this)
     remove_hook gdb_idle_hook "$this enable_ui 1"
-    remove_hook gdb_busy_hook "$this enable_ui 0"
     remove_hook gdb_no_inferior_hook "$this enable_ui 2"
     remove_hook gdb_trace_find_hook "$this handle_trace_find_hook"
 
@@ -1070,6 +1068,13 @@ Do you want to continue?" \
     }
   }
 \f
+  # ------------------------------------------------------------------
+  #  METHOD:  busy - BusyEvent handler
+  # ------------------------------------------------------------------
+  method busy {event} {
+    enable_ui 0
+  }
+\f
   ####################################################################
   #
   #  PRIVATE DATA
index 711c5a3..89bb301 100644 (file)
@@ -42,7 +42,6 @@ body SrcWin::constructor {args} {
     set update_hook_init 1
     add_hook gdb_update_hook "SrcWin::choose_and_update"
   }
-  add_hook gdb_busy_hook "$this busy"
   add_hook gdb_idle_hook "$this idle"
   add_hook gdb_no_inferior_hook "$this no_inferior"
   add_hook download_progress_hook "$this download_progress"
@@ -60,7 +59,6 @@ body SrcWin::constructor {args} {
 # ------------------------------------------------------------------
 body SrcWin::destructor {} {
   debug
-  remove_hook gdb_busy_hook "$this busy"
   remove_hook gdb_no_inferior_hook "$this no_inferior"
   remove_hook gdb_idle_hook "$this idle"
   remove_hook download_progress_hook "$this download_progress"
@@ -324,10 +322,8 @@ body SrcWin::_name {w {val ""}} {
 body SrcWin::toggle_updates {value} {
   if {$value} {
     add_hook gdb_update_hook "$this update"
-    add_hook gdb_busy_hook "$this busy"
   } else {
     remove_hook gdb_update_hook "$this update"
-    remove_hook gdb_busy_hook "$this busy"
   }
   # save state in do_updates so it will be preserved
   # in window reconfigs
@@ -547,19 +543,21 @@ body SrcWin::_update_title {name} {
 # ------------------------------------------------------------------
 #  PUBLIC METHOD:  busy - disable things when gdb is busy
 # ------------------------------------------------------------------
-body SrcWin::busy {} {
+body SrcWin::busy {event} {
   global gdb_loaded gdb_target_name
 #  debug "gdb_loaded=$gdb_loaded, gdb_target_name=$gdb_target_name"
 
-  enable_ui 0
-  if {$Running} {
-    $_toolbar configure -runstop running
-    if {$gdb_loaded || \
-         ([TargetSelection::native_debugging] && $gdb_target_name != "remote")} {
-      set_status "Program is running."
-    } 
-  } else {
-    $_toolbar configure -runstop busy
+  if {$do_updates} {
+    enable_ui 0
+    if {$Running} {
+      $_toolbar configure -runstop running
+      if {$gdb_loaded || \
+           ([TargetSelection::native_debugging] && $gdb_target_name != "remote")} {
+       set_status "Program is running."
+      } 
+    } else {
+      $_toolbar configure -runstop busy
+    }
   }
 }
 
index 5ad1da7..97db3ec 100644 (file)
@@ -27,7 +27,6 @@ class SrcWin {
   inherit TopLevelWin GDBWin
 
   public {
-    method busy {}
     method constructor {args}
     method destructor {}
     method download_progress { section num tot {msg ""} }
@@ -57,6 +56,11 @@ class SrcWin {
     proc choose_and_update {}
     proc choose_and_display {tag linespec}
     proc point_to_main {}
+
+    #
+    # GDB Events
+    #
+    method busy {event}
   }
 
   private {
index 58675df..cdc4573 100644 (file)
@@ -21,7 +21,6 @@ body StackWin::constructor {args} {
   gdbtk_idle
   
   add_hook gdb_update_hook [code $this update]
-  add_hook gdb_busy_hook [code $this busy]
   add_hook gdb_no_inferior_hook [code $this no_inferior]
   add_hook gdb_idle_hook [code $this idle]
 }
@@ -32,7 +31,6 @@ body StackWin::constructor {args} {
 body StackWin::destructor {} {
   remove_hook gdb_update_hook [code $this update]
   remove_hook gdb_idle_hook [code $this idle]
-  remove_hook gdb_busy_hook [code $this busy]
   remove_hook gdb_no_inferior_hook [code $this no_inferior]
 }
 
@@ -146,13 +144,11 @@ body StackWin::reconfig {} {
 }
 
 # ------------------------------------------------------------------
-#  METHOD:  busy - gdb_busy_hook
-#
-#        This body StackWin::should accomplish blocking
-#        - clicks in the window
-#        - change mouse pointer
+#  PUBLIC METHOD:  busy - BusyEvent handler
+#                  This method should cause blocking of clicks in
+#                  the window and change mouse pointer.
 # ------------------------------------------------------------------
-body StackWin::busy {} {
+body StackWin::busy {event} {
   set Running 1
   cursor watch
 }
index af7132e..a5367bd 100644 (file)
@@ -27,7 +27,6 @@ class StackWin {
     method cursor {glyph}
     method change_frame {y}
     method update {}
-    method busy {}
     method no_inferior {}
     method idle {}
   }
@@ -36,6 +35,11 @@ class StackWin {
     method reconfig {}
     method constructor {args} 
     method destructor {}
+
+    #
+    # GDB Events
+    #
+    method busy {event}
   }
 
 }
index c8c4cdd..8423b00 100644 (file)
@@ -51,6 +51,7 @@ set auto_index(gdbtk_locate_main) [list source [file join $dir interface.tcl]]
 set auto_index(set_exe_name) [list source [file join $dir interface.tcl]]
 set auto_index(set_exe) [list source [file join $dir interface.tcl]]
 set auto_index(_open_file) [list source [file join $dir interface.tcl]]
+set auto_index(_close_file) [list source [file join $dir interface.tcl]]
 set auto_index(set_target_name) [list source [file join $dir interface.tcl]]
 set auto_index(set_target) [list source [file join $dir interface.tcl]]
 set auto_index(run_executable) [list source [file join $dir interface.tcl]]
@@ -142,6 +143,7 @@ set auto_index(GDBEvent) [list source [file join $dir gdbevent.ith]]
 set auto_index(BreakpointEvent) [list source [file join $dir gdbevent.ith]]
 set auto_index(TracepointEvent) [list source [file join $dir gdbevent.ith]]
 set auto_index(SetVariableEvent) [list source [file join $dir gdbevent.ith]]
+set auto_index(BusyEvent) [list source [file join $dir gdbevent.ith]]
 set auto_index(GDBWin) [list source [file join $dir gdbwin.ith]]
 set auto_index(GlobalPref) [list source [file join $dir globalpref.ith]]
 set auto_index(HtmlViewer) [list source [file join $dir helpviewer.ith]]
@@ -396,6 +398,7 @@ set auto_index(::MemWin::goto) [list source [file join $dir memwin.itb]]
 set auto_index(::MemWin::init_addr_exp) [list source [file join $dir memwin.itb]]
 set auto_index(::MemWin::cursor) [list source [file join $dir memwin.itb]]
 set auto_index(::MemWin::memMoveCell) [list source [file join $dir memwin.itb]]
+set auto_index(::MemWin::error_dialog) [list source [file join $dir memwin.itb]]
 set auto_index(::ProcessWin::constructor) [list source [file join $dir process.itb]]
 set auto_index(::ProcessWin::build_win) [list source [file join $dir process.itb]]
 set auto_index(::ProcessWin::update) [list source [file join $dir process.itb]]
index fd66491..cfefbaa 100644 (file)
@@ -35,7 +35,6 @@ class VariableWin {
        gdbtk_idle
 
        add_hook gdb_update_hook "$this update"
-       add_hook gdb_busy_hook "$this disable_ui"
        add_hook gdb_no_inferior_hook "$this no_inferior"
        add_hook gdb_idle_hook [list $this idle]
        add_hook gdb_clear_file_hook [code $this clear_file]
@@ -166,7 +165,6 @@ class VariableWin {
 
        # Remove this window and all hooks
        remove_hook gdb_update_hook "$this update"
-       remove_hook gdb_busy_hook "$this disable_ui"
        remove_hook gdb_no_inferior_hook "$this no_inferior"
        remove_hook gdb_idle_hook [list $this idle]
        remove_hook gdb_clear_file_hook [code $this clear_file]
@@ -917,10 +915,10 @@ class VariableWin {
     }
 
     # ------------------------------------------------------------------
-    # METHOD:   disable_ui
+    #   PUBLIC METHOD:  busy - BusyEvent handler
     #           Disable all ui elements that could affect gdb's state
     # ------------------------------------------------------------------
-    method disable_ui {} {
+    method busy {event} {
 
        # Set fencepost
        set Running 1