From 987504bb93b4da9529d309ee545de78bc082fab2 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Mon, 20 Sep 2004 20:18:39 +0000 Subject: 2004-09-20 Jeff Johnston * 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. --- gdb/symtab.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gdb/symtab.c') 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) { -- cgit v1.1