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: [RFA/DWARF] Set TYPE_FLAG_STUB for enum DIEs that are declarations only


> And this is supposed to be known to Joe Random Hacker reading the code
> because ...?  Should we assume that whoever reads dwarf2read.c is
> necessarily a DWARF-2 expert?

I honestly believe that whoever reads dwarf2read.c needs to understand
a minimum the DWARF standard - otherwise he's wasting his time. And
I personally not in the business of duplicating the DWARF standard
in our code unless it's obscure.

> That's not the kind of comment I was suggesting.  I meant some summary
> of the long explanation you posted as a preamble to the patch, which
> explained why debugging Ada programs needed that.

The preample was an introduction to an part of the Ada language, not
a description of a problem.  The "stub" DIE is a routine concept,
that we see all the time with C opaque types. In fact, any type
can be incomplete.

But rather than arguing this ad vitam aeternam, here's a suggestion:

  /* Enumeration DIEs descriptions can be imcomplete.  In Ada, any
     type can be declared as private in the package spec, and then
     defined only inside the package body.  Such types are known as
     Taft Amendment Types.  When another package uses such a type,
     an incomplete DIE may be generated by the compiler.  */

-- 
Joel


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