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 Mon, 12 Mar 2007 04:35:29 +0100, Daniel Jacobowitz wrote:
> On Sun, Mar 11, 2007 at 11:55:19PM +0100, Jan Kratochvil wrote:
> > attached testcase targets the difference of `struct x;' vs. `struct {} x;' by checking
> > the DWARF flag `DW_AT_declaration':
...
> Does this happen in HEAD?

Yes.


> 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.

I was not aware of it, I checked it now, it looks really related.

But that patch / testcase is orthogonal to my patch / testcase below.
Joel's patch targets DWARF->symbols phase while my patch targets symbols found
in different object files (executable vs. shared library).

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

You are right. Updated, as there is no compilation-unit info reachable from
`struct type *' I had to use a new flag in each type there.


Regards,
Jan

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


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