aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarfread.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1991-11-06 01:08:21 +0000
committerPer Bothner <per@bothner.com>1991-11-06 01:08:21 +0000
commit545af6ce070ded76ef1b8697495a18dbe0990e6c (patch)
tree6ee06fb285b476377d97fa7a7e8becdaf012e44f /gdb/dwarfread.c
parent4906534f1f4f6c1a3444f370cfd9ecdf986e66a0 (diff)
downloadgdb-545af6ce070ded76ef1b8697495a18dbe0990e6c.zip
gdb-545af6ce070ded76ef1b8697495a18dbe0990e6c.tar.gz
gdb-545af6ce070ded76ef1b8697495a18dbe0990e6c.tar.bz2
Add C++ as a separate language.
Also, fix a C++ problem when looking for methods in super-classes. (There was confusion between base and derived types.)
Diffstat (limited to 'gdb/dwarfread.c')
-rw-r--r--gdb/dwarfread.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index ce29d83..47a6a79 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -1644,11 +1644,19 @@ DEFUN(end_symtab, (filename, language), char *filename AND long language)
symtab -> line_charpos = 0;
/* FIXME: The following may need to be expanded for other languages */
- if (language == LANG_C89 || language == LANG_C)
+ switch (language)
{
- symtab -> language = language_c;
+ case LANG_C89:
+ case LANG_C:
+ symtab -> language = language_c;
+ break;
+ case LANG_C_PLUS_PLUS:
+ symtab -> language = language_cplus;
+ break;
+ default:
+ ;
}
-
+
/* Link the new symtab into the list of such. */
symtab -> next = symtab_list;
symtab_list = symtab;