diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2004-09-20 20:18:39 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2004-09-20 20:18:39 +0000 |
commit | bdf18a5498d63b9c203c755f8fba0f4acf323f48 (patch) | |
tree | 4279ab1f9f1ae35d42345612cf485ca6598749f6 /gdb/valarith.c | |
parent | 3e66d9ed331052d7feee5b6b0dee33cd83a788a6 (diff) | |
download | gdb-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/valarith.c')
-rw-r--r-- | gdb/valarith.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/valarith.c b/gdb/valarith.c index 7858f91d0de..f88701faee8 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -202,7 +202,10 @@ value_subscript (struct value *array, struct value *idx) LONGEST index = value_as_long (idx); if (index >= lowerbound && index <= upperbound) return value_subscripted_rvalue (array, idx, lowerbound); - warning ("array or string index out of range"); + /* Emit warning unless we have an array of unknown size. + An array of unknown size has lowerbound 0 and upperbound -1. */ + if (upperbound > -1) + warning ("array or string index out of range"); /* fall doing C stuff */ c_style = 1; } |