From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: Re: RFA: GCC stabs don't contain prototype info
Date: Tue, 13 Nov 2001 11:07:00 -0000 [thread overview]
Message-ID: <20011126224801.A2633@nevyn.them.org> (raw)
Message-ID: <20011113110700.ZhWnsYbVEqGaSYntQb2SCZar87GIIRoZvvlRd-BGxEE@z> (raw)
In-Reply-To: <20011127034423.DF2B75E9D8@zwingli.cygnus.com>
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
next prev parent reply other threads:[~2001-11-27 3:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-26 19:43 Jim Blandy
2001-11-13 10:56 ` Jim Blandy
2001-11-26 19:47 ` Daniel Jacobowitz [this message]
2001-11-13 11:07 ` Daniel Jacobowitz
2001-11-26 20:19 ` Jim Blandy
2001-11-13 15:38 ` Jim Blandy
2001-11-27 14:16 ` Michael Snyder
2001-11-15 7:01 ` Michael Snyder
2001-11-15 8:00 ` Daniel Berlin
2001-11-27 14:27 ` Daniel Berlin
2001-11-27 20:49 ` Jim Blandy
2001-11-16 10:45 ` Jim Blandy
2001-11-27 14:10 ` Michael Snyder
2001-11-15 2:38 ` Michael Snyder
2001-12-07 13:17 ` Jim Blandy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011126224801.A2633@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox