aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2004-09-20 20:18:39 +0000
committerJeff Johnston <jjohnstn@redhat.com>2004-09-20 20:18:39 +0000
commit987504bb93b4da9529d309ee545de78bc082fab2 (patch)
tree81f0db21727ca497ba8f42e2e608ffa13a5f03d2 /gdb/symtab.c
parent7213f6d65b75bda7dde6694db8efdf9ebeaeeedb (diff)
downloadgdb-987504bb93b4da9529d309ee545de78bc082fab2.zip
gdb-987504bb93b4da9529d309ee545de78bc082fab2.tar.gz
gdb-987504bb93b4da9529d309ee545de78bc082fab2.tar.bz2
2004-09-20 Jeff Johnston <jjohnstn@redhat.com>
* dwarf2read.c (typename_concat): Change prototype to accept obstack and dwarf2_cu struct pointer as arguments. Change function to use obstack if provided and use dwarf2_cu to determine language-specific separator. (partial_die_parent_scope): Change comment to include java. Use new version of typename_concat instead of obconcat. (partial_die_full_name): Use typename_concat. (read_namespace): Ditto. (read_enumeration_type): Use typename_concat instead of obconcat. (new_symbol): Ditto. (add_partial_symbol): Enhance tests for C++ to also test for Java. (guess_structure_name): Ditto. (read_subroutine_type): Ditto. (read_structure_type): Ditto. (is_vtable_name): Add Java support. (determine_class_name): Switch to new typename_concat call. (determine_prefix): Switch to new typename_concat call. * jv-exp.y (FuncStart): New pattern. (MethodInvocation): Add support for simple function calls. Change warning message for other forms of inferior call currently not supported. * valarith.c (value_subscript): Treat an array with upper-bound of -1 as unknown size.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index a6c009a..94b6081 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -998,7 +998,7 @@ lookup_symbol (const char *name, const struct block *block,
modified_name = name;
- /* If we are using C++ language, demangle the name before doing a lookup, so
+ /* If we are using C++ or Java, demangle the name before doing a lookup, so
we can always binary search. */
if (current_language->la_language == language_cplus)
{
@@ -1010,6 +1010,17 @@ lookup_symbol (const char *name, const struct block *block,
needtofreename = 1;
}
}
+ else if (current_language->la_language == language_java)
+ {
+ demangled_name = cplus_demangle (name,
+ DMGL_ANSI | DMGL_PARAMS | DMGL_JAVA);
+ if (demangled_name)
+ {
+ mangled_name = name;
+ modified_name = demangled_name;
+ needtofreename = 1;
+ }
+ }
if (case_sensitivity == case_sensitive_off)
{