From patchwork Thu Jan 8 08:04:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre Muller X-Patchwork-Id: 4566 Received: (qmail 6649 invoked by alias); 8 Jan 2015 08:05:06 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 6631 invoked by uid 89); 8 Jan 2015 08:05:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL, BAYES_00, KAM_STOCKGEN, MSGID_MULTIPLE_AT autolearn=no version=3.3.2 X-HELO: mailhost.u-strasbg.fr Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.222.215) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Jan 2015 08:05:03 +0000 Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antispam (Postfix) with ESMTP id 2869DA1093; Thu, 8 Jan 2015 09:05:00 +0100 (CET) Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antivirus (Postfix) with ESMTP id 1885CA1083; Thu, 8 Jan 2015 09:05:00 +0100 (CET) Received: from lmr.u-strasbg.fr (lmr4.u-strasbg.fr [172.30.21.4]) by mr5.u-strasbg.fr (Postfix) with ESMTP id EAE76A165A; Thu, 8 Jan 2015 09:04:57 +0100 (CET) Received: from lmr.u-strasbg.fr (localhost [127.0.0.1]) by antivirus (Postfix) with ESMTP id BF46DD7; Thu, 8 Jan 2015 09:04:57 +0100 (CET) Received: from E6510Muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (Authenticated sender: mullerp) by lmr4.u-strasbg.fr (Postfix) with ESMTPSA id 305849A; Thu, 8 Jan 2015 09:04:55 +0100 (CET) From: "Pierre Muller" To: "'Doug Evans'" Cc: "'gdb-patches'" References: <54adbf52.69ce440a.7015.fffff8dcSMTPIN_ADDED_BROKEN@mx.google.com> In-Reply-To: Subject: RE: [RFA] Fix for PR 17811 Date: Thu, 8 Jan 2015 09:04:54 +0100 Message-ID: <002701d02b19$caa45b10$5fed1130$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Hi Doug, > -----Message d'origine----- > De : gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Doug Evans > Envoyé : jeudi 8 janvier 2015 01:46 > À : Pierre Muller > Cc : gdb-patches > Objet : Re: [RFA] Fix for PR 17811 > > On Wed, Jan 7, 2015 at 3:20 PM, Pierre Muller > wrote: > > The special handling of C++ special symbol > > generates symbols that have no language. > > Those symbols cannot be displayed correctly in the backtrace stack. > > > > See > > https://sourceware.org/bugzilla/show_bug.cgi?id=17811 > > for details and examples in C++ and pascal language. > > > > The patch below fixes this issue, by > > setting language of new symbol before > > special handling of special C++ symbols. > > > > > > Pierre Muller > > > > > > 2015-01-07 Pierre Muller > > > > Fix for PR 17811. > > * stabsread.c (define_symbol): Set language for C++ special > symbols. > > Hi. > LGTM with two nits: > > 1) A blank line after the SYMBOL_SET_LANGUAGE call would > block the code better to this reader. > 2) I believe convention is to remove the "Fix for" in the changelog > entry. Thanks, for the record, below is what I committed. I hope it takes your nits correctly into account. Pierre Muller $ git diff HEAD^ diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b188988..2fa7422 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-01-07 Pierre Muller + + PR symtab/17811 + * stabsread.c (define_symbol): Set language for C++ special symbols. + 2015-01-07 Patrick Palka * inflow.c (initial_gdb_ttystate): Tweak comment. diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 212c7fa..6862c52 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -675,6 +675,9 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_LINE (sym) = 0; /* unknown */ } + SYMBOL_SET_LANGUAGE (sym, current_subfile->language, + &objfile->objfile_obstack); + if (is_cplus_marker (string[0])) { /* Special GNU C++ names. */ @@ -710,8 +713,6 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, else { normal: - SYMBOL_SET_LANGUAGE (sym, current_subfile->language, - &objfile->objfile_obstack); if (SYMBOL_LANGUAGE (sym) == language_cplus) { char *name = alloca (p - string + 1);