2010-05-11 Pierre Muller <muller@ics.u-strasbg.fr>

PR exp/11530.
	* gdbtypes.c (lookup_struct_elt_type): Also lookup
	names of unnamed structures or unions.

testsuite ChangeLog entry:

2010-05-11  Pierre Muller  <muller@ics.u-strasbg.fr>

	PR exp/11530.
	* testsuite/gdb.base/gdb11530.c: New file.
	* testsuite/gdb.base/gdb11530.exp: New file.
This commit is contained in:
Pierre Muller
2010-05-11 22:03:04 +00:00
parent bf701c2c79
commit f5a010c000
5 changed files with 109 additions and 0 deletions

View File

@@ -1244,6 +1244,13 @@ lookup_struct_elt_type (struct type *type, char *name, int noerr)
{
return TYPE_FIELD_TYPE (type, i);
}
else if (!t_field_name || *t_field_name == '\0')
{
struct type *subtype = lookup_struct_elt_type (
TYPE_FIELD_TYPE (type, i), name, 1);
if (subtype != NULL)
return subtype;
}
}
/* OK, it's not in this class. Recursively check the baseclasses. */