[patch+7.8] Fix 7.8 regression: resolve_dynamic_struct: Assertion `TYPE_NFIELDS (type) > 0' (PR 17642)
Doug Evans
dje@google.com
Sat Dec 13 18:18:00 GMT 2014
On Sat, Dec 13, 2014 at 6:23 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>> - switch (TYPE_CODE (type))
>> + if (TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
>> {
>> - case TYPE_CODE_TYPEDEF:
>> resolved_type = copy_type (type);
>> TYPE_TARGET_TYPE (resolved_type)
>> = resolve_dynamic_type_internal (TYPE_TARGET_TYPE (type), addr,
>> top_level);
>> - break;
>> + }
>> + else
>
> Trailing space here...
>
>> + {
>> + /* Typedefs do not need to be preserved here but we need
>> + to resolve any possible stub types. */
>> + type = real_type;
>
> It took me a moment, despite your added comment, to understand that
> it was not so much about TYPE_CODE_TYPEDEF but about stubs! I keep
> forgetting that check_typedef does more than unwrapping typedef
> layers.
Yeah. PR 17450 describes this a bit better IMO.
https://sourceware.org/bugzilla/show_bug.cgi?id=17450
More information about the Gdb-patches
mailing list