* gdbtk.tcl (delete_expr): Unset corresponding element of

expr_update_list when destroying an expression.
	(create_expr_window): Initialize expr_num, delete_expr_num,
	and expr_update_list here when each new expression window
	is created, rather than once at startup.
PR 9383
This commit is contained in:
Fred Fish 1996-07-20 17:21:36 +00:00
parent 194141a9b8
commit efd14e4595
2 changed files with 23 additions and 6 deletions

View File

@ -1,3 +1,11 @@
Sat Jul 20 10:09:28 1996 Fred Fish <fnf@cygnus.com>
* gdbtk.tcl (delete_expr): Unset corresponding element of
expr_update_list when destroying an expression.
(create_expr_window): Initialize expr_num, delete_expr_num,
and expr_update_list here when each new expression window
is created, rather than once at startup.
Fri Jul 19 14:05:57 1996 Stan Shebs <shebs@andros.cygnus.com>
* dwarf2read.c: New file, DWARF 2 reader originally contributed by

View File

@ -27,7 +27,6 @@ set cfunc NIL
set line_numbers 1
set breakpoint_file(-1) {[garbage]}
set disassemble_with_source nosource
set expr_update_list(0) 0
set gdb_prompt "(gdb) "
# Hint: The following can be toggled from a tclsh window after
@ -1089,9 +1088,6 @@ proc not_implemented_yet {message} {
# Create the expression display window.
#
set expr_num 0
set delete_expr_num 0
# Set delete_expr_num, and set -state of Delete button.
proc expr_update_button {num} {
global delete_expr_num
@ -1135,13 +1131,14 @@ proc add_expr {expr} {
proc delete_expr {} {
global delete_expr_num
global expr_update_list
if {$delete_expr_num > 0} then {
set e .expr.exprs
set f e${delete_expr_num}
destroy $e.updates.$f $e.expressions.$f $e.values.$f
# FIXME should we unset an element of expr_update_list here?
unset expr_update_list($delete_expr_num)
}
}
@ -1171,9 +1168,21 @@ proc update_exprs {} {
}
proc create_expr_window {} {
global expr_num
global delete_expr_num
global expr_update_list
if {[winfo exists .expr]} {raise .expr ; return}
# All the state about individual expressions is stored in the
# expression window widgets, so when it is deleted, the
# previous values of the expression global variables become
# invalid. Reset to a known initial state.
set expr_num 0
set delete_expr_num 0
catch {unset expr_update_list}
set expr_update_list(0) 0
toplevel .expr
wm title .expr "GDB Expressions"
wm iconname .expr "Expressions"