From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15649 invoked by alias); 25 Jul 2003 22:57:02 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 15636 invoked from network); 25 Jul 2003 22:57:01 -0000 Received: from unknown (HELO concert.shout.net) (204.253.184.25) by sources.redhat.com with SMTP; 25 Jul 2003 22:57:01 -0000 Received: from duracef.shout.net (duracef.shout.net [204.253.184.12]) by concert.shout.net (8.12.9/8.12.9) with ESMTP id h6PIT2gX009942 for ; Fri, 25 Jul 2003 13:29:02 -0500 Received: from duracef.shout.net (localhost [127.0.0.1]) by duracef.shout.net (8.12.9/8.12.9) with ESMTP id h6PIT2HK004407 for ; Fri, 25 Jul 2003 13:29:02 -0500 Received: (from mec@localhost) by duracef.shout.net (8.12.9/8.12.9/Submit) id h6PIT2xf004406 for gdb@sources.redhat.com; Fri, 25 Jul 2003 14:29:02 -0400 Date: Fri, 25 Jul 2003 22:57:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200307251829.h6PIT2xf004406@duracef.shout.net> To: gdb@sources.redhat.com Subject: gcc HEAD changes stab function names for static functions X-SW-Source: 2003-07/txt/msg00308.txt.bz2 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. Michael C