This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: stabs+ debug info


Waldek Hebisch <hebisch@math.uni.wroc.pl> writes:

> I would like to know how to generate correct stabs+ debug info about
> objects. AFAIKS `dbxout.c' uses method names as parts of stubs, 
> moreover objdump also takes part of type information from 
> mangled name. Both code in `dbxout.c' and in objdump look
> very C++ specific.

This is true of older versions of gcc.  gcc would optimize the
debugging output by not producing complete type information for
methods.  However, it never had to be done this way.  See
    http://sources.redhat.com/gdb/current/onlinedocs/stabs_7.html#SEC59
Basically, a class method stab starts with '#'.  If there are two '#'
chars, then you have to demangle the name.  But if there is only one,
the parameter types are provided as usual.  In fact, gcc always
generates a single '#' char now; I think this changed here:
    http://gcc.gnu.org/ml/gcc-patches/2001-05/msg01476.html
which ought to be gcc 3.1 and later.

> I would like to generate info about GNU Pascal objects, is it
> feasible to mangle Pascal names like C++ names (assuming I 
> accept some information loss) ? Are there any helper functions
> to generate mangled names.

You shouldn't have to bother with mangling.

> And not exactly gcc question: assuming I get out correct stabs,
> will then gdb able to show me Pascal objects (is it able to 
> show C++ objects) ?

gdb is able to show C++ objects.  It should be able to show you Pascal
objects if you describe them correctly.

Ian


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