From a8de2f93df2d46eee6c1b3b8ed340d6ba004eddb Mon Sep 17 00:00:00 2001 From: Martin Hunt Date: Thu, 19 Dec 2002 01:09:09 +0000 Subject: 2002-12-18 Martin M. Hunt * library/regwin.itb (RegWin::update): When updating, check that a cell still exists before checking its value. (RegWin::_select_group): Clear cells with changed values before changing group. After new group is selected, highlight any changed values still visible. --- gdb/gdbtk/ChangeLog | 8 ++++++++ gdb/gdbtk/library/regwin.itb | 22 +++++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog index bb0bbc869a8..b4e50716a65 100644 --- a/gdb/gdbtk/ChangeLog +++ b/gdb/gdbtk/ChangeLog @@ -1,3 +1,11 @@ +2002-12-18 Martin M. Hunt + + * library/regwin.itb (RegWin::update): When updating, check + that a cell still exists before checking its value. + (RegWin::_select_group): Clear cells with changed values before + changing group. After new group is selected, highlight any changed + values still visible. + 2002-12-17 Martin M. Hunt * library/interface.tcl (gdbtk_tcl_fputs_target_err): diff --git a/gdb/gdbtk/library/regwin.itb b/gdb/gdbtk/library/regwin.itb index 0cb1962627f..d68fd4eb0b9 100644 --- a/gdb/gdbtk/library/regwin.itb +++ b/gdb/gdbtk/library/regwin.itb @@ -901,14 +901,30 @@ itcl::body RegWin::_update_register {rn} { # ------------------------------------------------------------------ itcl::body RegWin::_select_group {} { set gr [$itk_component(frame).opt get] + debug $gr if {$gr == ""} { return } + + # Change anything on the old change list back to normal + foreach r $_change_list { + if {[info exists _cell($r)] && $_cell($r) != "hidden"} { + $itk_component(table) tag cell normal $_cell($r) + } + } + set _group $gr + _layout_table + + # highlight changed registers if they still exist in the new group + foreach r $_change_list { + if {[info exists _cell($r)] && $_cell($r) != "hidden" && $_data($_cell($r)) != ""} { + $itk_component(table) tag cell highlight $_cell($r) + } + } + # Clear gdb's change list catch {gdb_reginfo changed} - update "" - _layout_table } @@ -999,7 +1015,7 @@ itcl::body RegWin::update {event} { # Change anything on the old change list back to normal foreach r $_change_list { - if {$_cell($r) != "hidden"} { + if {[info exists _cell($r)] && $_cell($r) != "hidden"} { $itk_component(table) tag cell normal $_cell($r) } } -- cgit v1.2.1