public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* Re: [RFA] Fix for PR 17811
       [not found] <54adbf52.69ce440a.7015.fffff8dcSMTPIN_ADDED_BROKEN@mx.google.com>
@ 2015-01-08  0:45 ` Doug Evans
  2015-01-08  8:05   ` Pierre Muller
       [not found]   ` <54ae3a34.43a0420a.2c3b.fffffc79SMTPIN_ADDED_BROKEN@mx.google.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Doug Evans @ 2015-01-08  0:45 UTC (permalink / raw)
  To: Pierre Muller; +Cc: gdb-patches

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [RFA] Fix for PR 17811
  2015-01-08  0:45 ` [RFA] Fix for PR 17811 Doug Evans
@ 2015-01-08  8:05   ` Pierre Muller
       [not found]   ` <54ae3a34.43a0420a.2c3b.fffffc79SMTPIN_ADDED_BROKEN@mx.google.com>
  1 sibling, 0 replies; 4+ messages in thread
From: Pierre Muller @ 2015-01-08  8:05 UTC (permalink / raw)
  To: 'Doug Evans'; +Cc: 'gdb-patches'

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);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA] Fix for PR 17811
       [not found]   ` <54ae3a34.43a0420a.2c3b.fffffc79SMTPIN_ADDED_BROKEN@mx.google.com>
@ 2015-01-08 23:19     ` Doug Evans
  0 siblings, 0 replies; 4+ messages in thread
From: Doug Evans @ 2015-01-08 23:19 UTC (permalink / raw)
  To: Pierre Muller; +Cc: gdb-patches

On Thu, Jan 8, 2015 at 12:04 AM, Pierre Muller
<pierre.muller@ics-cnrs.unistra.fr> wrote:
> 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.

Yep, thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [RFA] Fix for PR 17811
@ 2015-01-07 23:20 Pierre Muller
  0 siblings, 0 replies; 4+ messages in thread
From: Pierre Muller @ 2015-01-07 23:20 UTC (permalink / raw)
  To: gdb-patches

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.


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]))
     {
       /* 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);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-08 23:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <54adbf52.69ce440a.7015.fffff8dcSMTPIN_ADDED_BROKEN@mx.google.com>
2015-01-08  0:45 ` [RFA] Fix for PR 17811 Doug Evans
2015-01-08  8:05   ` Pierre Muller
     [not found]   ` <54ae3a34.43a0420a.2c3b.fffffc79SMTPIN_ADDED_BROKEN@mx.google.com>
2015-01-08 23:19     ` Doug Evans
2015-01-07 23:20 Pierre Muller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).