This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: handle case arising from GCC PR 47510


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> Then cp_lookup_nested_type crashes as TYPE_TAG_NAME (parent_type)
Jan> == NULL - which is correct for anonymous struct - but
Jan> cp_lookup_nested_type does not expect it.
[...]

After coming up with some more examples, it turns out that the DWARF
reading part of this patch is very misguided.  In particular it would
fail if the typedef appeared before the anonymous struct (and GCC did
emit this when a namespace was used).  And, a more complicated solution
(deferring this smashing until after all DIEs were processed) had a
problem of its own (we needed multi-level deferrals due to local types).

I've asked for a new attribute from GCC, instead, to make the problem
more tractable on the gdb side.  We'll see what happens.

Meanwhile I will probably put in the valops.c change.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]