This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: Variable errors
- To: Keith Seitz <keiths at cygnus dot com>
- Subject: Re: Variable errors
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Wed, 11 Apr 2001 14:54:36 -0400
- CC: Insight Maling List <insight at sources dot redhat dot com>, Jim Ingham <jingham at apple dot com>
- Organization: Red Hat Canada
- References: <Pine.SOL.3.91.1010411112403.14548X-100000@ryobi.cygnus.com>
Keith Seitz wrote:
>
> Let's say that the variable "i" is in the variable object "var6". Now,
> when you do "var6 update", it returns either an empty list if its value
> has not changed since the last check OR it returns "var6" if its value
> has changed. Or look in the debug window and it prints "Type changed" all
> the time.
>
I guess you're right, I forgot the scalars. Try this patch (*UNTESTED*)
for now. I will flag the varobj name if the type has changed over the
weekend. Until I do this, variables that change type from scalar to
scalar (different types) will be highlighted.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
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/11 18:55: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