public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [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
[parent not found: <54adbf52.69ce440a.7015.fffff8dcSMTPIN_ADDED_BROKEN@mx.google.com>]

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 --
2015-01-07 23:20 [RFA] Fix for PR 17811 Pierre Muller
     [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>
2015-01-08 23:19     ` Doug Evans

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