This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFA] Fix for PR 17811
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Doug Evans'" <dje at google dot com>
- Cc: "'gdb-patches'" <gdb-patches at sourceware dot org>
- Date: Thu, 8 Jan 2015 09:04:54 +0100
- Subject: RE: [RFA] Fix for PR 17811
- Authentication-results: sourceware.org; auth=none
- References: <54adbf52 dot 69ce440a dot 7015 dot fffff8dcSMTPIN_ADDED_BROKEN at mx dot google dot com> <CADPb22RV5eDztkkuMc-x2-JLCGXXRtbVCeeqmQj8WJsTCH_3Xw at mail dot gmail dot com>
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
> <pierre.muller@ics-cnrs.unistra.fr> 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 <muller@sourceware.org>
> >
> > 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 <muller@sourceware.org>
+
+ PR symtab/17811
+ * stabsread.c (define_symbol): Set language for C++ special symbols.
+
2015-01-07 Patrick Palka <patrick@parcs.ath.cx>
* 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);