From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13099 invoked by alias); 18 Oct 2012 21:09:12 -0000 Received: (qmail 13067 invoked by uid 22791); 18 Oct 2012 21:09:11 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 18 Oct 2012 21:09:04 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9IL92In020103 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 18 Oct 2012 17:09:03 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9IL91Hk012180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 18 Oct 2012 17:09:02 -0400 From: Tom Tromey To: "Saraswati\, Sujoy \(JCTL-MCBS\)" Cc: "gdb\@sourceware.org" Subject: Re: Query regarding new dwarf type support in gdb References: <5379BA8D7E9D7E4D87BF6749A92854C239425B12@G2W2431.americas.hpqcorp.net> Date: Thu, 18 Oct 2012 21:09:00 -0000 In-Reply-To: <5379BA8D7E9D7E4D87BF6749A92854C239425B12@G2W2431.americas.hpqcorp.net> (Sujoy Saraswati's message of "Thu, 18 Oct 2012 09:28:37 +0000") Message-ID: <87wqynwkr6.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-10/txt/msg00085.txt.bz2 >>>>> "Sujoy" == Saraswati, Sujoy (JCTL-MCBS) writes: Sujoy> I have a question on new dwarf type supports in gdb. For example, Sujoy> http://dwarfstd.org/ShowIssue.php?issue=090106.1&type=closed3 talks Sujoy> about a new DWARF tag DW_TAG_rvalue_reference_type to be added for Sujoy> debugging C++0x R-Value references. My question is, when the compilers Sujoy> start emitting this new tag in the debug sections, how does the older Sujoy> gdb handle it ? Does it gracefully skip this unknown type, or does it Sujoy> error out ? The dwarf2read.c file in gdb has many instances when Sujoy> error() is called. My understanding is that if gdb calls error() while Sujoy> processing the dwarf information for a module, the dwarf processing Sujoy> would be incomplete and debugging might get affected. I think gdb should issue a complaint (try "set complaints 1000") and then make a new TYPE_CODE_ERROR type. IIRC, g++ already emis rvalue references, but gdb doesn't handle them yet. You can see this in action by digging around in libstdc++, or maybe using gdb with complaints enabled and "file -readnow ...". We try to avoid calling 'error' during DWARF reading (not with complete success) since it tends to discard the whole file's debuginfo -- much too big a hammer. This area could use some fixes. Tom