From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29307 invoked by alias); 26 Jul 2003 16:04:24 -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 29295 invoked from network); 26 Jul 2003 16:04:24 -0000 Received: from unknown (HELO concert.shout.net) (204.253.184.25) by sources.redhat.com with SMTP; 26 Jul 2003 16:04:24 -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 h6QG4LgX018739; Sat, 26 Jul 2003 11:04:21 -0500 Received: from duracef.shout.net (localhost [127.0.0.1]) by duracef.shout.net (8.12.9/8.12.9) with ESMTP id h6QG4LHK021435; Sat, 26 Jul 2003 11:04:21 -0500 Received: (from mec@localhost) by duracef.shout.net (8.12.9/8.12.9/Submit) id h6QG4LJF021434; Sat, 26 Jul 2003 12:04:21 -0400 Date: Sat, 26 Jul 2003 16:04:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200307261604.h6QG4LJF021434@duracef.shout.net> To: geoffk@apple.com Subject: Re: C ASSEMBLER_NAME patch Cc: gcc-patches@gcc.gnu.org, gdb@sources.redhat.com X-SW-Source: 2003-07/txt/msg00312.txt.bz2 Geoff K writes: > This is supposed to happen under some circumstances. (Not the > circumstances that you're experiencing---I'm fixing that now---but some > other circumstances.) > > How should GCC emit stabs so that GDB does the right thing with these > symbol names? I'm not an expert on this, so I hope one of the symtab people (Daniel J) will correct me if I get this wrong: Names at file scope should not be qualified with ".number", and names at function scope can be qualified. The comment in lhd_set_decl_assembler_name says that is what it's doing ("Can't just use the variable's own name for a variable whose scope is less than the whole compilation.") so it looks like the test just needs to be adjusted, to my superficial eyes. We have a test (gdb.base/scope.exp) with lots of function-scoped and block-scoped static variables, and they are getting qualified, and gdb handles them properly. It's only these file-scope symbols that are hurting, and that happens just when a prototype is visible. That is: static void f1 (); static void f1 () { return; } static void f2 () { return; } f1 is getting qualified (bad) and f2 is not (good). Thanks, Michael C