summaryrefslogtreecommitdiff
path: root/gdb/jv-exp.y
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
commitbdf18a5498d63b9c203c755f8fba0f4acf323f48 (patch)
tree4279ab1f9f1ae35d42345612cf485ca6598749f6 /gdb/jv-exp.y
parent3e66d9ed331052d7feee5b6b0dee33cd83a788a6 (diff)
downloadgdb-bdf18a5498d63b9c203c755f8fba0f4acf323f48.tar.gz
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/jv-exp.y')
-rw-r--r--gdb/jv-exp.y17
1 files changed, 13 insertions, 4 deletions
diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y
index 41da7d0f3fd..a3d12104454 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: