From: Daniel Jacobowitz <drow@mvista.com>
To: Michael Elizabeth Chastain <mec@shout.net>
Cc: gdb@sources.redhat.com
Subject: Re: gcc HEAD changes stab function names for static functions
Date: Fri, 25 Jul 2003 23:16:00 -0000 [thread overview]
Message-ID: <20030725231641.GA5317@nevyn.them.org> (raw)
In-Reply-To: <200307251829.h6PIT2xf004406@duracef.shout.net>
On Fri, Jul 25, 2003 at 02:29:02PM -0400, Michael Elizabeth Chastain wrote:
> I've got another regression in gcc HEAD and I just want to check whether
> it's a gcc bug or whether we should handle it in gdb.
>
> Here is the source code:
>
> static void f1 (int i);
> static void f1 (int i)
> {
> return;
> }
>
> Here is the output from gcc HEAD 20030716:
>
> .stabs "f1:f(0,21)=(0,21)",36,0,3,f1 .stabs "i:p(0,1)",160,0,2,8
> .type f1, @function f1:
> .stabn 68,0,3,.LM1-f1
>
> And here is the output from gcc HEAD 20030722:
>
> .stabs "f1.0:f(0,21)=(0,21)",36,0,3,f1.0
> .stabs "i:p(0,1)",160,0,2,8 .type f1.0, @function
> f1.0: .stabn 68,0,3,.LM1-f1.0
>
> The function name change from "f1" to "f1.0", even though "f1"
> is declared and defined at file scope. This happens with -gstabs+.
> It does not happen with -gdwarf-2 (or if it does, gdb is handling
> it okay).
>
> This looks like a bug in gcc. Or should gdb handle this, even at
> file scope?
>
> gcc has new code here and it will be easy to isolate the regression.
> gcc tries to test whether "f1" is at file scope or a local scope. I
> think it's getting mislead by the "static void f1 (int i);" declaration.
> But my real question is: should I whinge at gcc to change the compiler
> back, or whinge at gdb to accommodate the new compiler behavior.
This is fallback from Geoff's program-at-a-time patch. I thought he'd
been persuaded to change it back for file-at-a-time, but maybe he
didn't do it right - see the message from Bob Wilson yesterday. Don't
remember which gcc list.
It will probably be reverted. In any case, it should have been
"f1:f(0,21)" and f1.0:, the f1.0 bit should not appear in a stabs
string.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
prev parent reply other threads:[~2003-07-25 23:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-25 22:57 Michael Elizabeth Chastain
2003-07-25 23:16 ` Daniel Jacobowitz [this message]
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=20030725231641.GA5317@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb@sources.redhat.com \
--cc=mec@shout.net \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).