This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] Fix for PR 17811


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]