diff options
author | Pierre Muller <muller@ics.u-strasbg.fr> | 2015-01-08 08:53:26 +0100 |
---|---|---|
committer | Pierre Muller <muller@ics.u-strasbg.fr> | 2015-01-08 09:01:04 +0100 |
commit | 025ac41482555f6273dee37988734a9f88633dbc (patch) | |
tree | 1127360edd71f88d0d6488e86570d3f9502e0e3f /gdb | |
parent | acc018ac031c9e03e012d7d2f3871bfe6b16168d (diff) | |
download | gdb-025ac41482555f6273dee37988734a9f88633dbc.zip gdb-025ac41482555f6273dee37988734a9f88633dbc.tar.gz gdb-025ac41482555f6273dee37988734a9f88633dbc.tar.bz2 |
Set language for C++ special symbols.
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.
2015-01-07 Pierre Muller <muller@sourceware.org>
PR symtab/17811
* stabsread.c (define_symbol): Set language for C++ special symbols.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/stabsread.c | 5 |
2 files changed, 8 insertions, 2 deletions
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); |