2006-11-30 Keith Seitz <keiths@redhat.com>
+ insight/293:
+ * library/watch.tcl (no_inferior): Remove all varobjs and
+ clear the display.
+ (clear_file): Call no_inferior. Update comments.
+ * library/locals.tcl: Remove unused variables "Running"
+ and "Variables". Changed throughout.
+ (no_inferior): Delete the current frame and clear the display.
+ (clear_file): Call no_inferior. Update comments.
+ (context_switch): To delete an Itcl object, one uses
+ "delete object" not "destroy".
+
+2006-11-30 Keith Seitz <keiths@redhat.com>
+
insight/299:
* generic/gdbtk.c (gdbtk_init): Don't check if DISPLAY is set,
it isn't needed anymore. Gdb will not abort, and Tk_Init will
# Local Variable Window for Insight.
-# Copyright (C) 2002, 2003 Red Hat
+# Copyright (C) 2002, 2003, 2006 Red Hat
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
# ------------------------------------------------------------------
method busy {event} {
debug
- set Running 1
cursor watch
}
# Re-enable the UI
method idle {event} {
debug
- set Running 0
cursor {}
}
method no_inferior {} {
debug
cursor {}
- set Running 0
+ catch {delete object $_frame}
set _frame {}
+ $tree remove all
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: clear_file - Clear out state so that a new executable
- # can be loaded. For LocalWins, this means deleting
- # the Variables list.
+ # can be loaded. For LocalWins, this means doing
+ # everything that no_inferior does.
# ------------------------------------------------------------------
method clear_file {} {
- debug
- set Variables {}
+ no_inferior
}
# ------------------------------------------------------------------
remove_hook gdb_no_inferior_hook "$this no_inferior"
remove_hook gdb_clear_file_hook [code $this clear_file]
remove_hook file_changed_hook [code $this clear_file]
-
- foreach var $Variables {
- $var delete
- }
}
method context_switch {} {
if {$err && $_frame != ""} {
# No current frame
debug "no current frame"
- catch {destroy $_frame}
+ catch {delete object $_frame}
set _frame {}
return 1
} elseif {$current_frame == "" && $_frame == ""} {
# delete variables in tree
$tree remove all
- set Variables {}
if {$_frame != ""} {
$tree add [$_frame variables]
}
protected variable Entry
- protected variable Variables {}
protected variable tree
- protected variable Running
protected variable _frame {}
}
# Watch window for Insight.
-# Copyright (C) 2002, 2003 Red Hat
+# Copyright (C) 2002, 2003, 2006 Red Hat
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
debug
cursor {}
set Running 0
+ foreach var $Watched {
+ $var delete
+ }
+ $tree remove all
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: clear_file - Clear out state so that a new executable
- # can be loaded. For WatchWins, this means deleting
- # the Watched list.
+ # can be loaded. For WatchWins, this means doing
+ # everything that no_inferior does.
# ------------------------------------------------------------------
method clear_file {} {
debug
- set Watched {}
+ no_inferior
}
# ------------------------------------------------------------------