From patchwork Wed Jan 7 23:20:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Muller X-Patchwork-Id: 4558 Received: (qmail 22047 invoked by alias); 7 Jan 2015 23:20:47 -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 22036 invoked by uid 89); 7 Jan 2015 23:20:46 -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.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Jan 2015 23:20:44 +0000 Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antispam (Postfix) with ESMTP id F0A03221F7E for ; Thu, 8 Jan 2015 00:20:41 +0100 (CET) Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antivirus (Postfix) with ESMTP id E035F221F95 for ; Thu, 8 Jan 2015 00:20:41 +0100 (CET) Received: from lmr.u-strasbg.fr (lmr2.u-strasbg.fr [172.30.21.2]) by mr1.u-strasbg.fr (Postfix) with ESMTP id CFEA5221F7E for ; Thu, 8 Jan 2015 00:20:40 +0100 (CET) Received: from lmr.u-strasbg.fr (localhost [127.0.0.1]) by antivirus (Postfix) with ESMTP id A1501A7 for ; Thu, 8 Jan 2015 00:20:40 +0100 (CET) Received: from E6510Muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (Authenticated sender: mullerp) by lmr2.u-strasbg.fr (Postfix) with ESMTPSA id 42133A5 for ; Thu, 8 Jan 2015 00:20:39 +0100 (CET) From: "Pierre Muller" To: Subject: [RFA] Fix for PR 17811 Date: Thu, 8 Jan 2015 00:20:38 +0100 Message-ID: <003b01d02ad0$8d0edcb0$a72c9610$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 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. /* Special GNU C++ names. */ @@ -710,8 +712,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); diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 212c7fa..ec883ba 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -675,6 +675,8 @@ 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])) {