From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12958 invoked by alias); 22 Oct 2002 21:40:08 -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 12951 invoked from network); 22 Oct 2002 21:40:07 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by sources.redhat.com with SMTP; 22 Oct 2002 21:40:07 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id g9MLduk26542; Tue, 22 Oct 2002 14:39:56 -0700 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: Daniel Berlin Cc: gdb-patches@sources.redhat.com, Elena Zannoni , Jim Blandy Subject: Re: [rfc/rfa] accept DW_TAG_namespace and friends, possibly on 5.3 References: From: David Carlton Date: Tue, 22 Oct 2002 14:40:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-10/txt/msg00428.txt.bz2 On Tue, 22 Oct 2002 17:17:49 -0400 (EDT), Daniel Berlin said: > On 22 Oct 2002, David Carlton wrote: >> I've tested this using current GCC, using GCC as patched according >> to , and >> using GCC as patched according to that message plus the following >> patch: >> --- dwarf2out.c-danielb Fri Oct 18 11:39:46 2002 >> +++ dwarf2out.c Fri Oct 18 11:38:46 2002 >> @@ -11453,7 +11453,11 @@ gen_namespace_die (decl, context_die) >> { >> /* Output a real namespace */ >> dw_die_ref namespace_die = new_die (DW_TAG_namespace, context_die, decl); >> - add_name_and_src_coords_attributes (namespace_die, decl); >> + /* Anonymous namespaces shouldn't have a DW_AT_name. */ >> + if (strncmp (dwarf2_name (decl, 0), "_GLOBAL__N", 10) == 0) >> + add_src_coords_attributes (namespace_die, decl); >> + else >> + add_name_and_src_coords_attributes (namespace_die, decl); >> equate_decl_number_to_die (decl, namespace_die); >> } >> else > Just FYI, the real fix is to move anonymous_namespace_name from > cp/cp-tree.h to c-common.h, and the actual declaration from > cp/decl.c to c-common.c , and pointer compare DECL_NAME (decl) to > anonymous_namespace_name. Lovely. I was sure you could come up with a better fix than mine; that strncmp gave me the willies. >> In all cases, there are no new regressions. Unfortunately, I don't >> currently have a version of GCC that emits many >> DW_TAG_imported_declarations or any DW_TAG_imported_modules; I hope >> that I'll have one soon (Daniel Berlin is working on it but he's >> busy; maybe I'll try to work on it myself, too), > I should have it done in a few hours, actually. Great! My hero. :-) David Carlton carlton@math.stanford.edu