This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
FYI: Patches to varobj.c and gdbtk.c
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: FYI: Patches to varobj.c and gdbtk.c
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Fri, 13 Oct 2000 17:34:06 -0400
- Organization: Red Hat , Inc. - Toronto
The following changes have been commited to the repository:
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-13 Fernando Nasser <fnasser@totem.to.cygnus.com>
* varobj.c (type_changeable): Arrays are not changeable.
Trying to check for updates was causing an error if the array lived
in a register as gdb value_equal() cannot handle that case yet.
2000-10-13 Fernando Nasser <fnasser@totem.to.cygnus.com>
* gdbtk.c (target_is_native): The "multi-thread" target is native.
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
Index: varobj.c
===================================================================
RCS file: /cvs/src/src/gdb/varobj.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -c -p -r1.8 -r1.9
*** varobj.c 2000/09/16 00:49:37 1.8
--- varobj.c 2000/10/13 20:31:38 1.9
*************** varobj_update (struct varobj *var, struc
*** 917,937 ****
/* Initialize a stack for temporary results */
vpush (&result, NULL);
! if (type_changed || !my_value_equal (var->value, new, &error2))
{
! /* 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++;
! }
}
! /* 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! */
--- 917,940 ----
/* Initialize a stack for temporary results */
vpush (&result, NULL);
! /* If this is a "use_selected_frame" varobj, and its type has changed,
! them note that it's changed. */
! if (type_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;
! }
/* We must always keep around the new value for this root
variable expression, or we lose the updated children! */
Index: varobj.c
===================================================================
RCS file: /cvs/src/src/gdb/varobj.c,v
retrieving revision 1.9
diff -c -p -r1.9 varobj.c
*** varobj.c 2000/10/13 20:31:38 1.9
--- varobj.c 2000/10/13 20:42:20
*************** type_changeable (struct varobj *var)
*** 1726,1731 ****
--- 1726,1732 ----
{
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION:
+ case TYPE_CODE_ARRAY:
r = 0;
break;
Index: gdbtk.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v
retrieving revision 1.6
diff -c -p -r1.6 gdbtk.c
*** gdbtk.c 2000/07/02 20:07:07 1.6
--- gdbtk.c 2000/10/13 20:48:33
*************** target_is_native (t)
*** 329,335 ****
if (STREQ (name, "exec") || STREQ (name, "hpux-threads")
|| STREQ (name, "child") || STREQ (name, "procfs")
! || STREQ (name, "solaris-threads") || STREQ (name, "linuxthreads"))
return 1;
return 0;
--- 329,336 ----
if (STREQ (name, "exec") || STREQ (name, "hpux-threads")
|| STREQ (name, "child") || STREQ (name, "procfs")
! || STREQ (name, "solaris-threads") || STREQ (name, "linuxthreads")
! || STREQ (name, "multi-thread"))
return 1;
return 0;