[gclist] Fast-allocating non-copying GC's

Robert A Duff bobduff@world.std.com
Tue, 19 Mar 1996 10:35:09 -0500


> >Possibly a good plan, but beware Ada features that don't quite fit the
> >standard debugging formats.

Paul R. Wilson says:

> Could you tell me basically what these things are?

No, I'm afraid I don't know.  I know Ada, but I don't know the debugging
formats.  But from talking to the GNAT folks, there are (or were?) some
problems.  I can guess: Record components that are arrays that depend on
discriminants are a feature of Ada that is unusual, and likely
unsupported by standard debugging formats.  Tasks.  Function results
whose size is not known at the call site.

> C++ has oddities too, which require a little tweaking for a given
> compiler.  (E.g., knowing how to identify a field name as a vtbl pointer.)
> There's acually very little tweaking, though;  it's surprisingly easy.

I believe GNAT uses the same representation for vtbl's as GNU C++ does.
(So you can derive Ada type extensions from C++ classes, and vice versa,
and do polymorphic stuff across languages.  Ada calls it a "tag field".)
So presumably that's not a problem.

> >  Check with ACT as to how these are handled.
> 
> Umm... what's ACT.  (Pardon my extreme ignorance when it comes to Ada.)

Oh, sorry.  Ada Core Technologies is the company that maintains GNAT.
They sell support contracts for GNAT, kind of like Cygnus does for other
GNU software.  Bugs fixes for paying customers end up in the freely
available version, of course.  Their e-mail address is report@gnat.com.
They can answer most of your questions better than I can.  Or Paul
Hilfinger (hilfinger@cs.berkeley.edu), who is teaching gdb about Ada.

> >Gdb has been modified to handle Ada programs OK, sort of, but it doesn't
> >fully understand Ada yet.
> 
> Do you know what's missing?

ACT or Hilfinger would have a more complete answer.  All I know is that
many data structures get printed out in a rather low level way.  For
example, a string gets printed out as a pair of addresses (pointer to
characters, pointer to bounds/dope).  It doesn't have a clue about Ada
tasking.  This is in the version of gdb I have, which is several months
old.  Hilfinger is still working on it, as far as I know.

Probably *most* of these things are not a problem for a GC, even though
they are a problem for a human user of the debugger.  What I mean is, in
most cases, you're not seeing incorrect or incomplete information --
you're just seeing information at a low level.

- Bob