definition from unsubmitted code.
(is_lower_alphanum): New function.
(ada_decode): Add support for decoding protected object subprograms
and entries, and of entities declared inside protected object
subprograms.
Also add missing handling for__{DIGITS}+ suffixes.
Allow '$<digits>' as valid overloading suffix.
(is_name_suffix): Add handling for protected type entriy suffixes.
Also add support for protected type subprogram suffixes, but keep
it commented out for now, as there is an ambiguity between these
entities and other internally generated entities.
Allow '$<digits>' as valid overloading suffix.
(is_valid_name_for_wild_match): New function.
(wild_match): Add an exra level of verification of the entity name
before declaring it a match for the given pattern.
(ada_type_of_array, ada_evaluate_subexp): Use more proper
longest_to_int rather than cast.
(ada_evaluate_subexp): Use "invalid" rather than "illegal" in comment.
(ada_coerce_to_simple_array): Call check_size to make sure
that the object size is reasonable.
(ada_value_primitive_packed_val): Use correct location in target
buffer for extracting packed record fields that are themselves records.
(add_defn_to_vec): Do not try to replace a stub type by its full
type. Avoids a potential infinite loop.
(ada_lookup_symbol): Move return incorrectly placed return statement,
causing a loop that should be scanning all object files to only
scan the first one.
(ada_tag_name_2): New function.
(ada_tag_name_1): If no 'tsd' field found in the dispatching table,
use alternative representation.
(ada_find_renaming_symbol): Strip the function name suffix when
computing the XR type name.
(ada_to_fixed_type): Try determining the tag only if we have the
object's address.
(to_fixed_array_type): Add comments.
(ada_check_typedef): Replace expression checking whether the given
type is a stub or not by a "call" to TYPE_STUB. Clearer and more
consistent.
* ada-lang.h (ADA_KNOWN_AUXILIARY_FUNCTION_NAME_PATTERNS): Allow
'$' in addition to '.' for runtime auxiliary function name suffixes.
See changes to ada_decode above.
(struct task_control_block): Add field called_task. (This change is
to keep synchronized with our local sources; it does not affect the
public version yet.)
* ada-typeprint.c (ada_print_type): Use int_string for printing
modulus of modular type.
(print_range): Trivial editorial comment fix.
* ada-valprint.c (ada_emit_char): Use normal Ada syntax for
double quote in string.
* language.h (language_defn): New field la_print_array_index.
(LA_PRINT_ARRAY_INDEX): New macro.
(default_print_array_index): Add declaration.
* language.c (default_print_array_index): new function.
(unknown_language): Add value for new field.
(auto_language): Likewise.
(local_language): Likewise.
* ada-lang.c (ada_print_array_index): New function.
(ada_language_defn): Add value for new field.
* c-lang.c (c_language_defn): Likewise.
(cpluc_language_defn): Likewise.
(asm_language_defn): Likewise.
(minimal_language_defn): Likewise.
* f-lang.c (f_language_defn): Likewise.
* jv-lang.c (java_language_defn): Likewise.
* m2-lang.c (m2_language_defn): Likewise.
* objc-lang.c (objc_language_defn): Likewise.
* p-lang.c (pascal_language_defn): Likewise.
* scm-lang.c (scm_language_defn): Likewise.
* valprint.h (print_array_indexes_p): Add declaration.
(get_array_low_bound): Add declaration.
(maybe_print_array_index): Add declaration.
* valprint.c (print_array_indexes): New static variable.
(show_print_array_indexes): New function.
(print_array_indexes_p): New function.
(get_array_low_bound): New function.
(maybe_print_array_index): New function.
(val_print_array_elements): Print the index of each element if
requested by the user.
(_initialize_valprint): Add new array-indexes "set/show print" command.
* ada-valprint.c (print_optional_low_bound): Replace extracted code
by call to ada_get_array_low_bound_and_type(). Stop printing the low
bound if indexes will be printed for all elements of the array.
(val_print_packed_array_elements): Print the index of each element
of the array if necessary.
* language.h (struct language_defn): Make la_printstr's buffer
parameter a const bfd_byte.
* p-lang.h (pascal_printstr): Update function to match.
* ada-valprint.c (ada_printstr): Update function to match.
* scm-lang.c (scm_printstr): Update function to match.
* p-lang.c (pascal_printstr): Update function to match.
* ada-lang.h (ada_printstr): Update function to match.
* m2-lang.c (m2_printstr): Update function to match.
* objc-lang.c (objc_printstr): Update function to match.
* c-lang.h (c_printstr): Update function to match.
* f-lang.c (f_printstr): Update function to match.
* c-lang.c (c_printstr): Update function to match.
* language.c (unk_lang_printstr): Update function to match.
modulus of modular type.
* ada-lang.h (ada_modulus): Change return type to unsigned.
* ada-lang.c (ada_language_arch_info): Correct type of
string_char_type.
(ada_modulus): Return unsigned result.
(ada_lookup_symbol): Remove user disambiguation and modify comment
accordingly.
2004-10-08 Eric Botcazou <ebotcazou@act-europe.fr>
Committed by Paul Hilfinger.
* ada-lang.c (decode_packed_array): On big-endian targets,
left-justify the value if it comes with a modular type.
2004-10-08 Joel Brobecker <brobecker@gnat.com>
Committed by Paul Hilfinger.
* ada-lang.c (template_to_static_fixed_type): Fix a small typo.
(is_name_suffix): Add support for "___JM" suffixes.
(ada_check_typedef): Renames ada_completed_type.
Update all users of CHECK_TYPEDEF, check_typedef, and
ada_complete_type to call ada_check_typedef.
* ada-typeprint.c: Likewise.
* ada-valprint.c: Likewise.
* ada-exp.y (write_var_from_sym): Reformat to put operator at
beginning of line.
* ada-lang.c (MAX_OF_SIZE): Rename max_of_size.
Add comment.
Add comment concerning MAX_OF_TYPE and MIN_OF_TYPE.
(MIN_OF_SIZE): Rename min_of_size. Add comment.
(UMAX_OF_SIZE): Renmae umax_of_size. Add comment.
(UMIN_OF_SIZE): Remove.
(max_of_type): New function to replace orphan macro in gdbtypes.h
(min_of_type): Ditto.
(discrete_type_high_bound): Use max_of_type.
(discrete_type_low_bound): Use min_of_type.
(possible_user_operator_p): Move operator to beginning of line.
(ada_is_variant_part): Ditto.
(ensure_lval): Rewrite to avoid deprecated operations.
(ada_finish_decode_line_1): Use gdbarch_convert_from_func_ptr_addr
rather than adding DEPRECATED_FUNCTION_START_OFFSET.
(ada_enum_name): Remove assignments in 'if' statements.
(build_ada_types): Add gdbarch parameter.
(_initialize_ada_language): Replace deprecated_register_gdbarch_swap
with gdbarch_data_register_post_init.
Use add_setshow_uinteger_cmd rather than add_set_cmd and
add_show_from_set.
* ada-valprint.c (inspect_it): Remove declaration.
(repeat_count_threshold): Remove declaration.
(ada_print_floating): Remove assignments in 'if' statements.
(print_str): Move operator to beginning of line.
(ada_value_slice_ptr): New function.
(ada_value_slice): New function.
(ada_evaluate_subexp): Remove XVS-suffix code from subscripting
test. Don't know why it is there.
Change slice code to use ada_value_slice_ptr and ada_value_slice, and
to avoid dereferencing huge arrays from which one is slicing.
(empty_array): Correct to return an array rather than
a subrange value.
* ada-valprint.c (print_optional_low_bound): Don't print lower bound
on empty arrays (let'em use 'FIRST instead).
* ada-exp.y: Include gdb_string.h rather than string.h.
(convert_char_literal): Reformat declaration.
* ada-lang.h: Include opaque struct declaration for struct frame_info.
* ada-lex.l: Change use of free to xfree (the macro would do so
anyway, but this is harmless).
Include gdb_string.h rather than string.h.
* ada-valprint.c (ada_val_print_stub): Change PTR => void*.
* ada-lang.c (parse): Remove K&Rism in parameter list.
(is_name_suffix): Correct Linux => GNU/Linux in comment.
* ada-lang.h: run through gdb_indent.sh
* ada-tasks.c: run through gdb_indent.sh
* ada-typeprint.c: run through gdb_indent.sh
* ada-valprint.c: run through gdb_indent.sh
(to_fixed_variant_branch_type) (find_line_in_linetable): Fix
prototype names so that grep ^func works properly.
* ada-lang.c (ada_array_element_type)
(ada_lookup_partial_symbol): Fix typos in parameter list.
* ada-valprint.c (val_print_packed_array_elements) (ada_val_print_1):
Fix prototype names so that grep ^func works properly.