aboutsummaryrefslogtreecommitdiff
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
commit987504bb93b4da9529d309ee545de78bc082fab2 (patch)
tree81f0db21727ca497ba8f42e2e608ffa13a5f03d2 /gdb/jv-exp.y
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/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 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: