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: [PATCH] Differentiate empty vs. opaque types


On Sun, Mar 11, 2007 at 11:55:19PM +0100, Jan Kratochvil wrote:
> 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.

Does this happen in HEAD?  It sounds just like the problem Joel fixed
for Ada:

2007-01-05  Joel Brobecker  <brobecker@adacore.com>

        * dwarf2read.c (partial_die_info): Add field has_byte_size.
        (add_partial_symbol): Correct identification of external
        references.
        (process_structure_scope): Likewise.
        (read_partial_die): Handle DW_AT_byte_size attribute.

There's an Ada testcase for this, and it passes now.

> Patch goes the regression-safe way by introducing OBJF_HAVE_TYPE_STUB currently
> being set only by DWARF/DWARF2.

An objfile flag is usually not right - this is per-compilation-unit,
not per objfile.

-- 
Daniel Jacobowitz
CodeSourcery


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