This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Differentiate empty vs. opaque types
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 11 Mar 2007 23:35:29 -0400
- Subject: Re: [PATCH] Differentiate empty vs. opaque types
- References: <20070311225518.GA10039@host0.dyn.jankratochvil.net>
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