Based on work from Daniel Jacobowitz <dan@codesourcery.com>
* c-typeprint.c (cp_type_print_method_args): For non-static methods,
print out const or volatile qualifiers, too.
(c_type_print_args): Add parameters show_artificial and language.
Skip artificial parameters when requested.
Use the appropriate language printer.
(c_type_print_varspec): Tell c_type_print_args to skip artificial
parameters and pass language_c.
* dwarf2read.c (die_list): New file global.
(struct partial_die_info): Update comments for name field.
(pdi_needs_namespace): Renamed to ...
(die_needs_namespace): ... this. Rewrite.
(dwarf2_linkage_name): Remove.
(add_partial_symbol): Do not predicate the call to
partial_die_full_name based on pdi_needs_namespace.
Remove call to cp_check_possible_namespace_symbols and associated
outdated comments.
(guess_structure_name): Do not inspect child subprogram DIEs.
(dwarf2_fullname): Update comments.
Use die_needs_namespace to assist in computing the name.
(read_func_scope): Use dwarf2_name to get the DIE's name.
Use dwarf2_physname to get the "linkage name" of the DIE.
(dwarf2_add_member_field): Use dwarf2_physname instead of
dwarf2_linkage_name.
(read_structure_type): For structs and classes, set TYPE_NAME, too.
(determine_class): Remove.
(read_partial_die): Ignore DW_AT_MIPS_linkage_name for all languages
except Ada.
(new_symbol): Unconditionally call dwarf2_name.
Compute the "linkage name" using dwarf2_physname.
Use dwarf2_name instead of dwarf2_full_name for enumerator DIEs.
When determining to scan for anonymous C++ namespaces, ignore
the linkage name.
(dwarf2_physname): New function.
(dwarf2_full_name): Move content to new function and call
that.
(dwarf2_compute_name): "New" function.
(_initialize_dwarf2_read): Initialize die_list.
* gnu-v3-eabi.c (gnu_v3_find_method_in): Remove unused variable
physname.
(gnu_v3_print_method_ptr): Use the physname for virtual methods
without a demangled name.
Print out type information for non-virtual methods.
* linespec.c (decode_line_1): Force ANY string using "::" (or
"." for java) to use decode_compound, and clean up any stray quoting.
If we found a file symtab, re-evaluate whether the remainder is_quoted.
(decode_compound): Stop consuming at an open parenthesis.
Keep template parameters.
Keep any overload information.
Keep keywords like "const".
Remove paren_pointer.
Move is_quoted check from set_flags to here.
Remove #if 0 code from 2000. Ten years is long enough.
(find_method): Before comparing symbol names, canonicalize the string
from the user.
If a specific overload is requested, find it. Otherwise throw an error.
(find_method_overload_end): New function.
(set_flags): Remove.
(decode_compound): Assume that parentheses are matched.
It's a lot easier.
* symtab.c (symbol_find_demangled_name): Add DMGL_VERBOSE flag
to cplus_demangle.
* linespec.c (decode_line_1): Keep important keywords like
"const" and "volatile".
* symtab.h (SYMBOL_CPLUS_DEMANGLED_NAME): Remove.
* typeprint.h (c_type_print_args): Add declaration.
* ui-file.c (do_ui_file_obsavestring): New function.
(ui_file_obsavestring): New function.
* ui-file.h (ui_file_obsavestring): Add declaration.
* valops.c (find_overload_match): Resolve the object to
a non-pointer type.
If the object is a data member, search the object for the member
and return with staticp set.
Use SYMBOL_NATURAL_NAME instead of SYMBOL_CPLUS_DEMANGLED_NAME.
Do not attempt to extract a function name from non-function types.
If the extracted function name and the original name are the same,
we don't have a C++ method.
From Jan Kratochvil <jan.kratochvil@redhat.com>:
* dwarf2read.c (new_symbol <DW_TAG_enumerator>): Call dwarf2_full_name.
* ada-lang.c (ada_lookup_symbol): Remove linkage_name parameters
and arguments from symbol lookups.
* ax-gdb.c (gen_expr): Likewise.
* cp-namespace.c (cp_lookup_symbol_nonlocal, lookup_namespace_scope,
cp_lookup_symbol_namespace, lookup_symbol_file, lookup_nested_type,
lookup_possible_namespace_symbol): Likewise.
* cp-support.c (read_in_psymtabs): Likewise.
* cp-support.h (cp_lookup_symbol_nonlocal): Likewise.
* language.h (la_lookup_symbol_nonlocal): Likewise.
* scm-valprint.c (scm_inferior_print): Likewise.
* solib-darwin.c (darwin_relocate_section_addresses): Likewise.
* solib-svr.c (elf_lookup_lib): Likewise.
* solib.c (show_auto_solib_add): Likewise.
* solist.h (lookup_lib_global, solib_global_lookup): Likewise.
* symmisc.c (maintenance_check_symtabs): Likewise.
* symtab.c (lookup_symbol_in_language, lookup_symbol_aux,
lookup_symbol_aux_local, lookup_symbol_aux_block,
lookup_symbol_from_objfile, lookup_symbol_aux_symtabs,
lookup_symbol_aux_psymtabs,basic_lookup_symbol_nonlocal,
lookup_symbol_static, lookup_symbol_global, symbol_matches_domain,
basic_lookup_transparent_type, find_main_psymtab,
lookup_block_symbol): Likewise.
* symtab.h (basic_lookp_symbol_nonlocal, lookup_symbol_static,
lookup_symbol_global, lookup_symbol_aux_block,
lookup_symbol_partial_symbol, lookup_block_symbol,
lookup_global_symbol, value_maybe_namespace_elt): Likewise.
* eval.c (make_params): New function.
(free_param_types): New function.
(evaluate_subexp_standard): Pass expect_type to value_aggregate_elt.
Handle case TYPE_INSTANCE.
(evaluate_subexp_for_address): Pass expect_type to value_aggregate_elt.
* expression.h (enum exp_opcode): Add TYPE_INSTANCE.
(compare_parameters): Add declaration.
* parse.c (operator_length_standard): Add TYPE_INSTANCE.
* valops.c (value_aggregate_elt): Add new expect_type parameter.
Pass expect_type to value_struct_elt_for_reference.
(value_struct_elt_for_reference): Add expect_type parameter and use
compare_parameters.
Check for overload matches with and without artificial parameters.
Skip artificial methods.
(compare_parameters): New function.
* value.h (value_aggregate_elt): Add new expect_type parameter.
platforms that use function descriptors. Prefer to use function
pointer types instead of function types.
* linespec.c (decode_objc): Support function descriptors. Fully
initialize SAL result.
* objc-lang.c (find_methods): Support function descriptors.
Do not require function symbol to point to text section.
* ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): When calling
via a function pointer, use the descriptor it points to.
smash_to_memberptr_type, lookup_array_range_type, check_stub_method):
Use type architecture instead of current_gdbarch.
* gdbtypes.h (address_space_name_to_int, address_space_int_to_name):
Add GDBARCH paramter.
* gdbtypes.c (address_space_name_to_int, address_space_int_to_name):
Add GDBARCH parameter. Use it instead of current_gdbarch.
* c-typeprint.c (c_type_print_modifier): Update call.
* parse.c (push_type_address_space): Likewise.
* findvar.c (extract_typed_address, store_typed_address): Use type
architecture instead of current_gdbarch.
* value.c (value_as_address, unpack_field_as_long): Use type architecture
instead of current_gdbarch.
* doublest.c (floatformat_from_length): Add GDBARCH argument. Use it
instead of current_gdbarch.
(floatformat_from_type): Pass type architecture.
* infcall.c (find_function_addr): Use type architecture instead
of current_gdbarch.
* valarith.c (value_bitstring_subscript, value_x_binop, value_neg,
value_bit_index): Use type architecture instead of current_gdbarch.
* valops.c (value_cast, value_slice): Likewise.
* value.h (modify_field): Add TYPE argument.
* value.c (modify_field): Add TYPE argument. Use type architecture
instead of current_gdbarch.
(set_internalvar_component): Likewise.
* eval.c (evaluate_struct_tuple): Update call.
* valops.c (value_assign): Likewise.
* ada-lang.c (modify_general_field): Likewise. Add TYPE argument.
(make_array_descriptor): Update calls.
(move_bits): Add BITS_BIG_ENDIAN_P argument. Use it instead of
current_gdbarch.
(ada_value_assign, value_assign_to_component): Update calls.
(decode_packed_array, ada_value_primitive_packed_val, ada_value_assign,
value_assign_to_component): Use type arch instead of current_gdbarch.
* printcmd.c (float_type_from_length): Remove GDBARCH argument,
use type architecture instead.
(print_scalar_formatted, printf_command): Update calls. Use type
architecture instead of current_gdbarch.
* valprint.c (val_print_type_code_int): Use type architecture
instead of current_gdbarch.
* varobj.c (value_get_print_value): Likewise.
* python/python-prettyprint.c (print_string_repr): Add GDBARCH
argument. Use it instead of current_gdbarch.
(apply_val_pretty_printer): Update call.
* ada-valprint.c (ada_val_print_1): Use type architecture instead
of current_gdbarch.
* c-valprint.c (print_function_pointer_address): Add GDBARCH argument.
Use it instead of current_gdbarch.
(c_val_print): Update calls passing type architecture.
* f-valprint.c (f_val_print): Use type architecture instead of
current_gdbarch.
* jv-valprint (java_value_print): Likewise.
* m2-valprint.c (print_function_pointer_address): Add GDBARCH argument.
Use it instead of current_gdbarch.
(print_unpacked_pointer): Update calls passing type architecture.
* scm-valprint.c (scm_scmval_print): Use type architecture instead of
current_gdbarch.
* gnu-v3-abi.c (get_class_arch): Remove.
(gnuv3_rtti_type): Use get_type_arch instead of get_class_arch. Remove
special-case check for Java classes.
(gnuv3_virtual_fn_field, gnuv3_baseclass_offset, gnuv3_print_method_ptr,
gnuv3_method_ptr_size, gnuv3_make_method_ptr, gnuv3_method_ptr_to_value):
Use get_type_arch instead of get_class_arch.
* gdbtypes.c (gdbtypes_post_init): Initialize it.
* value.c (internal_fn_type): Remove.
(_initialize_values): Do not initialize it.
* value.c (struct internalvar): Add enum internalvar_kind type and
kind member. Restructure union internalvar_data type. Remove type,
canonical, and make_value members.
(init_if_undefined_command): Update for data structure changes.
(create_internalvar): Likewise.
(create_internalvar_type_lazy): Likewise.
(get_internalvar_integer): Likewise.
(get_internalvar_function): Likewise.
(set_internalvar_component): Likewise.
(set_internalvar): Likewise.
(set_internalvar_integer): Likewise.
(set_internalvar_function): Likewise.
(clear_internalvar): Likewise.
(add_internal_function): Likewise.
(preserve_one_internalvar): New function.
(preserve_values): Call it.
* value.h (value_of_internalvar): Add GDBARCH parameter.
(internalvar_make_value): Likewise.
* value.c (value_of_internalvar): Add GDBARCH parameter. Pass it to
make_value callback. Use it to generate per-architecture result value
types for internal variables with no pre-defined type. Update for data
structure changes.
(show_convenience): Pass architecture to value_of_internalvar.
* eval.c (evaluate_subexp_standard): Likewise.
* infrun.c (siginfo_make_value): Add GDBARCH parameter. Use it
instead of current frame architecture. Return per-architecture type.
* value.h (set_internalvar_string): Add prototype.
* value.c (set_internalvar_string): New function.
* tracepoint.c (set_traceframe_context): Use it.
value_bitstring_subscript, value_ptradd): Use LONGEST instead
of value as type of the index argument.
(value_ptrsub): Remove.
* valarith.c (value_subscript, value_subscripted_rvalue,
value_bitstring_subscript, value_ptradd): Use LONGEST instead
of value as type of the index argument.
(value_ptrsub): Remove.
* wrapper.h (gdb_value_subscript): Use LONGEST instead of
value as type of the index argument.
* wrapper.c (gdb_value_subscript): Likewise.
Update calls to gdb_value_subscript, value_subscript,
value_subscripted_rvalue, value_bitstring_subscript and
value_ptradd to use LONGEST instead of value as index
argument type. Use value_ptradd instead of value_ptrsub.
* ada-lang.c (ada_value_subscript, ada_value_ptr_subscript,
ada_tag_name_2): Update.
* ada-tasks.c (read_atcb): Update.
* eval.c (evaluate_subexp_standard): Update.
* valarith.c (value_subscript): Update.
* gnu-v2-abi.c (gnuv2_virtual_fn_field): Update.
* gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
gnuv3_method_ptr_to_value): Update.
* jv-lang.c (evaluate_subexp_java): Update.
* m2-lang.c (evaluate_subexp_modula2): Update.
* python/python-value.c (valpy_getitem, valpy_binop): Update.
* wrapper.c (gdb_value_subscript): Update.
* varobj.c (c_describe_child): Update.
* gdbtypes.h (create_string_type): Add character type argument.
* dwarf2read.c (read_tag_string_type): Pass character type to
create_string_type.
* value.h (value_string): Add character type argument.
* valops.c (value_string): Add character type argument. Pass it to
create_string_type. Do not allocate space in inferior.
* valarith.c (value_concat): Pass character type to value_string.
* value.h (value_typed_string): Rename to ...
(value_cstring): ... this.
* valops.c (value_typed_string): Rename to ...
(value_cstring): ... this.
* c-lang.c (evaluate_subexp_c): Update.
* python/python-value.c (builtin_type_pychar): New define.
(convert_value_from_python): Call value_cstring instead
of value_from_string.
* value.c (value_from_string): Remove.
* value.h (value_from_string): Remove.
* eval.c (evaluate_subexp_standard): Pass character type to
value_string. Pass expression architecture to value_nsstring
and lookup_child_selector.
* objc-lang.h (lookup_objc_class): Add GDBARCH parameter.
(lookup_child_selector): Likewise.
(value_nsstring): Likewise.
* objc-lang.c (lookup_objc_class): Add GDBARCH parameter.
Pass character type to value_string..
(lookup_child_selector): Likewise.
(value_nsstring): Add GDBARCH parameter, use it instead of
objfile architecture. Pass architecture to lookup_objc_class
and lookup_child_selector. Pass character type to value_string.
(end_msglist): Pass architecture to lookup_objc_class.
* objc-exp.y: Pass architecture to lookup_objc_class.
Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf2read.c (process_die): Handle DW_TAG_typedef.
* eval.c (evaluate_subexp_standard) <OP_TYPE>: Strip a single
typedef.
* ada-lang.c (decode_packed_array_type): Call CHECK_TYPEDEF on the
SYMBOL_TYPE result.
* ada-typeprint.c (print_array_type): Do the NULL check
unconditionally.
Silence a few -Wmissing-prototypes warnings.
PR build/9877:
* amd64-nat.c: Include "amd64-nat.h".
* fork-child.c (_initialize_fork_child): Ditto.
* gcore.c (_initialize_gcore): Ditto.
* inf-ptrace.c: Include "inf-ptrace.h".
(inf_ptrace_store_registers): Make it static.
* linux-nat.c (linux_nat_terminal_ours): Make it static.
(_initialize_linux_nat): Declare before definition.
* linux-tdep.c: Include "linux-tdep.h".
* linux-thread-db.c (_initialize_thread_db): Declare before
definition.
* proc-service.c (_initialize_proc_service): Ditto.
* remote.c (remote_send_printf): Make it static.
* solib.c: Include "solib.h".
* symfile-mem.c (_initialize_symfile_mem): Declare before
definition.
* ada-lang.c (ada_la_decode, ada_match_name)
(ada_suppress_symbol_printing, ada_is_array_type)
(ada_value_ptr_subscript, ada_array_length)
(ada_to_static_fixed_value): Make them static.
(_initialize_ada_language): Declare before definition.
* ada-tasks.c (ada_get_task_number, ada_get_environment_task)
(ada_task_list_changed, ada_new_objfile_observer): Make them
static.
(_initialize_tasks): Declare before definition.
* addrmap.c (_initialize_addrmap): Declare before definition.
* auxv.c (default_auxv_parse): Make it static.
* bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
them static.
* breakpoint.c (remove_sal): Add line break.
(expand_line_sal_maybe): Make it static.
* cp-name-parser.y: Include "cp-support.h".
* cp-valprint.c (cp_find_class_member): Make it static.
* eval.c (value_f90_subarray): Ditto.
* exceptions.c (print_any_exception): Ditto.
* findcmd.c (_initialize_mem_search): Declare before definition.
* frame.c (frame_observer_target_changed): Make it static.
* gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
* inf-child.c: Include "inf-child.h".
* inferior.h (valid_inferior_id): Rename to ...
(valid_gdb_inferior_id): ... this.
* infrun.c (infrun_thread_stop_requested, siginfo_make_value):
Make them static.
* jv-lang.c (java_language_arch_info): Make it static.
* m2-typeprint.c (m2_get_discrete_bounds): Ditto.
* osdata.c (info_osdata_command): Make it static.
* regcache.c (regcache_observer_target_changed): Make it static.
* reverse.c (_initialize_reverse): Declare before definition.
* stabsread.c (cleanup_undefined_types_noname)
(cleanup_undefined_types_1): Make them static.
* symfile.c (place_section): Make it static.
* symtab.c (find_pc_sect_psymtab_closer): Make it static.
* target-descriptions.c (_initialize_target_descriptions): Declare
before definition.
* target.c (default_get_ada_task_ptid, find_default_can_async_p)
(find_default_is_async_p, find_default_supports_non_stop): Make
them static.
(target_supports_non_stop): Add prototype.
(dummy_pid_to_str): Make it static.
* utils.c (_initialize_utils): Declare before definition.
* ada-exp.y (_initialize_ada_exp): Declare before definition.
* solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
* target.h (struct target_ops): Add a prototype to the
to_can_execute_reverse callback.
* macroscope.c (_initialize_macroscope): Declare before definition.
* cp-namespace.c (_initialize_cp_namespace): Declare before definition.
* python/python.c (_initialize_python): Declare before definition.
* tui/tui-command.c: Include "tui/tui-command.h".
* tui/tui-data.c (init_content_element, init_win_info): Make them
static.
* tui/tui-disasm.c: Include "tui/tui-disasm.h".
* tui/tui-interp.c (_initialize_tui_interp): Declare before
definition.
* tui/tui-layout.c: Include "tui/tui-layout.h".
(_initialize_tui_layout): Declare before definition.
* tui/tui-regs.c: Include "tui/tui-regs.h".
(tui_display_reg_element_at_line): Make it static.
(_initialize_tui_regs): Declare before definition.
* tui/tui-stack.c (_initialize_tui_stack): Declare before
definition.
* tui/tui-win.c: Include "tui/tui-win.h".
(_initialize_tui_win): Declare before definition.
(tui_sigwinch_handler): Make it static. Wrap in ifdef SIGWINCH.
* tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
(tui_get_cmd_list): Add a prototype.
* tui/tui-windata.c: Include tui-windata.h.
* tui/tui-wingeneral.c (box_win): Make it static.
* cli/cli-logging.c (show_logging_command): Make it static.
(_initialize_cli_logging): Declare before definition.
* mi/mi-common.c (_initialize_gdb_mi_common): Declare before
definition.
(locate_var_value): Remove prototype.
* findvar.c (read_var_value): Do not attempt to default frame
to selected frame.
(locate_var_value): Remove function.
* valops.c (value_of_variable): Retrieve selected frame for
symbols that require a frame when called with NULL block.
* valops.c (address_of_variable): New function.
* eval.c (evaluate_subexp_for_address): Call address_of_variable
instead of calling locate_var_value.
(evaluate_subexp_with_coercion): Likewise.
preparation for supporting DW_AT_byte_stride.
* ada-lang.c (packed_array_type, ada_index_type): Use TYPE_INDEX_TYPE.
(ada_array_bound_from_type): Move `index_type' declaration to the
function start. New variable `retval'. Return the bounds for
TYPE_CODE_RANGE using TYPE_LOW_BOUND and TYPE_HIGH_BOUND. Abort on
invalid index type codes.
* ada-typeprint.c (print_range): Set `upper_bound' for TYPE_CODE_RANGE
now using TYPE_HIGH_BOUND.
* ada-valprint.c (val_print_packed_array_elements): Use `index_type'.
* eval.c (evaluate_subexp_standard): Use TYPE_INDEX_TYPE.
* gdbtypes.c (create_range_type): Use TYPE_LOW_BOUND, TYPE_HIGH_BOUND,
refer to the number of fields only through TYPE_NFIELDS.
(create_array_type): Use TYPE_INDEX_TYPE.
(check_typedef): Use TYPE_INDEX_TYPE, TYPE_LOW_BOUND, TYPE_HIGH_BOUND.
* gdbtypes.h (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED)
(TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): Use TYPE_INDEX_TYPE.
(TYPE_ARRAY_UPPER_BOUND_VALUE, TYPE_ARRAY_LOWER_BOUND_VALUE): Use
TYPE_INDEX_TYPE, TYPE_LOW_BOUND, TYPE_HIGH_BOUND,
* hppa-tdep.c (hppa_alignof <TYPE_CODE_ARRAY>): Use TYPE_INDEX_TYPE.
* mdebugread.c (parse_type): Use TYPE_LOW_BOUND, TYPE_HIGH_BOUND,
* valarith.c (value_bit_index): Use TYPE_INDEX_TYPE.
Replace TYPE_ARRAY_{UPPER,LOWER}_BOUND_TYPE by a bit if {un,}defined.
* c-typeprint.c (c_type_print_varspec_suffix), m2-typeprint.c
(m2_array), p-typeprint.c (pascal_type_print_varspec_prefix),
valops.c (value_cast), varobj.c (c_number_of_children): Replace
TYPE_ARRAY_UPPER_BOUND_TYPE compared to BOUND_CANNOT_BE_DETERMINED by
TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
* parse.c (follow_types): Use TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
* f-valprint.c (f77_get_dynamic_upperbound): Replace with ...
(f77_get_upperbound): ... this function handling now only
TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
(f77_get_dynamic_lowerbound): Replace with ...
(f77_get_lowerbound): ... this function handling now only
TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED.
(f77_get_dynamic_length_of_aggregate, f77_create_arrayprint_offset_tbl):
Update their callers.
* eval.c (evaluate_subexp_standard): Update their callers.
* f-lang.h (f77_get_dynamic_upperbound, f77_get_upperbound)
(f77_get_dynamic_lowerbound, f77_get_lowerbound): Update their
prototypes.
(BOUND_FETCH_OK, BOUND_FETCH_ERROR): Remove.
* f-typeprint.c (f_type_print_varspec_suffix, f_type_print_base): Remove
the lower_bound_was_default variable. Update the
f77_get_dynamic_upperbound, f77_get_upperbound and
TYPE_ARRAY_UPPER_BOUND_TYPE calls.
* gdbtypes.c (print_bound_type): Remove the function.
(recursive_dump_type): Remove its calls printing UPPER_BOUND_TYPE and
LOWER_BOUND_TYPE.
* gdbtypes.h (enum array_bound_type): Remove.
(struct main_type): Remove the fields upper_bound_type and
lower_bound_type. Comment the new overload of the field artificial.
(TYPE_ARRAY_UPPER_BOUND_TYPE): Replace by ...
(TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED): ... this macro.
(TYPE_ARRAY_LOWER_BOUND_TYPE): Replace by ...
(TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): ... this macro.
gdb/testsuite/
* gdb.base/maint.exp (maint print type): Remove printing
UPPER_BOUND_TYPE and LOWER_BOUND_TYPE.
and unop_promote before calling value_binop et. al.
* ada-lang.c (ada_evaluate_subexp): Add calls to binop_promote
and unop_promote before calling value_binop et. al.
* valarith.c (value_binop): Do not call binop_promote or unop_promote.
(value_pos): Do not call unop_promote.
(value_neg, value_complement): Likewise.
* eval.c (unop_promote, binop_promote): New functions.
* valarith.c (unop_result_type, binop_result_type): Remove.
(value_binop): Call binop_promote or unop_promote.
Inline remaining parts of binop_result_type. Remove special
code to truncate integer values for unsigned operations.
(value_pos): Call unop_promote. Inline remaining parts of
unop_result_type.
(value_neg, value_complement): Likewise.
a type parameter as expression element.
* eval.c (evaluate_subexp_standard) [OP_COMPLEX]: Retrieve result
type as expression element.
* f-exp.y: Pass in type when buildin OP_COMPLEX expression.
* parse.c (operator_length_standard): Update length of OP_COMPLEX.
bool_type_default and bool_type_symbol.
(lang_bool_type): Remove prototype.
(LA_BOOL_TYPE): Remove macro.
(language_bool_type): Add prototype.
* language.c (lang_bool_type): Remove.
(language_bool_type): New function.
* value.h (value_in): Change return value to int.
* value.c (value_in): Return int instead of struct value *.
* eval.c (evaluate_subexp_standard): Call language_bool_type instead
of using LA_BOOL_TYPE. Update call to value_in.
* ada-lang.c (ada_evaluate_subexp): Call language_bool_type instead
of using LA_BOOL_TYPE or builtin_type_int for boolean values.
* language.c (unknown_language_arch_info): Set bool_type_default member
of struct language_arch_info.
* ada-lang.c (ada_language_arch_info): Set bool_type_symbol and
bool_type_default members of struct language_arch_info.
* c-lang.c (c_language_arch_info): Set bool_type_default member
of struct language_arch_info.
(cplus_language_arch_info): Set bool_type_symbol and bool_type_default
members of struct language_arch_info.
* f-lang.c (f_language_arch_info): Set bool_type_symbol and
bool_type_default members of struct language_arch_info.
* jv-lang.c (java_language_arch_info): Set bool_type_symbol and
bool_type_default members of struct language_arch_info.
* m2-lang.c (m2_language_arch_info): Set bool_type_symbol and
bool_type_default members of struct language_arch_info.
* p-lang.c (p_language_arch_info): Set bool_type_symbol and
bool_type_default members of struct language_arch_info.
(frame_map_name_to_regnum): Remove prototype.
* frame.c (frame_map_regnum_to_name): Remove.
(frame_map_name_to_regnum): Remove.
(frame_unwind_register_value): Use user_reg_map_regnum_to_name
instead of frame_map_regnum_to_name.
* ax-gdb.c: Include "user-regs.h".
(gen_expr): Use user_reg_map_name_to_regnum instead of
frame_map_name_to_regnum.
* eval.c: Include "user-regs.h".
(evaluate_subexp_standard): Use user_reg_map_name_to_regnum
instead of frame_map_name_to_regnum.
* infcmd.c (registers_info): Likewise.
* parse.c: Include "user-regs.h".
(write_dollar_variable): Use user_reg_map_name_to_regnum
instead of frame_map_name_to_regnum.
* tracepoint.c: Include "user-regs.h".
(encode_actions): Use user_reg_map_name_to_regnum
instead of frame_map_name_to_regnum.
* valops.c: Include "user-regs.h".
(value_fetch_lazy): Use user_reg_map_regnum_to_name instead
of frame_map_regnum_to_name.
Use value_must_coerce_to_target.
* infcall.c (value_arg_coerce): Call value_coerce_to_target.
* valops.c (value_assign): Call value_coerce_to_target when
assigning to anything but internalvars. Leave GDB-side arrays
as arrays when assigning to internalvars.
(value_must_coerce_to_target, value_coerce_to_target): New.
(value_coerce_array, value_addr): Call value_coerce_to_target.
(value_array): Create the array in GDB's memory instead of
the inferior's.
* value.h (value_must_coerce_to_target, value_coerce_to_target):
Declare.
* gdb.texinfo (Expressions): Update description of malloced arrays.
* gdb.base/printcmds.exp (test_print_array_constants): Do not expect
*& to work on created array elements.
(Top level): Test print $pc with a file. Test string operations
without a target.
* gdb.base/ptype.exp: Do not expect *& to work on created array
elements.
integer/float division operations when EVAL_AVOID_SIDE_EFFECTS.
* valops.c (value_one): New function.
* value.h (value_one): Declare.
Fix argument promotion for binary arithmetic ops for C.
* valarith.c (unop_result_type): New fn.
(binop_result_type): New fn.
(value_binop): Move result type computation to binop_result_type.
(value_pos, value_neg, value_complement): Move result type
computation to unop_result_type.
* gdb.base/whatis-exp.exp: Fix expected result of whatis x+y, x-y, x*y.
Thiago Jung Bauermann <bauerman@br.ibm.com>
* c-exp.y (YYSTYPE): Add typed_val_decfloat for decimal
floating point in YYSTYPE union.
(DECFLOAT) Add token and expression element handling code.
(parse_number): Parse DFP constants, which end with suffix 'df',
'dd' or 'dl'. Return DECFLOAT.
* eval.c (evaluate_subexp_standard): Call value_from_decfloat to
handle OP_DECFLOAT.
* expression.h (enum exp_opcode): Add an opcode (OP_DECFLOAT)
for DFP constants.
(union exp_element): Add decfloatconst to represent DFP
elements, which is 16 bytes by default.
* parse.c (write_exp_elt_decfloatcst): New function to write a
decimal float const into the expression.
(operator_length_standard): Set operator length for OP_DECFLOAT
to 4.
* parser-defs.h (write_exp_elt_decfloatcst): Prototype.
* valarith.c (value_neg): Add code to handle the negation
operation of DFP values.
* value.c (value_from_decfloat): New function to get the value
from a decimal floating point.
* value.h (value_from_decfloat): Prototype.
* eval.c: Include "ui-out.h" and "exceptions.h".
(evaluate_subexp_standard): Use TRY_CATCH around value_of_variable.
Use value_zero if an error occurs when avoiding side effects.
* varobj.c (c_value_of_root): Initialize new_val.
* gdb.mi/mi-var-cmd.exp: Add tests for unreadable varobjs.
* Makefile.in (gnu-v3-abi.o): Delete special rule.
(eval.o, gnu-v3-abi.o, ia64-tdep.o): Update.
* ada-valprint.c (ada_print_scalar): Update for new type codes.
* c-typeprint.c (c_print_type): Update for new type codes.
(c_type_print_varspec_prefix, c_type_print_varspec_suffix)
(c_type_print_base): Likewise.
(c_type_print_args): Rewrite.
* c-valprint.c (c_val_print): Update for new type codes. Remove
support for references to members. Treat methods like functions.
* cp-abi.c (cplus_print_method_ptr, cplus_method_ptr_size)
(cplus_make_method_ptr, cplus_method_ptr_to_value): New.
* cp-abi.h (cplus_print_method_ptr, cplus_method_ptr_size)
(cplus_make_method_ptr, cplus_method_ptr_to_value): New prototypes.
(struct cp_abi_ops): Add corresponding members.
* cp-valprint.c (cp_print_class_method): Delete.
(cp_find_class_member): New function.
(cp_print_class_member): Use it. Simplify support for bogus
member pointers.
* dwarf2read.c (quirk_gcc_member_function_pointer): Use
lookup_methodptr_type.
(read_tag_ptr_to_member_type): Likewise, and lookup_memberptr_type.
* eval.c (evaluate_subexp_standard): Implement EVAL_SKIP for
OP_SCOPE. Update call to value_aggregate_elt. Rewrite member
pointer support.
(evaluate_subexp_for_address): Handle OP_SCOPE explicitly. Handle
references returned by user defined operators.
* f-typeprint.c (f_print_type, f_type_print_varspec_prefix)
(f_type_print_varspec_suffix): Remove support for member pointers.
* gdbtypes.c (lookup_memberptr_type): Renamed from lookup_member_type
and adjusted.
(smash_to_memberptr_type): Likewise, from smash_to_member_type.
(lookup_methodptr_type): New.
(rank_one_type): Adjust for TYPE_CODE_MEMBERPTR.
(recursive_dump_type): Update for new types.
* gdbtypes.h (enum type_code): Replace TYPE_CODE_MEMBER with
TYPE_CODE_MEMBERPTR and TYPE_CODE_METHODPTR.
(lookup_memberptr_type, lookup_methodptr_type)
(smash_to_memberptr_type): New prototypes.
(smash_to_method_type): Formatting fix.
(lookup_member_type, smash_to_member_type): Delete prototypes.
* gnu-v3-abi.c (gnuv3_get_vtable, gnuv3_get_virtual_fn): New.
Do not rely on debug information for the vptr or the method's
enclosing type. Handle function descriptors for IA64.
(gnuv3_virtual_fn_field): Rewrite using the new functions.
(gnuv3_find_method_in, gnuv3_print_method_ptr)
(gnuv3_method_ptr_size, gnuv3_make_method_ptr)
(gnuv3_method_ptr_to_value): New.
(init_gnuv3_ops): Set new members of gnu_v3_abi_ops.
* hpread.c (hpread_type_lookup): Update for new types.
* infcall.c (value_arg_coerce): Likewise.
* m2-typeprint.c (m2_print_type): Remove explicit support
for member pointers.
* m2-valprint.c (m2_val_print): Likewise.
* p-typeprint.c (pascal_type_print_varspec_prefix)
(pascal_type_print_varspec_suffix, pascal_type_print_base): Likewise.
* p-valprint.c (pascal_val_print): Likewise.
(pascal_object_print_class_method, pascal_object_print_class_member):
Delete.
* p-lang.h (pascal_object_print_class_method)
(pascal_object_print_class_member): Delete prototypes.
* stabsread.c (read_type): Update for new types.
* typeprint.c (print_type_scalar): Likewise.
* valops.c (value_struct_elt_for_reference, value_namespace_elt)
(value_maybe_namespace_elt, value_aggregate_elt): Add want_address
argument. Construct a pointer to member if the address of a
function or data member is requested.
(value_cast_pointers): Don't modify the input value.
(value_cast): Adjust pointer to member handling for new types.
Allow null pointer to member constants. Don't modify the input
value.
(value_ind): Remove pointer to member check. Handle function
descriptors for function pointers.
(value_struct_elt, value_find_oload_method_list, check_field):
Remove pointer to member checks.
* value.c (unpack_long): Allow pointers to data members.
(value_from_longest): Allow member pointers.
* value.h (value_aggregate_elt): Add want_address.
* varobj.c (c_variable_editable): Remove check for members.
* gdbarch.sh: Add vtable_function_descriptors and vbit_in_delta.
* ia64-tdep.c (ia64_convert_from_func_ptr_addr): Handle descriptors
in virtual tables.
(ia64_gdbarch_init): Call set_gdbarch_vtable_function_descriptors.
* c-lang.h (cp_print_class_method): Delete prototype.
* arm-tdep.c (arm_gdbarch_init): Call set_gdbarch_vbit_in_delta.
* mips-tdep.c (mips_gdbarch_init): Likewise.
* gdbarch.c, gdbarch.h: Regenerated.
* gdb.cp/classes.exp (test_pointers_to_class_members): Update expected
output. Test the types of members and member pointers.
* gdb.cp/inherit.exp (test_print_mi_member_types): Remove KFAILs for
gdb/2092.
* gdb.cp/member-ptr.exp: Search for a comment instead of a
statement. Enable for GCC. Update expected output for some tests
and add new tests. Remove obsolete GCC KFAILs. Allow GCC's class
layout.
* gdb.cp/member-ptr.cc (Padding, Padding::vspacer, Base, Base::get_x)
(Base::vget_base, Left, Left::vget, Right, Right::vget, Diamond)
(Diamond::vget_base): New.
(main): Add new tests.
* gdb.cp/printmethod.exp: Update expected output for member functions.
* gdb.cp/virtfunc.exp (test_virtual_calls): Add a KFAIL for
print pEe->D::vg().
* eval.c (evaluate_subexp_for_address): Don't incorrectly discard
calls to C++ operator*.
gdb/testsuite/
* gdb.cp/userdef.cc, gdb.cp/userdef.exp: New tests for unary
operator*.
* eval.c (evaluate_subexp_standard): For OP_TYPE, return
a non lval value zero, of the appropriate type, when avoiding
side effects.
* typeprint.c (ptype_eval): Remove function and declaration.
(ptype_command): Simplify to just a call to whatis_exp.
subrange.
* f-lang.h (enum f90_range_type): New enumeration type to identify
F90 subrange type.
* f-exp.y (yyparse): Add support for parsing F90 subrange and
change substring parsing to subrange parsing.
* parse.c (operator_length_standard): Set the operator length
and args number for OP_F90_RANGE.
* eval.c (evaluate_subexp_standard): Add code to evaluate F90
array section and substring.
(value_f90_subarray): New function to evaluate F90 array section.
(evaluate_subexp_standard): Delete label op_f77_substr and its code
because the logic is implemented by function value_f90_subarray now.
(yylex): Add code to scan exponentiation operator.
* eval.c (evaluate_subexp_standard): Add support for BINOP_EXP.
* valarith.c (value_binop): Reset errno to 0 before calling pow
to do exponentiation operation.
* command.h (add_setshow_integer_cmd): Make VAR an integer.
* cli/cli-decode.c (add_setshow_integer_cmd): Update to match.
* valops.c (value_string): Add a cast.
* eval.c (evaluate_subexp_standard): Use gdb_byte for byte buffers.
* breakpoint.c (re_enable_breakpoints_in_shlibs): Use gdb_byte for
byte buffers.
* target.h (struct target_ops): For to_insert_hw_breakpoint and
to_remove_hw_breakpoint use gdb_byte for byte buffer parameters.
* breakpoint.h (struct bp_location): Make shadow_contents a
gdb_byte buffer.
* cli/cli-setshow.c (do_setshow_command): Fix cast.
* cli/cli-dump.c (restore_section_callback)
(restore_binary_file): Use gdb_byte for byte buffers.
* proc-service.c (ps_ptwrite, ps_ptread, ps_pdwrite): Fix casts.
(ps_xfer_memory): Use gdb_byte for byte buffers.
* tracepoint.c (mem2hex): Use gdb_byte for byte buffers, and char
for string buffers.
* ser-tcp.c (net_open): Make len a socklen_t.
Committed by Jim Blandy <jimb@redhat.com>.
* eval.c (evaluate_subexp_standard, case OP_OBJC_MSGCALL): Use
CORE_ADDR as type for selectors. Correct types for GNU run time
message lookup function to use double indirection.
* objc-lang.c (lookup_child_selector): Use CORE_ADDR as return type.
* objc-lang.h (lookup_child_selector): Adapt prototype.
language-specific info for printing, prefixifying, dumping, and
evaluating expressions.
(exp_descriptor_standard): Declare new variable.
(print_subexp): Make global and declare here (from expprint.c).
(dump_subexp): Ditto.
(dump_subexp_body_standard): Declare.
(operator_length_standard): Declare.
(op_name_standard): Declare.
(print_subexp): Declare.
(print_subexp_standard): Declare.
* language.h (struct language_defn): Add la_exp_desc field to hold
pointer to table for language-specific operators.
Remove evaluate_exp field, which is now in struct exp_descriptor.
* parse.c (operator_length): Move most code to new
operator_length_standard function. Use language-specific information.
(operator_length_standard): New function taking most code from
operator_length.
(exp_descriptor_standard): New constant.
* expression.h (enum exp_opcode): Add definitions of OP_EXTENDED0
and OP_EXTENDED_LAST.
* expprint.c (print_subexp): Use language-specific print_subexp.
Make global; remove static declaration.
Move most code to print_subexp_standard.
(print_subexp_standard): New function, containing code formerly in
print_subexp.
(op_name): Add expression to argument signature.
Use langauge-specific op_name.
Move most code to op_name_standard.
(op_name_standard): New function, containing code formerly in op_name.
(dump_subexp): Use new version of op_name function.
Use language-specific dump_subexp_body, and move most existing code to
dump_subexp_body_standard.
(dump_raw_expression): Use new op_name interface.
(dump_subexp_body): Move most code to dump_subexp_body_standard.
(dump_subexp_body_standard): New function, containing code formerly
in dump_subexp_body.
* language.c (unknown_language): Add default la_exp_desc field and
remove evaluate_exp field.
(auto_language): Ditto.
(local_language): Ditto.
* f-lang.c (f_language_defn): Ditto.
* c-lang.c (c_language_defn): Ditto.
(cplus_language_defn): Ditto.
(asm_language_defn): Ditto.
(minimal_language_defn): Ditto.
* p-lang.c (pascal_language_defn): Ditto.
* m2-lang.c (m2_language_defn): Ditto.
* objc-lang.c (objc_language_defn): Ditto.
* jv-lang.c (exp_descriptor_java): New variable, containing
Java-specific expression evaluator.
(java_language_defn): Add la_exp_desc field and remove evaluate_exp
field.
* scm-lang.c (exp_descriptor_scm): New variable, containing
Scheme-specific expression evaluator.
(scm_language_defn): Add la_exp_desc field and remove evaluate_exp
field.
* objc-lang.c (print_object_command): Take evaluate_exp from the
la_exp_desc field.
* Makefile.in (eval.o): Add dependency on parser-defs.h.
* eval.c: Include parser-defs.h for the full declaration of
la_exp_desc's type.
(evaluate_subexp): Get evaluate_exp out of la_exp_desc field.
The old method would drag in the entire array, then look for the
single element. This method just gets the right element out instead.
Saves memory, and saves a crash for array with (*) as one of the
dimensions when it would previously have allocated (unsigned int) -1 bytes.
* frame.c (get_current_frame): Check target_has_registers before
checking target_has_stack.
* eval.c (evaluate_subexp_standard): Use get_selected_frame,
instead of deprecated_selected_frame.
* findvar.c (value_of_register): Pass "frame", not
deprecated_selected_frame, to value_of_builtin_reg.
* frame.c: Include "gdb_string.h" and "builtin-regs.h".
(frame_map_regnum_to_name): New function.
(frame_map_name_to_regnum): New function.
* frame.h (frame_map_name_to_regnum): Declare.
(frame_map_regnum_to_name): Declare.
* builtin-regs.c (builtin_reg_map_regnum_to_name): New function.
* builtin-regs.h (builtin_reg_map_regnum_to_name): Declare.
* parse.c: Do not include "builtin-regs.h".
(target_map_name_to_register): Delete function.
(write_dollar_variable): Use frame_map_name_to_regnum.
* parser-defs.h (target_map_name_to_register): Delete declaration.
* expprint.c: Include "frame.h".
(print_subexp): Use frame_map_regnum_to_name.
* eval.c (evaluate_subexp_standard): Use frame_map_regnum_to_name.
* infcmd.c (registers_info): Use frame_map_name_to_regnum.
2002-09-25 Andrew Cagney <cagney@redhat.com>
* gdb.base/pc-fp.exp, gdb.base/pc-fp.c: New test.
* valops.c (find_overload_match): Accept obj as a
reference parameter. Update it before returning.
* value.h (find_overload_match): Update prototype.
* eval.c (evaluate_subexp_standard): Pass object to
find_overload_match by reference.
2001-12-10 Fred Fish <fnf@redhat.com>
* values.c (value_fn_field): Add physname variable. Use a minimal
symbol if we don't find a full symbol. Remove setting of the new
value's type since that was already done by allocate_value().
Remove obsolete commented out error call since callees need to
handle a NULL return, which is possible result not an error.
* eval.c (evaluate_subexp_standard): Move check for inlined
functions to precede attempt to dereference a NULL argvec[0].
Abstract out operations specific to particular C++ ABI's, and
invoke them through a function table. This removes the C++ ABI
dependencies scattered throughout the code, and allows us to
cleanly add support for new C++ ABI's.
* cp-abi.h, cp-abi.h, gnu-v2-abi.c, hpacc-abi.c: New files.
* c-typeprint.c, c-valprint.c, dbxread.c, eval.c, gdbtypes.c,
jv-typeprint.c, linespec.c, symtab.c, typeprint.c, valops.c:
#include "cp-abi.h". These files all use functions now declared
there.
* symtab.h (OPNAME_PREFIX_P, VTBL_PREFIX_P, DESTRUCTOR_PREFIX_P):
Deleted. These services are now provided by functions declared in
cp-abi.h.
* value.h (value_rtti_type, value_virtual_fn_field): Same.
* values.c (value_virtual_fn_field): Same, for this definition.
* valops.c (value_rtti_type): Same.
* c-typeprint.c (c_type_print_base): Use the functions from
"cp-abi.h", instead of the old macros, or hard-coded ABI-specific
tests.
* dbxread.c (record_minimal_symbol): Same.
* gdbtypes.c (get_destructor_fn_field, virtual_base_index,
virtual_base_index_skip_primaries): Same.
* jv-typeprint.c (java_type_print_base): Same.
* linespec.c (find_methods, decode_line_1): Same.
* symtab.c (gdb_mangle_name): Same.
* Makefile.in (SFILES): Add the new .c files mentioned above.
(cp_abi_h): New variable.
(COMMON_OBS): Add gnu-v2-abi.o, hpacc-abi.o, and cp-abi.o.
(cp-abi.o, gnu-v2-abi.o, hpacc-abi.o): New targets.
(c-typeprint.o, c-valprint.o, dbxread.o, eval.o, gdbtypes.o,
jv-typeprint.o, symtab.o, linespec.o, typeprint.o, valops.o): Add
dependency on $(cp_abi_h).
functions which architectures can redefine, defaulting to
generic_pointer_to_address and generic_address_to_pointer.
* findvar.c (extract_typed_address, store_typed_address,
generic_pointer_to_address, generic_address_to_pointer): New
functions.
(POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Provide default
definitions.
(extract_address, store_address): Doc fixes.
* values.c (value_as_pointer): Doc fix.
(value_from_pointer): New function.
* defs.h (extract_typed_address, store_typed_address): New
declarations.
* inferior.h (generic_address_to_pointer,
generic_pointer_to_address): New declarations.
* value.h (value_from_pointer): New declaration.
* ax-gdb.c (const_var_ref): Use value_from_pointer, not
value_from_longest.
* blockframe.c (generic_push_dummy_frame): Use read_pc and
read_sp, not read_register.
* c-valprint.c (c_val_print): Use extract_typed_address instead of
extract_address to extract vtable entries and references.
* cp-valprint.c (cp_print_value_fields): Use value_from_pointer
instead of value_from_longest to extract the vtable's address.
* eval.c (evaluate_subexp_standard): Use value_from_pointer
instead of value_from_longest to compute `this', and for doing
pointer-to-member dereferencing.
* findvar.c (read_register): Use extract_unsigned_integer, not
extract_address.
(read_var_value): Use store_typed_address instead of store_address
for building label values.
(locate_var_value): Use value_from_pointer instead of
value_from_longest.
* hppa-tdep.c (find_stub_with_shl_get): Use value_from_pointer,
instead of value_from_longest, to build arguments to __d_shl_get.
* printcmd.c (set_next_address): Use value_from_pointer, not
value_from_longest.
(x_command): Use value_from_pointer, not value_from_longest.
* tracepoint.c (set_traceframe_context): Use value_from_pointer,
not value_from_longest.
* valarith.c (value_add, value_sub): Use value_from_pointer, not
value_from_longest.
* valops.c (find_function_in_inferior, value_coerce_array,
value_coerce_function, value_addr, hand_function_call): Same.
* value.h (COERCE_REF): Use unpack_pointer, not unpack_long.
* values.c (unpack_long): Use extract_typed_address to produce
addresses from pointers and references, not extract_address.
(value_from_longest): Use store_typed_address instead of
store_address to produce pointer and reference values.
* eval.c (evaluate_subexp_with_coercion): Add call to
check_typedef, to handle typedeffed vars correctly.
* gdb.base/printcmds.c: Add typedeffed arrays.
* gdb.base/printcmds.exp (test_print_typedef_arrays): New
procedure to test arrays that are typedef'd.
* gdbtk.c (gdb_get_breakpoint_info): Add string for new
enumeration del_at_next_stop to bpdisp array.
end-sanitize-gdbtk
* eval.c (evaluate_subexp_for_sizeof): Handle dereferencing
of non-pointer values.
* symtab.c (gdb_mangle_name): Improve mangling of nested types,
their physical names already include the class name.
* valops.c (value_cast): Handle upcast of a class pointer.
From Andreas Schwab (schwab@issan.informatik.uni-dortmund.de):
* corelow.c (get_core_registers): Make secname big enough.
if we have a type.
* eval.c (evaluate_subexp_standard): In case of OP_ARRAY:
check number of args against bounds of array to avoid
memory corruption.
* value.h (COERCE_REF): Do a CHECK_TYPEDEF in case we get
a TYPE_CODE_TYPEDEF.
Add some checks for powerset compatibility.
* valops.c (value_slice): Use lowbound instead of lowerbound for
call to slice_range_type to get correct bounds.
before testing against reg_ptr.
* eval.c (evaluate_subexp_standard): Cast type of
TYPE_FN_FIELD_VOFFSET to int.
* findvar.c (extract_signed_integer, extract_unsigned_integer,
extract_long_unsigned_integer): Cast type of sizeof to int.
* values.c (unpack_field_as_long, modify_field): Ditto.
* valops.c (value_assign, call_function_by_hand): Ditto.
* infcmd.c (do_registers_info): Ditto.
* ser-tcp.c (tcp_open): Ditto
* remote.c (putpkt): Ditto.
* dcache.c (dcache_peek): Ditto.
* dcache.c (dcache_poke): Ditto.
* m2-exp.y (yylex): Ditto.
* gnu-regex.c (re_match_2): Ditto.
* f-lang.c (ADD_BF_SYMNUM, saved_bf_list_end, tmp_bf_ptr): Ifdef
out unused macro definition and variables.
* inftarg.c (proc_wait): Move from main.c to here, and make static.
* valprint.c (val_print_string): Change bufsize from int to unsigned.
* main.c (wait.h): Include
* top.c (command_line_input): Remove unused variable "c".
* f-typeprint.c (f_type_print_varspec_prefix): Add missing enum
value TYPE_CODE_TYPEDEF to switch statement.
(f_type_print_varspec_suffix): Add missing enum value
TYPE_CODE_TYPEDEF to switch statement.
* ch-exp.c (parse_primval): Add remaining enumeration values to
switch statement, with no specific action.
(ch_lex): Add LOC_UNRESOLVED in switch statement.
(pushback_token): Ifdef out, since code using it is ifdef'd out.
* stabsread.c (cleanup_undefined_types): Remove unused label
"badtype".
* objfiles.h (print_symbol_bcache_statistics): Add prototype.
* maint.c (objfiles.h): Include.
(maintenance_print_statistics): Remove unused variable "temp".
* minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove
unused variable "found_file_symbol".
* m2-exp.y (yylex): Add LOC_UNRESOLVED case to switch.
* language.c (lang_bool_type): Use existing function local type
variable rather than create block local variables.
* solib.c (disable_break): Enclose in ifndef SVR4_SHARED_LIBS.
* infptrace.c (wait.h, command.h): Include.
* ser-tcp.c (gdb_string.h): Include
* i386-tdep.c (codestream_seek): Change "place" to CORE_ADDR.
(i386_get_frame_setup): Change "pc" from int to CORE_ADDR.
* command.c (complete_on_enum): Make assignment used as truth value
explictly check against NULL.
(wait.h): Include.
* infrun.c (wait_for_inferior): Ifdef out prologue_pc since code
that uses it is ifdef'd out.
* parser-defs.h: Add prototype for write_dollar_variable.
* infrun.c: Add prototype for write_pc_pid.
* breakpoint.h: Add prototype for re_enable_breakpoints_in_shlibs.
* symmisc.c (bcache.h): Include.
* bcache.h: Add prototype for print_bcache_statistics.
* symfile.c: Include <time.h>.
* printcmd.c (print_scalar_formatted): Change len to unsigned int.
* valarith.c (value_equal): Cast result of TYPE_LENGTH to int.
* valarith.c (value_binop): Change result_len, promoted_len1,
and promoted_len2 to unsigned int.
* valarith.c (value_subscripted_rvalue): Change elt_offs and
elt_size to unsigned int.
* valops.c (value_array): Change typelength to unsigned int.
(destructor_name_p): Change len to unsigned int.
* scm-lang.h (scm_parse): Add prototype for scm_unpack.
* symfile.c (decrement_reading_symtab): Change return type to void.
* valarith.c (value_subscript): Remove unused variable "word".
(value_subscript): Remove unused variable "tint".
* valops.c (auto_abandon): Ifdef out, since code using it is also
ifdef'd out.
* eval.c (init_array_element): Remove unused variable "val".
* Makefile.in (values.o): Depends on scm-lang.h.
(command.o): Depends upon wait_h.
(ser-tcp.o): Depends upon gdb_string.h.
(infptrace.o): Depends upon wait_h and command_h.
(maint.o): Depends on objfiles.h and symfile.h.
* values.c (allocate_repeat_value): Remove unused variable
"element_type".
(scm-lang.h): Include.
* breakpoint.c (create_longjmp_breakpoint): Enclose in
GET_LONGJMP_TARGET define, unused otherwise.
* config/i386/nm-linux.h: Add prototypes for i386_insert_watchpoint,
i386_remove_watchpoint and i386_stopped_by_watchpoint.
for TYPE_CODE_SET and TYPE_CODE_BITSTRING too.
* eval.c (evaluate_subexp_standard): When known, use the formal
parameter type as the expected type when evaluating arg expressions.
* ch-lang.c (evaluate_subexp_chill): Likewise (for MULTI_SUBSCRIPT).
This (with a fix to gcc/config/sparc/sparc.h) fixes PR chill/8742.
* language.h (LA_BOOL_TYPE): New macro.
* eval.c (evaluate_subexp_standard) Use LA_BOOL_TYPE instead
of builtin_type_int where appropriate,
* valarith.c (value_subscript): Likewise.
Add check_typedef/CHECK_TYPEDEF as needed.
* f-typeprint.c: Various cleaning up.
* valarith.c (value_subscript): Also subscript bitstrings (for Chill).
* typeprint.c (print_type_scalar): Also support TYPE_CODE_RANGE.
* eval.c (evaluate_subexp_standard case OP_ARRAY): Implement
support for labelled array tuples and ranges in powerset tuples.
(init_array_element): New function.
around calls to create_longjmp_breakpoint. Why install the
breakpoints if we can't find the longjmp target?
* infrun.c (wait_for_inferior): Cleanup comments near call test.
* remote-mips.c: Fixed a bunch of prototypes to avoid char/int
complaint from picky compilers. Add comment to mips_expect.
Replace all instances of sr_get_debug with remote_debug.
* (mips_readchar): Don't jam init string to monitor.
mips_initialize() handles that.
* (mips_receive_header): Print better message when we get too
much garbage.
* (mips_request): Allow caller to pass in buff to allow them to
analyze the returned message.
* (mips_initialize): Re-do initialization to try sending a BREAK,
a ^C, and then a download escape sequence. Cleanup protocol
startup. Eliminate sleeps. Clear breakpoints (if using monitor
breakpoints). Re-init frame.
* (mips_detach): Close down target.
start-sanitize-gm
* (mips_resume): Pass signal down to target.
* (mips_create_inferior): Start target with TARGET_SIGNAL_PWR.
end-sanitize-gm
* (mips_wait): Handle return status with registers, or breakpoint stuff.
* (mips_kill): Add ^C handling.
* (mips_insert_breakpoint mips_remove_breakpoint): Call new
breakpoint stuff if enabled.
* (calculate_mask remote_mips_set_watchpoint
remote_mips_remove_watchpoint remote_mips_stopped_by_watchpoint):
Hardware watchpoint/breakpoint stuff.
* (common_breakpoint): Common code for new monitor breakpoint commands.
* (mips_load): Don't use `prompt'. It's a global variable.
* top.c (dont_repeat_command): New command for use in
user-defined commands to suppress auto-repeat (by hittin return key).
start-sanitize-gm
* utils.c (request_quit): Call target_kill here. Good idea.
Needs a better implementation.
end-sanitize-gm
* valops.c: Add start of auto function-call abandonment capability.
start-sanitize-gm
* c-exp.y: Add code (currently disabled) to handle GM dynamic
structures (it conflicts with @!).
* eval.c (evaluate_subexp_standard): ditto.
* expprint.c (print_subexp dump_expression): ditto.
* expression.h (enum exp_opcode): ditto.
* parse.c (length_of_subexp): ditto.
* configure, configure.in: Add mip*-*-magic* target.
* magic.c magic.h: Special routines to handle GM stuff (like
stepping through dispatcher).
end-sanitize-gm
* c-lang.c (c_language_defn, cplus_language_defn, asm_langauge_defn),
f-lang.c (f_language_defn), language.c (unknown_language_defn,
auto_language_defn, local_language_defn), m2-lang.c (m2_language_defn):
Set evaluate_exp to evaluate_subexp_standard.
* ch-lang.c (evaluate_subexp_chill): New function. Chill-specific
support for MULTI_SUBSCRIPT.
(chill_language_defn): Set evaluate_exp to evaluate_subexp_chill.
* eval.c (enum noside): Move from here ....
* expression.h (enum noside): ... to here.
(evaluate_subexp_standard): New prototype.
* eval.c (evaluate_subexp): Renamed to evaluate_subexp_standard.
Removed lo-longer-needed test for chill_varying_type.
(evaluate_subexp): New. Calls exp->language_defn->evaluate_exp.