From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10125 invoked by alias); 3 Feb 2009 01:38:31 -0000 Received: (qmail 10116 invoked by uid 22791); 3 Feb 2009 01:38:31 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Feb 2009 01:38:25 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n131aMgT016930; Mon, 2 Feb 2009 20:36:22 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n131aMj1005237; Mon, 2 Feb 2009 20:36:22 -0500 Received: from opsy.redhat.com (vpn-12-182.rdu.redhat.com [10.11.12.182]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n131aLtx022944; Mon, 2 Feb 2009 20:36:22 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id C60075080FB; Mon, 2 Feb 2009 18:36:19 -0700 (MST) To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: RFA: fix PR gdb/2489 References: <200810212324.38183.pedro@codesourcery.com> <200902030121.48729.pedro@codesourcery.com> From: Tom Tromey Reply-To: Tom Tromey Date: Tue, 03 Feb 2009 01:38:00 -0000 In-Reply-To: <200902030121.48729.pedro@codesourcery.com> (Pedro Alves's message of "Tue\, 3 Feb 2009 01\:21\:47 +0000") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-02/txt/msg00049.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> Oh, sorry, I guess I wasn't clear. I meant after the Pedro> type_name_no_tag call, at the strcmp line. Oh, you were plenty clear -- I just misunderstood. Pedro> I mainly asked due to this: Pedro> /* Return a typename for a struct/union/enum type without "struct ", Pedro> "union ", or "enum ". If the type has a NULL name, return NULL. */ Pedro> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Pedro> char * Pedro> type_name_no_tag (const struct type *type) [...] Pedro> I don't know if that can happen here. That was also the reason I Pedro> suggested an annonymous struct/class test. I looked at the anonymous test struct case and I see: (top) p type_name $2 = 0x8fa3f1e "" However, this appears to come from g++: <2><361>: Abbrev Number: 33 (DW_TAG_structure_type) <362> DW_AT_name : (indirect string, offset: 0x172): I seem to recall that this is actually a change in g++. I tried with an older g++ and the dwarf says: <2><58b>: Abbrev Number: 29 (DW_TAG_structure_type) DW_AT_sibling : <5ab> DW_AT_name : ._0 ... which just seems weird. Anyway, I suspect that you are correct, and we could see a NULL here, but I don't know how to make it happen. I will add a check for NULL here tomorrow. Tom