This is the mail archive of the gdb@sources.redhat.com 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: Prototyped function types


On Thu, Feb 21, 2002 at 04:06:26PM -0500, Jim Blandy wrote:
> 
> (I can't find the old thread on this subject, so I'm starting a new
> one.  Sorry.)
> 
> I recently added support to GDB for the stabs 'g' type descriptor, as
> described in Sun's STABS manual.  I was hoping Daniel would jump in
> and add the corresponding support to gcc/dbxout.c, but he seemed to
> have concerns about the types' syntax.

No, actually, I was hoping Jason would jump in and do it :)  He has a
much better understanding of the dbxout code than I do.

> Daniel, I think you were concerned about the lack of separators
> between the argument types; that is, a function taking three ints and
> returning an int will look something like this:
> 
>           g(0,1)(0,1)(0,1)(0,1)
> 
> Since there's no punctuation between the types, this syntax becomes
> ambiguous if you're using the older type number notation, in which
> type numbers are just numbers, not pairs of numbers separated by
> commas and surrounded by parens.  Then you'd get:
> 
>        g1111
> 
> which is obviously Not Okay.
> 
> However, I don't think this is a problem.  The compiler simply
> shouldn't use 'g' if it's not using (file,number) pairs.
> 
> But in general, I have no attachment to that particular syntax;
> whatever you propose, I'll try to implement.  Do you want semicolons?
> I just want to get this dealt with.  :)

I would say "Let's go with whatever Sun is doing".  But I have not been
able to get any of the Sun compilers at my disposal (which do neat
things with stabs, by the way - including proper namespace support!) to
produce these descriptors.  Perhaps they're too old...

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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