This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Temporary fix to type_changed detection
- To: insight at sources dot redhat dot com
- Subject: Temporary fix to type_changed detection
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Tue, 17 Apr 2001 12:15:21 -0400
- Organization: Red Hat , Inc. - Toronto
As per discussion with Keith, I am checking this in as a temporary fix.
2001-04-17 Fernando Nasser <fnasser@redhat.com>
* library/variables.tcl (update): Temporary fix to the detection of
"type_changed" condition. Proper fix will require that this condition
is properly reported by the underlying code.
Index: variables.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/variables.tcl,v
retrieving revision 1.7
diff -c -p -r1.7 variables.tcl
*** variables.tcl 2001/03/29 22:42:17 1.7
--- variables.tcl 2001/04/17 15:41:08
*************** class VariableWin {
*** 825,832 ****
set variables [$Hlist info children {}]
foreach var $variables {
# debug "VARIABLE: $var ($Update($this,$var))"
set UpdatedList [$var update]
! if {[lindex $UpdatedList 0] == $var} {
debug "Type changed."
# We must fix the tree entry to correspond to the new type
$Hlist delete offsprings $var
--- 825,837 ----
set variables [$Hlist info children {}]
foreach var $variables {
# debug "VARIABLE: $var ($Update($this,$var))"
+ set numchild [$var numChildren]
set UpdatedList [$var update]
! # FIXME: For now, we can only infer that the type has changed
! # if the variable is not a scalar; the varobj code will have to
! # give us an indication that this happened.
! if {([lindex $UpdatedList 0] == $var)
! && ($numchild > 0)} {
debug "Type changed."
# We must fix the tree entry to correspond to the new type
$Hlist delete offsprings $var
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9