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/jv-exp.y | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'gdb/jv-exp.y') diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y index 41da7d0..a3d1210 100644 --- a/gdb/jv-exp.y +++ b/gdb/jv-exp.y @@ -446,13 +446,22 @@ FieldAccess: /*| SUPER '.' SimpleName { FIXME } */ ; +FuncStart: + Name '(' + { push_expression_name ($1); } +; + MethodInvocation: - Name '(' ArgumentList_opt ')' - { error (_("Method invocation not implemented")); } + FuncStart + { start_arglist(); } + ArgumentList_opt ')' + { write_exp_elt_opcode (OP_FUNCALL); + write_exp_elt_longcst ((LONGEST) end_arglist ()); + write_exp_elt_opcode (OP_FUNCALL); } | Primary '.' SimpleName '(' ArgumentList_opt ')' - { error (_("Method invocation not implemented")); } + { error (_("Form of method invocation not implemented")); } | SUPER '.' SimpleName '(' ArgumentList_opt ')' - { error (_("Method invocation not implemented")); } + { error (_("Form of method invocation not implemented")); } ; ArrayAccess: -- cgit v1.1