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] Add DW_AT_GNAT_descriptive_type support


> While it may make sense from the practical point of view I would like
> a clear statement this is the reason for this "gross"
> DW_AT_GNAT_descriptive_type code.

I agree it is a bit gross. The problem is not technical difficulty;
it's resources. I said, back in Apr (wow, so long ago already!):

| At the time, we had hoped that this would be a temporary, local
| change, until we find the time to work on generating pure DWARF.
| But the reality is that we don't see this happening in the near
| future. As we've come to accept this fact, we at AdaCore think
| that it would be useful to others to be able to take advantage
| of this attribute.
| 
| The changes in GDB are relatively small, I think - at least in
| the DWARF reader part.


> With properly implemented DWARF-only DW_FORM_block* producer for GNAT
> the GDB consumer would be IMO some small extension of dynamic types
> (to accept DW_FORM_block* for several more DW_AT_* attributes and
> reuse the existing dynamic->static converting code in check_typedef).

The problem is that there are lots more situations where we would
still need to fix GDB as well - as you have probably seen in the
exp_dbug.ads spec. The record with a variable-length field is just
one example.  Another example would be a discriminated record, where
certain components determine the contents of the rest of the record.
Or arrays, where you need to access a parallel ___XA type. Etc.

This is definitely something that AdaCore has been looking at -
implementing the generation of proper dwarf. We looked at all
the situations where an encoding was used, and how to replace it
in DWARF. Apart from a few unknowns that have not be resolved yet,
we more or less know how to express the rest.  But this effort seems
to be always stalled in favor of other, more urgent ones.  It's an
effort that is actually dear to me, since I very much dislike this
encoding.  But I don't want to start on this until I am done
synchronizing the Ada mode at AdaCore and the Ada mode at the FSF.

-- 
Joel


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