mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
* c-exp.y (parse_number): Change high_bit to unsigned.
* demangle.c: Change all references to cfront to ARM, since the actual algorithm is the one specified in the Annotated Reference Manual. This was confusing users into thinking that full cfront support was implemented. * dwarfread.c (CFRONT_PRODUCER): Remove, was never really used. * eval.c (evaluate_subexp): For STRUCTOP_PTR pass the arg type directly to lookup_struct_elt_type, which will do the dereferencing itself. * gdbtypes.c (lookup_struct_elt_type): Expand comments. Fix NULL dereferencing bug for unnamed structs, comment out questionable code.
This commit is contained in:
@@ -691,6 +691,12 @@ lookup_template_type (name, type, block)
|
||||
}
|
||||
|
||||
/* Given a type TYPE, lookup the type of the component of type named NAME.
|
||||
|
||||
TYPE can be either a struct or union, or a pointer or reference to a struct or
|
||||
union. If it is a pointer or reference, its target type is automatically used.
|
||||
Thus '.' and '->' are interchangable, as specified for the definitions of the
|
||||
expression element types STRUCTOP_STRUCT and STRUCTOP_PTR.
|
||||
|
||||
If NOERR is nonzero, return zero if NAME is not suitably defined.
|
||||
If NAME is the name of a baseclass type, return that type. */
|
||||
|
||||
@@ -701,6 +707,7 @@ lookup_struct_elt_type (type, name, noerr)
|
||||
int noerr;
|
||||
{
|
||||
int i;
|
||||
char *typename;
|
||||
|
||||
if (TYPE_CODE (type) == TYPE_CODE_PTR ||
|
||||
TYPE_CODE (type) == TYPE_CODE_REF)
|
||||
@@ -718,8 +725,15 @@ lookup_struct_elt_type (type, name, noerr)
|
||||
|
||||
check_stub_type (type);
|
||||
|
||||
if (STREQ (type_name_no_tag (type), name))
|
||||
#if 0
|
||||
/* FIXME: This change put in by Michael seems incorrect for the case where
|
||||
the structure tag name is the same as the member name. I.E. when doing
|
||||
"ptype bell->bar" for "struct foo { int bar; int foo; } bell;"
|
||||
Disabled by fnf. */
|
||||
typename = type_name_no_tag (type);
|
||||
if (typename != NULL && STREQ (typename, name))
|
||||
return type;
|
||||
#endif
|
||||
|
||||
for (i = TYPE_NFIELDS (type) - 1; i >= TYPE_N_BASECLASSES (type); i--)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user