Summary: | Stabs special "$t" support for this. | ||
---|---|---|---|
Product: | gdb | Reporter: | Pierre Muller <muller> |
Component: | symtab | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jeremip11, tromey |
Priority: | P2 | ||
Version: | unknown | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: |
Test sourc in C++ language
Pascal equivalent source |
Description
Pierre Muller
2015-01-07 23:04:05 UTC
Created attachment 8055 [details]
Pascal equivalent source
Using free pascal compiler
fpc -gs -Mobjfpc test-class-pascal.pas
and
gdb ./test-class-pascal
with
b TA__CHECK
shows the same problem
that "this" variable is not displayed correctly
in stack frame.
Note that the problem does not appear elsewhere:
(gdb) p this
works correctly.
Proposed patch: 2015-01-07 Pierre Muller <muller@sourceware.org> * 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); This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, master has been updated via 025ac41482555f6273dee37988734a9f88633dbc (commit) from acc018ac031c9e03e012d7d2f3871bfe6b16168d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=025ac41482555f6273dee37988734a9f88633dbc commit 025ac41482555f6273dee37988734a9f88633dbc Author: Pierre Muller <muller@ics.u-strasbg.fr> Date: Thu Jan 8 08:53:26 2015 +0100 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. ----------------------------------------------------------------------- Summary of changes: gdb/ChangeLog | 5 +++++ gdb/stabsread.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) The users/hjl/linux/master branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=025ac41482555f6273dee37988734a9f88633dbc commit 025ac41482555f6273dee37988734a9f88633dbc Author: Pierre Muller <muller@ics.u-strasbg.fr> Date: Thu Jan 8 08:53:26 2015 +0100 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. This looks like it was fixed a couple of years ago. |