From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27303 invoked by alias); 26 Jul 2003 21:51:07 -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 27288 invoked from network); 26 Jul 2003 21:51:05 -0000 Received: from unknown (HELO mail-out1.apple.com) (17.254.0.52) by sources.redhat.com with SMTP; 26 Jul 2003 21:51:05 -0000 Received: from mailgate2.apple.com (A17-129-100-225.apple.com [17.129.100.225]) by mail-out1.apple.com (8.12.9/8.12.9) with ESMTP id h6QLoriB008625 for ; Sat, 26 Jul 2003 14:50:53 -0700 (PDT) Received: from scv2.apple.com (scv2.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id ; Sat, 26 Jul 2003 14:51:04 -0700 Received: from apple.com (vpn-scv-x0-171.apple.com [17.219.192.171]) by scv2.apple.com (8.12.9/8.12.9) with ESMTP id h6QLp0QZ002210; Sat, 26 Jul 2003 14:51:00 -0700 (PDT) Date: Sat, 26 Jul 2003 21:51:00 -0000 Subject: Re: C ASSEMBLER_NAME patch Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) Cc: gcc-patches@gcc.gnu.org, gdb@sources.redhat.com To: Michael Elizabeth Chastain From: Geoffrey Keating In-Reply-To: <200307261604.h6QG4LJF021434@duracef.shout.net> Message-Id: <698134FE-BFB3-11D7-8472-0050E4BAD278@apple.com> Content-Transfer-Encoding: 7bit X-SW-Source: 2003-07/txt/msg00313.txt.bz2 On Saturday, July 26, 2003, at 09:04 AM, Michael Elizabeth Chastain wrote: > 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. No, 'scope less than the whole compilation' != 'file scope' if you are compiling multiple files into one .s file. I'll look at Daniel's suggestion. I'm told this works in dwarf-2, so it's probably just a bug in the STABS emitter in GCC.