diff options
author | Fernando Nasser <fnasser@redhat.com> | 2000-10-13 20:31:38 +0000 |
---|---|---|
committer | Fernando Nasser <fnasser@redhat.com> | 2000-10-13 20:31:38 +0000 |
commit | ae093f962b34d557f11c7d6cb5112dd3623983b2 (patch) | |
tree | d9cf0abf47aafb0210e7686e6c1b10166da9c82f /gdb | |
parent | b9a6918857531f9d3f41befcadc08929617b38de (diff) | |
download | gdb-ae093f962b34d557f11c7d6cb5112dd3623983b2.zip gdb-ae093f962b34d557f11c7d6cb5112dd3623983b2.tar.gz gdb-ae093f962b34d557f11c7d6cb5112dd3623983b2.tar.bz2 |
2000-10-13 Fernando Nasser <fnasser@totem.to.cygnus.com>
* varobj.c (varobj_update): Prevent uninitialized error code to be
returned on type_changed. Also, prevent value_equal() to be called
for the types we do not want to test for updates.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/varobj.c | 29 |
2 files changed, 22 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e0a7ba2..d4a44bb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2000-10-13 Fernando Nasser <fnasser@totem.to.cygnus.com> + + * varobj.c (varobj_update): Prevent uninitialized error code to be + returned on type_changed. Also, prevent value_equal() to be called + for the types we do not want to test for updates. + 2000-10-11 Fernando Nasser <fnasser@totem.to.cygnus.com> From Grant Edwards <grante@visi.com> diff --git a/gdb/varobj.c b/gdb/varobj.c index 9205e9d..b1c44a0 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -917,21 +917,24 @@ varobj_update (struct varobj *var, struct varobj ***changelist) /* Initialize a stack for temporary results */ vpush (&result, NULL); - if (type_changed || !my_value_equal (var->value, new, &error2)) + /* If this is a "use_selected_frame" varobj, and its type has changed, + them note that it's changed. */ + if (type_changed) { - /* Note that it's changed There a couple of exceptions here, - though. We don't want some types to be reported as - "changed". The exception to this is if this is a - "use_selected_frame" varobj, and its type has changed. */ - if (type_changed || type_changeable (var)) - { - vpush (&result, var); - changed++; - } + vpush (&result, var); + changed++; + } + /* If values are not equal, note that it's changed. + There a couple of exceptions here, though. + We don't want some types to be reported as "changed". */ + else if (type_changeable (var) && !my_value_equal (var->value, new, &error2)) + { + vpush (&result, var); + changed++; + /* error2 replaces var->error since this new value + WILL replace the old one. */ + var->error = error2; } - /* error2 replaces var->error since this new value - WILL replace the old one. */ - var->error = error2; /* We must always keep around the new value for this root variable expression, or we lose the updated children! */ |