From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15003 invoked by alias); 12 Apr 2002 08:43:11 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14991 invoked from network); 12 Apr 2002 08:43:09 -0000 Received: from unknown (HELO dublin.ACT-Europe.FR) (212.157.227.154) by sources.redhat.com with SMTP; 12 Apr 2002 08:43:09 -0000 Received: from berlin.ACT-Europe.FR (berlin.int.act-europe.fr [10.10.0.169]) by dublin.ACT-Europe.FR (Postfix) with ESMTP id EE19E229E37 for ; Fri, 12 Apr 2002 10:43:07 +0200 (MET DST) Received: by berlin.ACT-Europe.FR (Postfix, from userid 507) id 74238980; Fri, 12 Apr 2002 10:43:07 +0200 (CEST) Date: Fri, 12 Apr 2002 01:43:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: Re: .n suffixes for function names in stabs debug info (GCC 3.1-based compiler) Message-ID: <20020412104307.C16134@act-europe.fr> References: <20020411181942.H29472@act-europe.fr> <20020411150444.A14251@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020411150444.A14251@nevyn.them.org>; from drow@mvista.com on Thu, Apr 11, 2002 at 03:04:44PM -0400 X-SW-Source: 2002-04/txt/msg00444.txt.bz2 [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