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]

[PATCH] Differentiate empty vs. opaque types


Hi,

attached testcase targets the difference of `struct x;' vs. `struct {} x;' by checking
the DWARF flag `DW_AT_declaration':
# DWARF3: An incomplete structure, union or class type is represented by
# a structure, union or class entry that does not have a byte size attribute
# and that has a DW_AT_declaration attribute.

The attachment then fixes GDB to make the testcase pass.

Patch goes the regression-safe way by introducing OBJF_HAVE_TYPE_STUB currently
being set only by DWARF/DWARF2.  It should be probably also set at least by
STABS but I tested the code only on DWARF2.  Unaware how feasible would be
unconditional TYPE_STUB() dependency nowadays.


Regards,
Jan

Attachment: gdb-empty-is-not-opaque.patch
Description: Text document


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