Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@ACT-Europe.FR>
To: gdb-patches@sources.redhat.com
Subject: Re: .n suffixes for function names in stabs debug info (GCC 3.1-based compiler)
Date: Fri, 12 Apr 2002 01:43:00 -0000	[thread overview]
Message-ID: <20020412104307.C16134@act-europe.fr> (raw)
In-Reply-To: <20020411150444.A14251@nevyn.them.org>; from drow@mvista.com on Thu, Apr 11, 2002 at 03:04:44PM -0400

[I removed gcc@gcc.gnu.org, as this discussing is now taking a
GDB-specific turn]

Summary: I define a function called "inside" nested into function main.
Compiling with a gcc-3 backend using -gstabs+, I found that GDB is
having problems putting a breakpoint on function "inside":

> > (gdb) b inside
> > Function "inside" not defined.
> > (gdb) b inside.0 <<----  Argh, need to give the name with the (right!) suffix
> > Breakpoint 1 at 0x8048579: file hello.c, line 4.
> > >>

I pointed the source of the problem to the stabs line, were the ".0"
suffix was now present. Daniel Jacobowitz kindly answered that
GCC is right to put this suffix in the name before the ':' :

> According to that, your example:
> > .stabs  "inside.0:f(1,1)=(1,1),inside.0,main",36,0,4,inside.0
> 
> should be:
> > .stabs  "inside.0:f(1,1)=(1,1),inside,main",36,0,4,inside.0

What do you think of the scenario above? Is it acceptable that the user
has to use "inside.0" (and guess the right prefix) rather than "inside"
to break on this function? I suppose that this case does not happen very
often in C, and completion should help the user find which prefixes are
used.

Since this happens more often in Ada, I'd like to fix it at least in the
ada mode.

I have found two possibilities:
  (1) either enhance our ada "mode" in GDB to support these suffixes
      (I think this should not be too difficult, but other languages
      would not benefit from it)
  (2) or modify GDB in a language-independent manner. I'm not sure what
      the best way to achieve this would be yet, maybe by stripping
      these suffixes from the names read from the stabs info and from
      the symbols table? But at the same time this may disturb the
      support of other languages such as, maybe, c++.

What do you think?
-- 
Joel


  parent reply	other threads:[~2002-04-12  8:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-11  9:19 Joel Brobecker
2002-04-11 12:04 ` Daniel Jacobowitz
2002-04-12  1:28   ` Joel Brobecker
2002-04-12  1:43   ` Joel Brobecker [this message]
2002-04-12  7:34     ` Daniel Jacobowitz
2002-04-16  6:06       ` Daniel Berlin

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=20020412104307.C16134@act-europe.fr \
    --to=brobecker@act-europe.fr \
    --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