* varobj.c (c_value_of_child): Use the wrapper function,

gdb_value_struct_elt.
	(cplus_value_of_child): Likewise.
This commit is contained in:
Keith Seitz 2001-11-19 19:44:04 +00:00
parent 84c254c646
commit 30c6b1fbe9
2 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2001-11-19 Keith Seitz <keiths@redhat.com>
* varobj.c (c_value_of_child): Use the wrapper function,
gdb_value_struct_elt.
(cplus_value_of_child): Likewise.
2001-11-18 Andrew Cagney <ac131313@redhat.com> 2001-11-18 Andrew Cagney <ac131313@redhat.com>
* i386-tdep.c (i386_gdbarch_init): Initialize num_regs. * i386-tdep.c (i386_gdbarch_init): Initialize num_regs.

View File

@ -1952,7 +1952,7 @@ c_value_of_child (struct varobj *parent, int index)
case TYPE_CODE_STRUCT: case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION: case TYPE_CODE_UNION:
value = value_struct_elt (&temp, NULL, name, NULL, "vstructure"); gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL, "vstructure");
break; break;
case TYPE_CODE_PTR: case TYPE_CODE_PTR:
@ -1960,8 +1960,7 @@ c_value_of_child (struct varobj *parent, int index)
{ {
case TYPE_CODE_STRUCT: case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION: case TYPE_CODE_UNION:
value = gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL, "vstructure");
value_struct_elt (&temp, NULL, name, NULL, "vstructure");
break; break;
default: default:
@ -2298,9 +2297,11 @@ cplus_value_of_child (struct varobj *parent, int index)
if (CPLUS_FAKE_CHILD (parent)) if (CPLUS_FAKE_CHILD (parent))
{ {
struct value *temp = parent->parent->value; struct value *temp = parent->parent->value;
value = value_struct_elt (&temp, NULL, name,
NULL, "cplus_structure"); gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL,
release_value (value); "cplus_structure");
if (value != NULL)
release_value (value);
} }
else if (index >= TYPE_N_BASECLASSES (type)) else if (index >= TYPE_N_BASECLASSES (type))
{ {