This is the mail archive of the 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: GCC stabs don't contain prototype info

On Mon, Nov 26, 2001 at 10:44:23PM -0500, Jim Blandy wrote:
> This comes as a bit of a surprise to me, but it seems that stabs
> generated by GCC don't indicate whether a given function was defined
> with a prototype or not.  The argument types should appear after the
> return types, each preceded by a semicolon, but for the following
> input program:
>         int foo (int a, float b) { return a + b; }
> `gcc -save-temps -O2 -g -c' generates the following relevant stabs:
>     .stabs "int:t(0,1)=r(0,1);0020000000000;0017777777777;",128,0,0,0
>     .stabs "float:t(0,12)=r(0,1);4;0;",128,0,0,0
>     .stabs "foo:F(0,1)",36,0,1,foo
>     .stabs "a:P(0,1)",64,0,1,8
>     .stabs "b:P(0,12)",64,0,1,9
>     .stabs "",36,0,0,.LLscope0-foo
>             .stabs "",100,0,0,.Letext
> There is no no prototype info here.  There's no way for GDB to know
> that the function expects its second argument to be passed as a float,
> not promoted to a double, as the K&R-style rules specify.

Is there a standard stabs convention for this?  If so, it would be a
good idea to make development GCC emit it.

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]