[RFA/dwarf2read.c] Make Ada structs "typedef"'ed implicitly

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[RFA/dwarf2read.c] Make Ada structs "typedef"'ed implicitly

Joel Brobecker
Hello,

This should be the last issue before gdb.ada/null_record.exp starts
passing with the Debian Ada compiler. It turned out that the Debian
compiler does not generate a DW_TAG_typedef DIE for each struct
(aka record in Ada), whereas our does. In Ada, records, unions,
and enums are implicitly typedef'ed. The attached patch modifies
the sources to reflect this.

2007-01-11  Joel Brobecker  <[hidden email]>

        * dwarf2read.c (add_partial_symbol): Create an extra partial
        symbol in the VAR_DOMAIN for Ada structures, unions or enums.
        (new_symbol): Likewise for symbols.

Tested on x86-linux. 1 extra PASS in gdb.ada/null_record.exp, no
regression.

OK to apply?

(many thanks to Daniel for bringing all these issues to my attention)

Thanks,
--
Joel

typedef.diff (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [RFA/dwarf2read.c] Make Ada structs "typedef"'ed implicitly

Daniel Jacobowitz-2
On Thu, Jan 11, 2007 at 08:04:58PM +0400, Joel Brobecker wrote:

> 2007-01-11  Joel Brobecker  <[hidden email]>
>
>         * dwarf2read.c (add_partial_symbol): Create an extra partial
>         symbol in the VAR_DOMAIN for Ada structures, unions or enums.
>         (new_symbol): Likewise for symbols.
>
> Tested on x86-linux. 1 extra PASS in gdb.ada/null_record.exp, no
> regression.
>
> OK to apply?

OK, thanks!  On to the next :-)

> - || cu->language == language_java)
> + || cu->language == language_java
> +                || cu->language == language_ada)

Tab/space mixup?

--
Daniel Jacobowitz
CodeSourcery
Reply | Threaded
Open this post in threaded view
|

Re: [RFA/dwarf2read.c] Make Ada structs "typedef"'ed implicitly

Joel Brobecker
> > 2007-01-11  Joel Brobecker  <[hidden email]>
> >
> >         * dwarf2read.c (add_partial_symbol): Create an extra partial
> >         symbol in the VAR_DOMAIN for Ada structures, unions or enums.
> >         (new_symbol): Likewise for symbols.
> >
> > Tested on x86-linux. 1 extra PASS in gdb.ada/null_record.exp, no
> > regression.
> >
> > OK to apply?
>
> OK, thanks!  On to the next :-)

Thanks! Now checked in.

> > - || cu->language == language_java)
> > + || cu->language == language_java
> > +                || cu->language == language_ada)
>
> Tab/space mixup?

Oops, you're right. Fixed before checking the patch in.

Thanks Daniel,
--
Joel