* [PATCH 2/2] Add some more casts (1/2)
@ 2015-09-23 19:31 Simon Marchi
2015-09-23 19:31 ` [PATCH 3/2] Add some more casts (2/2) Simon Marchi
2015-09-25 13:17 ` [PATCH 2/2] Add some more casts (1/2) Yao Qi
0 siblings, 2 replies; 12+ messages in thread
From: Simon Marchi @ 2015-09-23 19:31 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
Note: I needed to split this patch in two, otherwise it's too big for
the mailing list.
This patch adds explicit casts to situations where a void pointer is
assigned to a pointer to the "real" type. Building in C++ mode requires
those assignments to use an explicit cast. This includes, for example:
- callback arguments (cleanups, comparison functions, ...)
- data attached to some object (objfile, program space, etc) in the form
of a void pointer
- "user data" passed to some function
This patch comes from the commit "(mostly) auto-generated patch to insert
casts needed for C++", taken from Pedro's C++ branch.
Only files built on x86 with --enable-targets=all are modified, so the
native files for other arches will need to be dealt with separately.
I built-tested this with --enable-targets=all and reg-tested. To my
surprise, a test case (selftest.exp) had to be adjusted.
Here's the ChangeLog entry. Again, this was relatively quick to make
despite the length, thanks to David Malcom's script, although I don't
believe it's very useful information in that particular case...
gdb/ChangeLog:
* aarch64-tdep.c (aarch64_make_prologue_cache): Add cast(s).
(aarch64_make_stub_cache): Likewise.
(value_of_aarch64_user_reg): Likewise.
* ada-lang.c (ada_inferior_data_cleanup): Likewise.
(get_ada_inferior_data): Likewise.
(get_ada_pspace_data): Likewise.
(ada_pspace_data_cleanup): Likewise.
(ada_complete_symbol_matcher): Likewise.
(ada_exc_search_name_matches): Likewise.
* ada-tasks.c (get_ada_tasks_pspace_data): Likewise.
(get_ada_tasks_inferior_data): Likewise.
* addrmap.c (addrmap_mutable_foreach_worker): Likewise.
(splay_obstack_alloc): Likewise.
(splay_obstack_free): Likewise.
* alpha-linux-tdep.c (alpha_linux_supply_gregset): Likewise.
(alpha_linux_collect_gregset): Likewise.
(alpha_linux_supply_fpregset): Likewise.
(alpha_linux_collect_fpregset): Likewise.
* alpha-mdebug-tdep.c (alpha_mdebug_frame_unwind_cache): Likewise.
* alpha-tdep.c (alpha_lds): Likewise.
(alpha_sts): Likewise.
(alpha_sigtramp_frame_unwind_cache): Likewise.
(alpha_heuristic_frame_unwind_cache): Likewise.
(alpha_supply_int_regs): Likewise.
(alpha_fill_int_regs): Likewise.
(alpha_supply_fp_regs): Likewise.
(alpha_fill_fp_regs): Likewise.
* alphanbsd-tdep.c (alphanbsd_supply_fpregset): Likewise.
(alphanbsd_aout_supply_gregset): Likewise.
(alphanbsd_supply_gregset): Likewise.
* amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
(amd64_x32_linux_init_abi): Likewise.
* amd64-nat.c (amd64_supply_native_gregset): Likewise.
(amd64_collect_native_gregset): Likewise.
* amd64-tdep.c (amd64_frame_cache): Likewise.
(amd64_sigtramp_frame_cache): Likewise.
(amd64_epilogue_frame_cache): Likewise.
(amd64_supply_fxsave): Likewise.
(amd64_supply_xsave): Likewise.
(amd64_collect_fxsave): Likewise.
(amd64_collect_xsave): Likewise.
* amd64-windows-tdep.c (amd64_windows_frame_cache): Likewise.
* amd64obsd-tdep.c (amd64obsd_trapframe_cache): Likewise.
* arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
(arm_linux_collect_gregset): Likewise.
(arm_linux_supply_nwfpe): Likewise.
(arm_linux_collect_nwfpe): Likewise.
(arm_linux_supply_vfp): Likewise.
(arm_linux_collect_vfp): Likewise.
* arm-tdep.c (arm_find_mapping_symbol): Likewise.
(arm_prologue_unwind_stop_reason): Likewise.
(arm_prologue_this_id): Likewise.
(arm_prologue_prev_register): Likewise.
(arm_exidx_data_free): Likewise.
(arm_find_exidx_entry): Likewise.
(arm_stub_this_id): Likewise.
(arm_m_exception_this_id): Likewise.
(arm_m_exception_prev_register): Likewise.
(arm_normal_frame_base): Likewise.
(gdb_print_insn_arm): Likewise.
(arm_objfile_data_free): Likewise.
(arm_record_special_symbol): Likewise.
(value_of_arm_user_reg): Likewise.
* armbsd-tdep.c (armbsd_supply_fpregset): Likewise.
(armbsd_supply_gregset): Likewise.
* auto-load.c (auto_load_pspace_data_cleanup): Likewise.
(get_auto_load_pspace_data): Likewise.
(hash_loaded_script_entry): Likewise.
(eq_loaded_script_entry): Likewise.
(clear_section_scripts): Likewise.
(collect_matching_scripts): Likewise.
* auxv.c (auxv_inferior_data_cleanup): Likewise.
(get_auxv_inferior_data): Likewise.
* avr-tdep.c (avr_frame_unwind_cache): Likewise.
* ax-general.c (do_free_agent_expr_cleanup): Likewise.
* bfd-target.c (target_bfd_xfer_partial): Likewise.
(target_bfd_xclose): Likewise.
(target_bfd_get_section_table): Likewise.
* bfin-tdep.c (bfin_frame_cache): Likewise.
* block.c (find_block_in_blockvector): Likewise.
(call_site_for_pc): Likewise.
(block_find_non_opaque_type_preferred): Likewise.
* break-catch-sig.c (signal_catchpoint_insert_location): Likewise.
(signal_catchpoint_remove_location): Likewise.
(signal_catchpoint_breakpoint_hit): Likewise.
(signal_catchpoint_print_one): Likewise.
(signal_catchpoint_print_mention): Likewise.
(signal_catchpoint_print_recreate): Likewise.
* break-catch-syscall.c (get_catch_syscall_inferior_data): Likewise.
* breakpoint.c (do_cleanup_counted_command_line): Likewise.
(bp_location_compare_addrs): Likewise.
(get_first_locp_gte_addr): Likewise.
(check_tracepoint_command): Likewise.
(do_map_commands_command): Likewise.
(get_breakpoint_objfile_data): Likewise.
(free_breakpoint_probes): Likewise.
(do_captured_breakpoint_query): Likewise.
(compare_breakpoints): Likewise.
(bp_location_compare): Likewise.
(bpstat_remove_breakpoint_callback): Likewise.
(do_delete_breakpoint_cleanup): Likewise.
* bsd-uthread.c (bsd_uthread_set_supply_uthread): Likewise.
(bsd_uthread_set_collect_uthread): Likewise.
(bsd_uthread_activate): Likewise.
(bsd_uthread_fetch_registers): Likewise.
(bsd_uthread_store_registers): Likewise.
* btrace.c (check_xml_btrace_version): Likewise.
(parse_xml_btrace_block): Likewise.
(parse_xml_btrace_pt_config_cpu): Likewise.
(parse_xml_btrace_pt_raw): Likewise.
(parse_xml_btrace_pt): Likewise.
(parse_xml_btrace_conf_bts): Likewise.
(parse_xml_btrace_conf_pt): Likewise.
(do_btrace_data_cleanup): Likewise.
* c-typeprint.c (find_typedef_for_canonicalize): Likewise.
* charset.c (cleanup_iconv): Likewise.
(do_cleanup_iterator): Likewise.
* cli-out.c (cli_uiout_dtor): Likewise.
(cli_table_begin): Likewise.
(cli_table_body): Likewise.
(cli_table_end): Likewise.
(cli_table_header): Likewise.
(cli_begin): Likewise.
(cli_end): Likewise.
(cli_field_int): Likewise.
(cli_field_skip): Likewise.
(cli_field_string): Likewise.
(cli_field_fmt): Likewise.
(cli_spaces): Likewise.
(cli_text): Likewise.
(cli_message): Likewise.
(cli_wrap_hint): Likewise.
(cli_flush): Likewise.
(cli_redirect): Likewise.
(out_field_fmt): Likewise.
(field_separator): Likewise.
(cli_out_set_stream): Likewise.
* cli/cli-cmds.c (compare_symtabs): Likewise.
* cli/cli-dump.c (call_dump_func): Likewise.
(restore_section_callback): Likewise.
* cli/cli-script.c (clear_hook_in_cleanup): Likewise.
(do_restore_user_call_depth): Likewise.
(do_free_command_lines_cleanup): Likewise.
* coff-pe-read.c (get_section_vmas): Likewise.
(pe_as16): Likewise.
(pe_as32): Likewise.
* coffread.c (coff_symfile_read): Likewise.
* common/agent.c (agent_look_up_symbols): Likewise.
* common/filestuff.c (do_close_cleanup): Likewise.
* common/format.c (free_format_pieces_cleanup): Likewise.
* common/vec.c (vec_o_reserve): Likewise.
* compile/compile-c-support.c (print_one_macro): Likewise.
* compile/compile-c-symbols.c (hash_symbol_error): Likewise.
(eq_symbol_error): Likewise.
(del_symbol_error): Likewise.
(error_symbol_once): Likewise.
(gcc_convert_symbol): Likewise.
(gcc_symbol_address): Likewise.
(hash_symname): Likewise.
(eq_symname): Likewise.
* compile/compile-c-types.c (hash_type_map_instance): Likewise.
(eq_type_map_instance): Likewise.
(insert_type): Likewise.
(convert_type): Likewise.
* compile/compile-object-load.c (munmap_listp_free_cleanup): Likewise.
(setup_sections): Likewise.
(link_hash_table_free): Likewise.
(copy_sections): Likewise.
* compile/compile-object-run.c (do_module_cleanup): Likewise.
* compile/compile.c (compile_print_value): Likewise.
(do_rmdir): Likewise.
(cleanup_compile_instance): Likewise.
(cleanup_unlink_file): Likewise.
* completer.c (free_completion_tracker): Likewise.
* corelow.c (add_to_spuid_list): Likewise.
* cp-namespace.c (reset_directive_searched): Likewise.
* cp-support.c (reset_directive_searched): Likewise.
* cris-tdep.c (cris_sigtramp_frame_unwind_cache): Likewise.
(cris_frame_unwind_cache): Likewise.
* d-lang.c (builtin_d_type): Likewise.
* d-namespace.c (reset_directive_searched): Likewise.
* dbxread.c (dbx_free_symfile_info): Likewise.
(do_free_bincl_list_cleanup): Likewise.
* disasm.c (hash_dis_line_entry): Likewise.
(eq_dis_line_entry): Likewise.
(dis_asm_print_address): Likewise.
(fprintf_disasm): Likewise.
(do_ui_file_delete): Likewise.
* doublest.c (convert_floatformat_to_doublest): Likewise.
* dummy-frame.c (pop_dummy_frame_bpt): Likewise.
(dummy_frame_prev_register): Likewise.
(dummy_frame_this_id): Likewise.
* dwarf2-frame-tailcall.c (cache_hash): Likewise.
(cache_eq): Likewise.
(cache_find): Likewise.
(tailcall_frame_this_id): Likewise.
(dwarf2_tailcall_prev_register_first): Likewise.
(tailcall_frame_prev_register): Likewise.
(tailcall_frame_dealloc_cache): Likewise.
(tailcall_frame_prev_arch): Likewise.
* dwarf2-frame.c (dwarf2_frame_state_free): Likewise.
(dwarf2_frame_set_init_reg): Likewise.
(dwarf2_frame_init_reg): Likewise.
(dwarf2_frame_set_signal_frame_p): Likewise.
(dwarf2_frame_signal_frame_p): Likewise.
(dwarf2_frame_set_adjust_regnum): Likewise.
(dwarf2_frame_adjust_regnum): Likewise.
(clear_pointer_cleanup): Likewise.
(dwarf2_frame_cache): Likewise.
(find_cie): Likewise.
(dwarf2_frame_find_fde): Likewise.
* dwarf2expr.c (dwarf_expr_address_type): Likewise.
(free_dwarf_expr_context_cleanup): Likewise.
* dwarf2loc.c (locexpr_find_frame_base_location): Likewise.
(locexpr_get_frame_base): Likewise.
(loclist_find_frame_base_location): Likewise.
(loclist_get_frame_base): Likewise.
(dwarf_expr_dwarf_call): Likewise.
(dwarf_expr_get_base_type): Likewise.
(dwarf_expr_push_dwarf_reg_entry_value): Likewise.
(dwarf_expr_get_obj_addr): Likewise.
(entry_data_value_coerce_ref): Likewise.
(entry_data_value_copy_closure): Likewise.
(entry_data_value_free_closure): Likewise.
(get_frame_address_in_block_wrapper): Likewise.
(dwarf2_evaluate_property): Likewise.
(dwarf2_compile_property_to_c): Likewise.
(needs_frame_read_addr_from_reg): Likewise.
(needs_frame_get_reg_value): Likewise.
(needs_frame_frame_base): Likewise.
(needs_frame_frame_cfa): Likewise.
(needs_frame_tls_address): Likewise.
(needs_frame_dwarf_call): Likewise.
(needs_dwarf_reg_entry_value): Likewise.
(get_ax_pc): Likewise.
(locexpr_read_variable): Likewise.
(locexpr_read_variable_at_entry): Likewise.
(locexpr_read_needs_frame): Likewise.
(locexpr_describe_location): Likewise.
(locexpr_tracepoint_var_ref): Likewise.
(locexpr_generate_c_location): Likewise.
(loclist_read_variable): Likewise.
(loclist_read_variable_at_entry): Likewise.
(loclist_describe_location): Likewise.
(loclist_tracepoint_var_ref): Likewise.
(loclist_generate_c_location): Likewise.
* dwarf2read.c (line_header_hash_voidp): Likewise.
(line_header_eq_voidp): Likewise.
(dwarf2_has_info): Likewise.
(dwarf2_get_section_info): Likewise.
(locate_dwz_sections): Likewise.
(hash_file_name_entry): Likewise.
(eq_file_name_entry): Likewise.
(delete_file_name_entry): Likewise.
(dw2_setup): Likewise.
(dw2_get_file_names_reader): Likewise.
(dw2_find_pc_sect_compunit_symtab): Likewise.
(hash_signatured_type): Likewise.
(eq_signatured_type): Likewise.
(add_signatured_type_cu_to_table): Likewise.
(create_debug_types_hash_table): Likewise.
(lookup_dwo_signatured_type): Likewise.
(lookup_dwp_signatured_type): Likewise.
(lookup_signatured_type): Likewise.
(hash_type_unit_group): Likewise.
(eq_type_unit_group): Likewise.
(get_type_unit_group): Likewise.
(process_psymtab_comp_unit_reader): Likewise.
(sort_tu_by_abbrev_offset): Likewise.
(process_skeletonless_type_unit): Likewise.
(psymtabs_addrmap_cleanup): Likewise.
(dwarf2_read_symtab): Likewise.
(psymtab_to_symtab_1): Likewise.
(die_hash): Likewise.
(die_eq): Likewise.
(load_full_comp_unit_reader): Likewise.
(reset_die_in_process): Likewise.
(free_cu_line_header): Likewise.
(handle_DW_AT_stmt_list): Likewise.
(hash_dwo_file): Likewise.
(eq_dwo_file): Likewise.
(hash_dwo_unit): Likewise.
(eq_dwo_unit): Likewise.
(create_dwo_cu_reader): Likewise.
(create_dwo_unit_in_dwp_v1): Likewise.
(create_dwo_unit_in_dwp_v2): Likewise.
(lookup_dwo_unit_in_dwp): Likewise.
(dwarf2_locate_dwo_sections): Likewise.
(dwarf2_locate_common_dwp_sections): Likewise.
(dwarf2_locate_v2_dwp_sections): Likewise.
(hash_dwp_loaded_cutus): Likewise.
(eq_dwp_loaded_cutus): Likewise.
(lookup_dwo_cutu): Likewise.
(abbrev_table_free_cleanup): Likewise.
(dwarf2_free_abbrev_table): Likewise.
(find_partial_die_in_comp_unit): Likewise.
(free_line_header_voidp): Likewise.
(follow_die_offset): Likewise.
(follow_die_sig_1): Likewise.
(free_heap_comp_unit): Likewise.
(free_stack_comp_unit): Likewise.
(dwarf2_free_objfile): Likewise.
(per_cu_offset_and_type_hash): Likewise.
(per_cu_offset_and_type_eq): Likewise.
(get_die_type_at_offset): Likewise.
(partial_die_hash): Likewise.
(partial_die_eq): Likewise.
(dwarf2_per_objfile_free): Likewise.
(hash_strtab_entry): Likewise.
(eq_strtab_entry): Likewise.
(add_string): Likewise.
(hash_symtab_entry): Likewise.
(eq_symtab_entry): Likewise.
(delete_symtab_entry): Likewise.
(cleanup_mapped_symtab): Likewise.
(add_indices_to_cpool): Likewise.
(hash_psymtab_cu_index): Likewise.
(eq_psymtab_cu_index): Likewise.
(add_address_entry_worker): Likewise.
(unlink_if_set): Likewise.
(write_one_signatured_type): Likewise.
(save_gdb_index_command): Likewise.
* elfread.c (elf_symtab_read): Likewise.
(elf_gnu_ifunc_cache_hash): Likewise.
(elf_gnu_ifunc_cache_eq): Likewise.
(elf_gnu_ifunc_record_cache): Likewise.
(elf_gnu_ifunc_resolve_by_cache): Likewise.
(elf_get_probes): Likewise.
(probe_key_free): Likewise.
* f-lang.c (builtin_f_type): Likewise.
* frame-base.c (frame_base_append_sniffer): Likewise.
(frame_base_set_default): Likewise.
(frame_base_find_by_frame): Likewise.
* frame-unwind.c (frame_unwind_prepend_unwinder): Likewise.
(frame_unwind_append_unwinder): Likewise.
(frame_unwind_find_by_frame): Likewise.
* frame.c (frame_addr_hash): Likewise.
(frame_addr_hash_eq): Likewise.
(frame_stash_find): Likewise.
(do_frame_register_read): Likewise.
(unwind_to_current_frame): Likewise.
(frame_cleanup_after_sniffer): Likewise.
* frv-linux-tdep.c (frv_linux_sigtramp_frame_cache): Likewise.
* frv-tdep.c (frv_frame_unwind_cache): Likewise.
* ft32-tdep.c (ft32_frame_cache): Likewise.
* gcore.c (do_bfd_delete_cleanup): Likewise.
(gcore_create_callback): Likewise.
* gdb_bfd.c (hash_bfd): Likewise.
(eq_bfd): Likewise.
(gdb_bfd_open): Likewise.
(free_one_bfd_section): Likewise.
(gdb_bfd_ref): Likewise.
(gdb_bfd_unref): Likewise.
(get_section_descriptor): Likewise.
(gdb_bfd_map_section): Likewise.
(gdb_bfd_crc): Likewise.
(gdb_bfd_mark_parent): Likewise.
(gdb_bfd_record_inclusion): Likewise.
(gdb_bfd_requires_relocations): Likewise.
(print_one_bfd): Likewise.
* gdbtypes.c (type_pair_hash): Likewise.
(type_pair_eq): Likewise.
(builtin_type): Likewise.
(objfile_type): Likewise.
* gnu-v3-abi.c (vtable_ptrdiff_type): Likewise.
(vtable_address_point_offset): Likewise.
(gnuv3_get_vtable): Likewise.
(hash_value_and_voffset): Likewise.
(eq_value_and_voffset): Likewise.
(compare_value_and_voffset): Likewise.
(compute_vtable_size): Likewise.
(gnuv3_get_typeid_type): Likewise.
* go-lang.c (builtin_go_type): Likewise.
* guile/scm-block.c (bkscm_hash_block_smob): Likewise.
(bkscm_eq_block_smob): Likewise.
(bkscm_objfile_block_map): Likewise.
(bkscm_del_objfile_blocks): Likewise.
* guile/scm-breakpoint.c (bpscm_build_bp_list): Likewise.
* guile/scm-disasm.c (gdbscm_disasm_read_memory_worker): Likewise.
(gdbscm_disasm_print_address): Likewise.
* guile/scm-frame.c (frscm_hash_frame_smob): Likewise.
(frscm_eq_frame_smob): Likewise.
(frscm_inferior_frame_map): Likewise.
(frscm_del_inferior_frames): Likewise.
* guile/scm-gsmob.c (gdbscm_add_objfile_ref): Likewise.
* guile/scm-objfile.c (ofscm_handle_objfile_deleted): Likewise.
(ofscm_objfile_smob_from_objfile): Likewise.
* guile/scm-ports.c (ioscm_write): Likewise.
(ioscm_file_port_delete): Likewise.
(ioscm_file_port_rewind): Likewise.
(ioscm_file_port_put): Likewise.
(ioscm_file_port_write): Likewise.
* guile/scm-progspace.c (psscm_handle_pspace_deleted): Likewise.
(psscm_pspace_smob_from_pspace): Likewise.
* guile/scm-safe-call.c (scscm_recording_pre_unwind_handler): Likewise.
(scscm_recording_unwind_handler): Likewise.
(gdbscm_with_catch): Likewise.
(scscm_call_0_body): Likewise.
(scscm_call_1_body): Likewise.
(scscm_call_2_body): Likewise.
(scscm_call_3_body): Likewise.
(scscm_call_4_body): Likewise.
(scscm_apply_1_body): Likewise.
(scscm_eval_scheme_string): Likewise.
(gdbscm_safe_eval_string): Likewise.
(scscm_source_scheme_script): Likewise.
(gdbscm_safe_source_script): Likewise.
* guile/scm-string.c (gdbscm_call_scm_to_stringn): Likewise.
(gdbscm_call_scm_from_stringn): Likewise.
* guile/scm-symbol.c (syscm_hash_symbol_smob): Likewise.
(syscm_eq_symbol_smob): Likewise.
(syscm_get_symbol_map): Likewise.
(syscm_del_objfile_symbols): Likewise.
* guile/scm-symtab.c (stscm_hash_symtab_smob): Likewise.
(stscm_eq_symtab_smob): Likewise.
(stscm_objfile_symtab_map): Likewise.
(stscm_del_objfile_symtabs): Likewise.
* guile/scm-type.c (tyscm_hash_type_smob): Likewise.
(tyscm_eq_type_smob): Likewise.
(tyscm_type_map): Likewise.
(tyscm_copy_type_recursive): Likewise.
(save_objfile_types): Likewise.
* guile/scm-utils.c (extract_arg): Likewise.
* h8300-tdep.c (h8300_frame_cache): Likewise.
* hppa-linux-tdep.c (hppa_linux_sigtramp_frame_unwind_cache): Likewise.
* hppa-tdep.c (compare_unwind_entries): Likewise.
(find_unwind_entry): Likewise.
(hppa_frame_cache): Likewise.
(hppa_stub_frame_unwind_cache): Likewise.
* hppanbsd-tdep.c (hppanbsd_supply_gregset): Likewise.
* hppaobsd-tdep.c (hppaobsd_supply_gregset): Likewise.
(hppaobsd_supply_fpregset): Likewise.
* i386-cygwin-tdep.c (core_process_module_section): Likewise.
* i386-linux-tdep.c (i386_linux_init_abi): Likewise.
* i386-tdep.c (i386_frame_cache): Likewise.
(i386_epilogue_frame_cache): Likewise.
(i386_sigtramp_frame_cache): Likewise.
(i386_supply_gregset): Likewise.
(i386_collect_gregset): Likewise.
(i386_gdbarch_init): Likewise.
* i386obsd-tdep.c (i386obsd_aout_supply_regset): Likewise.
(i386obsd_trapframe_cache): Likewise.
* i387-tdep.c (i387_supply_fsave): Likewise.
(i387_collect_fsave): Likewise.
(i387_supply_fxsave): Likewise.
(i387_collect_fxsave): Likewise.
(i387_supply_xsave): Likewise.
(i387_collect_xsave): Likewise.
* ia64-tdep.c (ia64_frame_cache): Likewise.
(ia64_sigtramp_frame_cache): Likewise.
* infcmd.c (attach_command_continuation): Likewise.
(attach_command_continuation_free_args): Likewise.
* inferior.c (restore_inferior): Likewise.
(delete_thread_of_inferior): Likewise.
* inflow.c (inflow_inferior_data_cleanup): Likewise.
(get_inflow_inferior_data): Likewise.
(inflow_inferior_exit): Likewise.
* infrun.c (displaced_step_clear_cleanup): Likewise.
(restore_current_uiout_cleanup): Likewise.
(release_stop_context_cleanup): Likewise.
(do_restore_infcall_suspend_state_cleanup): Likewise.
(do_restore_infcall_control_state_cleanup): Likewise.
(restore_inferior_ptid): Likewise.
* inline-frame.c (block_starting_point_at): Likewise.
* iq2000-tdep.c (iq2000_frame_cache): Likewise.
* jit.c (get_jit_objfile_data): Likewise.
(get_jit_program_space_data): Likewise.
(jit_object_close_impl): Likewise.
(jit_find_objf_with_entry_addr): Likewise.
(jit_breakpoint_deleted): Likewise.
(jit_unwind_reg_set_impl): Likewise.
(jit_unwind_reg_get_impl): Likewise.
(jit_dealloc_cache): Likewise.
(jit_frame_sniffer): Likewise.
(jit_frame_prev_register): Likewise.
(jit_prepend_unwinder): Likewise.
(jit_inferior_exit_hook): Likewise.
(free_objfile_data): Likewise.
* jv-lang.c (jv_per_objfile_free): Likewise.
(get_dynamics_objfile): Likewise.
(get_java_class_symtab): Likewise.
(builtin_java_type): Likewise.
* language.c (language_string_char_type): Likewise.
(language_bool_type): Likewise.
(language_lookup_primitive_type): Likewise.
(language_lookup_primitive_type_as_symbol): Likewise.
* linespec.c (hash_address_entry): Likewise.
(eq_address_entry): Likewise.
(iterate_inline_only): Likewise.
(iterate_name_matcher): Likewise.
(decode_line_2_compare_items): Likewise.
(collect_one_symbol): Likewise.
(compare_symbols): Likewise.
(compare_msymbols): Likewise.
(add_symtabs_to_list): Likewise.
(collect_symbols): Likewise.
(compare_msyms): Likewise.
(add_minsym): Likewise.
(cleanup_linespec_result): Likewise.
* linux-fork.c (inferior_call_waitpid_cleanup): Likewise.
* linux-nat.c (delete_lwp_cleanup): Likewise.
(count_events_callback): Likewise.
(select_event_lwp_callback): Likewise.
(resume_stopped_resumed_lwps): Likewise.
* linux-tdep.c (get_linux_gdbarch_data): Likewise.
(invalidate_linux_cache_inf): Likewise.
(get_linux_inferior_data): Likewise.
(linux_find_memory_regions_thunk): Likewise.
(linux_make_mappings_callback): Likewise.
(linux_corefile_thread_callback): Likewise.
(find_mapping_size): Likewise.
* linux-thread-db.c (find_new_threads_callback): Likewise.
* lm32-tdep.c (lm32_frame_cache): Likewise.
* m2-lang.c (builtin_m2_type): Likewise.
* m32c-tdep.c (m32c_analyze_frame_prologue): Likewise.
* m32r-linux-tdep.c (m32r_linux_sigtramp_frame_cache): Likewise.
(m32r_linux_supply_gregset): Likewise.
(m32r_linux_collect_gregset): Likewise.
* m32r-tdep.c (m32r_frame_unwind_cache): Likewise.
* m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
* m68k-tdep.c (m68k_frame_cache): Likewise.
* m68kbsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
(m68kbsd_supply_gregset): Likewise.
* m68klinux-tdep.c (m68k_linux_sigtramp_frame_cache): Likewise.
* m88k-tdep.c (m88k_frame_cache): Likewise.
(m88k_supply_gregset): Likewise.
gdb/gdbserver/ChangeLog:
* dll.c (match_dll): Add cast(s).
(unloaded_dll): Likewise.
* linux-low.c (second_thread_of_pid_p): Likewise.
(delete_lwp_callback): Likewise.
(count_events_callback): Likewise.
(select_event_lwp_callback): Likewise.
(linux_set_resume_request): Likewise.
* server.c (accumulate_file_name_length): Likewise.
(emit_dll_description): Likewise.
(handle_qxfer_threads_worker): Likewise.
(visit_actioned_threads): Likewise.
* thread-db.c (any_thread_of): Likewise.
* tracepoint.c (same_process_p): Likewise.
(match_blocktype): Likewise.
(build_traceframe_info_xml): Likewise.
gdb/testsuite/ChangeLog:
* gdb.gdb/selftest.exp (do_steps_and_nexts): Adjust expected
source line.
---
gdb/aarch64-tdep.c | 6 +-
gdb/ada-lang.c | 13 +-
gdb/ada-tasks.c | 6 +-
gdb/addrmap.c | 9 +-
gdb/alpha-linux-tdep.c | 8 +-
gdb/alpha-mdebug-tdep.c | 2 +-
gdb/alpha-tdep.c | 21 ++--
gdb/alphanbsd-tdep.c | 6 +-
gdb/amd64-linux-tdep.c | 8 +-
gdb/amd64-nat.c | 4 +-
gdb/amd64-tdep.c | 14 +--
gdb/amd64-windows-tdep.c | 2 +-
gdb/amd64obsd-tdep.c | 2 +-
gdb/arm-linux-tdep.c | 12 +-
gdb/arm-tdep.c | 31 ++---
gdb/armbsd-tdep.c | 4 +-
gdb/auto-load.c | 19 +--
gdb/auxv.c | 4 +-
gdb/avr-tdep.c | 2 +-
gdb/ax-general.c | 2 +-
gdb/bfd-target.c | 6 +-
gdb/bfin-tdep.c | 2 +-
gdb/block.c | 6 +-
gdb/break-catch-sig.c | 13 +-
gdb/break-catch-syscall.c | 3 +-
gdb/breakpoint.c | 38 +++---
gdb/bsd-uthread.c | 17 ++-
gdb/btrace.c | 29 ++---
gdb/c-typeprint.c | 2 +-
gdb/charset.c | 4 +-
gdb/cli-out.c | 40 +++---
gdb/cli/cli-cmds.c | 4 +-
gdb/cli/cli-dump.c | 4 +-
gdb/cli/cli-script.c | 6 +-
gdb/coff-pe-read.c | 6 +-
gdb/coffread.c | 3 +-
gdb/common/agent.c | 3 +-
gdb/common/filestuff.c | 2 +-
gdb/common/format.c | 2 +-
gdb/common/vec.c | 2 +-
gdb/compile/compile-c-support.c | 2 +-
gdb/compile/compile-c-symbols.c | 20 +--
gdb/compile/compile-c-types.c | 10 +-
gdb/compile/compile-object-load.c | 9 +-
gdb/compile/compile-object-run.c | 2 +-
gdb/compile/compile.c | 8 +-
gdb/completer.c | 2 +-
gdb/corelow.c | 2 +-
gdb/cp-namespace.c | 2 +-
gdb/cp-support.c | 2 +-
gdb/cris-tdep.c | 4 +-
gdb/d-lang.c | 2 +-
gdb/d-namespace.c | 2 +-
gdb/dbxread.c | 4 +-
gdb/disasm.c | 14 +--
gdb/doublest.c | 2 +-
gdb/dummy-frame.c | 8 +-
gdb/dwarf2-frame-tailcall.c | 18 +--
gdb/dwarf2-frame.c | 40 +++---
gdb/dwarf2expr.c | 7 +-
gdb/dwarf2loc.c | 87 +++++++------
gdb/dwarf2read.c | 243 +++++++++++++++++++++----------------
gdb/elfread.c | 27 +++--
gdb/f-lang.c | 2 +-
gdb/frame-base.c | 9 +-
gdb/frame-unwind.c | 9 +-
gdb/frame.c | 14 +--
gdb/frv-linux-tdep.c | 2 +-
gdb/frv-tdep.c | 2 +-
gdb/ft32-tdep.c | 2 +-
gdb/gcore.c | 6 +-
gdb/gdb_bfd.c | 37 +++---
gdb/gdbserver/dll.c | 6 +-
gdb/gdbserver/linux-low.c | 10 +-
gdb/gdbserver/server.c | 9 +-
gdb/gdbserver/thread-db.c | 2 +-
gdb/gdbserver/tracepoint.c | 6 +-
gdb/gdbtypes.c | 9 +-
gdb/gnu-v3-abi.c | 27 +++--
gdb/go-lang.c | 2 +-
gdb/guile/scm-block.c | 10 +-
gdb/guile/scm-breakpoint.c | 2 +-
gdb/guile/scm-disasm.c | 11 +-
gdb/guile/scm-frame.c | 10 +-
gdb/guile/scm-gsmob.c | 2 +-
gdb/guile/scm-objfile.c | 4 +-
gdb/guile/scm-ports.c | 12 +-
gdb/guile/scm-progspace.c | 4 +-
gdb/guile/scm-safe-call.c | 27 +++--
gdb/guile/scm-string.c | 4 +-
gdb/guile/scm-symbol.c | 15 +--
gdb/guile/scm-symtab.c | 10 +-
gdb/guile/scm-type.c | 12 +-
gdb/guile/scm-utils.c | 18 +--
gdb/h8300-tdep.c | 2 +-
gdb/hppa-linux-tdep.c | 2 +-
gdb/hppa-tdep.c | 22 ++--
gdb/hppanbsd-tdep.c | 2 +-
gdb/hppaobsd-tdep.c | 4 +-
gdb/i386-cygwin-tdep.c | 2 +-
gdb/i386-linux-tdep.c | 3 +-
gdb/i386-tdep.c | 12 +-
gdb/i386obsd-tdep.c | 4 +-
gdb/i387-tdep.c | 12 +-
gdb/ia64-tdep.c | 4 +-
gdb/infcmd.c | 6 +-
gdb/inferior.c | 5 +-
gdb/inflow.c | 6 +-
gdb/infrun.c | 13 +-
gdb/inline-frame.c | 2 +-
gdb/iq2000-tdep.c | 2 +-
gdb/jit.c | 37 +++---
gdb/jv-lang.c | 18 +--
gdb/language.c | 16 +--
gdb/linespec.c | 41 ++++---
gdb/linux-fork.c | 2 +-
gdb/linux-nat.c | 8 +-
gdb/linux-tdep.c | 18 +--
gdb/linux-thread-db.c | 2 +-
gdb/lm32-tdep.c | 2 +-
gdb/m2-lang.c | 2 +-
gdb/m32c-tdep.c | 5 +-
gdb/m32r-linux-tdep.c | 6 +-
gdb/m32r-tdep.c | 2 +-
gdb/m68hc11-tdep.c | 2 +-
gdb/m68k-tdep.c | 2 +-
gdb/m68kbsd-tdep.c | 4 +-
gdb/m68klinux-tdep.c | 2 +-
gdb/m88k-tdep.c | 4 +-
gdb/testsuite/gdb.gdb/selftest.exp | 2 +-
130 files changed, 805 insertions(+), 652 deletions(-)
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index da61e54..5b5e1ad 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -846,7 +846,7 @@ aarch64_make_prologue_cache (struct frame_info *this_frame, void **this_cache)
struct aarch64_prologue_cache *cache;
if (*this_cache != NULL)
- return *this_cache;
+ return (struct aarch64_prologue_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct aarch64_prologue_cache);
cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -971,7 +971,7 @@ aarch64_make_stub_cache (struct frame_info *this_frame, void **this_cache)
struct aarch64_prologue_cache *cache;
if (*this_cache != NULL)
- return *this_cache;
+ return (struct aarch64_prologue_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct aarch64_prologue_cache);
cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -2464,7 +2464,7 @@ aarch64_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
static struct value *
value_of_aarch64_user_reg (struct frame_info *frame, const void *baton)
{
- const int *reg_p = baton;
+ const int *reg_p = (const int *) baton;
return value_of_register (*reg_p, frame);
}
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 3c846db..9339828 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -398,7 +398,7 @@ ada_inferior_data_cleanup (struct inferior *inf, void *arg)
{
struct ada_inferior_data *data;
- data = inferior_data (inf, ada_inferior_data);
+ data = (struct ada_inferior_data *) inferior_data (inf, ada_inferior_data);
if (data != NULL)
xfree (data);
}
@@ -416,7 +416,7 @@ get_ada_inferior_data (struct inferior *inf)
{
struct ada_inferior_data *data;
- data = inferior_data (inf, ada_inferior_data);
+ data = (struct ada_inferior_data *) inferior_data (inf, ada_inferior_data);
if (data == NULL)
{
data = XCNEW (struct ada_inferior_data);
@@ -459,7 +459,8 @@ get_ada_pspace_data (struct program_space *pspace)
{
struct ada_pspace_data *data;
- data = program_space_data (pspace, ada_pspace_data_handle);
+ data = ((struct ada_pspace_data *)
+ program_space_data (pspace, ada_pspace_data_handle));
if (data == NULL)
{
data = XCNEW (struct ada_pspace_data);
@@ -474,7 +475,7 @@ get_ada_pspace_data (struct program_space *pspace)
static void
ada_pspace_data_cleanup (struct program_space *pspace, void *data)
{
- struct ada_pspace_data *pspace_data = data;
+ struct ada_pspace_data *pspace_data = (struct ada_pspace_data *) data;
if (pspace_data->sym_cache != NULL)
ada_free_symbol_cache (pspace_data->sym_cache);
@@ -6370,7 +6371,7 @@ struct add_partial_datum
static int
ada_complete_symbol_matcher (const char *name, void *user_data)
{
- struct add_partial_datum *data = user_data;
+ struct add_partial_datum *data = (struct add_partial_datum *) user_data;
return symbol_completion_match (name, data->text, data->text_len,
data->wild_match, data->encoded) != NULL;
@@ -13124,7 +13125,7 @@ sort_remove_dups_ada_exceptions_list (VEC(ada_exc_info) **exceptions,
static int
ada_exc_search_name_matches (const char *search_name, void *user_data)
{
- regex_t *preg = user_data;
+ regex_t *preg = (regex_t *) user_data;
if (preg == NULL)
return 1;
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
index fbe67aa..e2194dd 100644
--- a/gdb/ada-tasks.c
+++ b/gdb/ada-tasks.c
@@ -248,7 +248,8 @@ get_ada_tasks_pspace_data (struct program_space *pspace)
{
struct ada_tasks_pspace_data *data;
- data = program_space_data (pspace, ada_tasks_pspace_data_handle);
+ data = ((struct ada_tasks_pspace_data *)
+ program_space_data (pspace, ada_tasks_pspace_data_handle));
if (data == NULL)
{
data = XCNEW (struct ada_tasks_pspace_data);
@@ -275,7 +276,8 @@ get_ada_tasks_inferior_data (struct inferior *inf)
{
struct ada_tasks_inferior_data *data;
- data = inferior_data (inf, ada_tasks_inferior_data_handle);
+ data = ((struct ada_tasks_inferior_data *)
+ inferior_data (inf, ada_tasks_inferior_data_handle));
if (data == NULL)
{
data = XCNEW (struct ada_tasks_inferior_data);
diff --git a/gdb/addrmap.c b/gdb/addrmap.c
index a526167..d710f0e 100644
--- a/gdb/addrmap.c
+++ b/gdb/addrmap.c
@@ -479,7 +479,8 @@ struct mutable_foreach_data
static int
addrmap_mutable_foreach_worker (splay_tree_node node, void *data)
{
- struct mutable_foreach_data *foreach_data = data;
+ struct mutable_foreach_data *foreach_data =
+ (struct mutable_foreach_data *) data;
return foreach_data->fn (foreach_data->data,
addrmap_node_key (node),
@@ -514,7 +515,7 @@ static const struct addrmap_funcs addrmap_mutable_funcs =
static void *
splay_obstack_alloc (int size, void *closure)
{
- struct addrmap_mutable *map = closure;
+ struct addrmap_mutable *map = (struct addrmap_mutable *) closure;
splay_tree_node n;
/* We should only be asked to allocate nodes and larger things.
@@ -536,8 +537,8 @@ splay_obstack_alloc (int size, void *closure)
static void
splay_obstack_free (void *obj, void *closure)
{
- struct addrmap_mutable *map = closure;
- splay_tree_node n = obj;
+ struct addrmap_mutable *map = (struct addrmap_mutable *) closure;
+ splay_tree_node n = (splay_tree_node) obj;
/* We've asserted in the allocation function that we only allocate
nodes or larger things, so it should be safe to put whatever
diff --git a/gdb/alpha-linux-tdep.c b/gdb/alpha-linux-tdep.c
index 27bd452..3263049 100644
--- a/gdb/alpha-linux-tdep.c
+++ b/gdb/alpha-linux-tdep.c
@@ -163,7 +163,7 @@ alpha_linux_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
gdb_assert (len >= 32 * 8);
alpha_supply_int_regs (regcache, regnum, regs, regs + 31 * 8,
@@ -180,7 +180,7 @@ alpha_linux_collect_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs, size_t len)
{
- gdb_byte *regs = gregs;
+ gdb_byte *regs = (gdb_byte *) gregs;
gdb_assert (len >= 32 * 8);
alpha_fill_int_regs (regcache, regnum, regs, regs + 31 * 8,
@@ -196,7 +196,7 @@ alpha_linux_supply_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
- const gdb_byte *regs = fpregs;
+ const gdb_byte *regs = (const gdb_byte *) fpregs;
gdb_assert (len >= 32 * 8);
alpha_supply_fp_regs (regcache, regnum, regs, regs + 31 * 8);
@@ -212,7 +212,7 @@ alpha_linux_collect_fpregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *fpregs, size_t len)
{
- gdb_byte *regs = fpregs;
+ gdb_byte *regs = (gdb_byte *) fpregs;
gdb_assert (len >= 32 * 8);
alpha_fill_fp_regs (regcache, regnum, regs, regs + 31 * 8);
diff --git a/gdb/alpha-mdebug-tdep.c b/gdb/alpha-mdebug-tdep.c
index a8a511b..a32088b 100644
--- a/gdb/alpha-mdebug-tdep.c
+++ b/gdb/alpha-mdebug-tdep.c
@@ -197,7 +197,7 @@ alpha_mdebug_frame_unwind_cache (struct frame_info *this_frame,
int ireg, returnreg;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct alpha_mdebug_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct alpha_mdebug_unwind_cache);
*this_prologue_cache = info;
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 7654096..50c9c3b 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -185,7 +185,8 @@ static void
alpha_lds (struct gdbarch *gdbarch, void *out, const void *in)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- ULONGEST mem = extract_unsigned_integer (in, 4, byte_order);
+ ULONGEST mem =
+ extract_unsigned_integer ((const gdb_byte *) in, 4, byte_order);
ULONGEST frac = (mem >> 0) & 0x7fffff;
ULONGEST sign = (mem >> 31) & 1;
ULONGEST exp_msb = (mem >> 30) & 1;
@@ -205,7 +206,7 @@ alpha_lds (struct gdbarch *gdbarch, void *out, const void *in)
}
reg = (sign << 63) | (exp << 52) | (frac << 29);
- store_unsigned_integer (out, 8, byte_order, reg);
+ store_unsigned_integer ((gdb_byte *) out, 8, byte_order, reg);
}
/* Similarly, this represents exactly the conversion performed by
@@ -217,9 +218,9 @@ alpha_sts (struct gdbarch *gdbarch, void *out, const void *in)
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST reg, mem;
- reg = extract_unsigned_integer (in, 8, byte_order);
+ reg = extract_unsigned_integer ((const gdb_byte *) in, 8, byte_order);
mem = ((reg >> 32) & 0xc0000000) | ((reg >> 29) & 0x3fffffff);
- store_unsigned_integer (out, 4, byte_order, mem);
+ store_unsigned_integer ((gdb_byte *) out, 4, byte_order, mem);
}
/* The alpha needs a conversion between register and memory format if the
@@ -889,7 +890,7 @@ alpha_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
struct gdbarch_tdep *tdep;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct alpha_sigtramp_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct alpha_sigtramp_unwind_cache);
*this_prologue_cache = info;
@@ -1239,7 +1240,7 @@ alpha_heuristic_frame_unwind_cache (struct frame_info *this_frame,
int frame_reg, frame_size, return_reg, reg;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct alpha_heuristic_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct alpha_heuristic_unwind_cache);
*this_prologue_cache = info;
@@ -1498,7 +1499,7 @@ void
alpha_supply_int_regs (struct regcache *regcache, int regno,
const void *r0_r30, const void *pc, const void *unique)
{
- const gdb_byte *regs = r0_r30;
+ const gdb_byte *regs = (const gdb_byte *) r0_r30;
int i;
for (i = 0; i < 31; ++i)
@@ -1523,7 +1524,7 @@ void
alpha_fill_int_regs (const struct regcache *regcache,
int regno, void *r0_r30, void *pc, void *unique)
{
- gdb_byte *regs = r0_r30;
+ gdb_byte *regs = (gdb_byte *) r0_r30;
int i;
for (i = 0; i < 31; ++i)
@@ -1541,7 +1542,7 @@ void
alpha_supply_fp_regs (struct regcache *regcache, int regno,
const void *f0_f30, const void *fpcr)
{
- const gdb_byte *regs = f0_f30;
+ const gdb_byte *regs = (const gdb_byte *) f0_f30;
int i;
for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
@@ -1557,7 +1558,7 @@ void
alpha_fill_fp_regs (const struct regcache *regcache,
int regno, void *f0_f30, void *fpcr)
{
- gdb_byte *regs = f0_f30;
+ gdb_byte *regs = (gdb_byte *) f0_f30;
int i;
for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c
index 69be265..8e07c55 100644
--- a/gdb/alphanbsd-tdep.c
+++ b/gdb/alphanbsd-tdep.c
@@ -53,7 +53,7 @@ alphanbsd_supply_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
- const gdb_byte *regs = fpregs;
+ const gdb_byte *regs = (const gdb_byte *) fpregs;
int i;
gdb_assert (len >= ALPHANBSD_SIZEOF_FPREGS);
@@ -77,7 +77,7 @@ alphanbsd_aout_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
/* Table to map a GDB register number to a trapframe register index. */
@@ -121,7 +121,7 @@ alphanbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
if (len >= ALPHANBSD_SIZEOF_GREGS + ALPHANBSD_SIZEOF_FPREGS)
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index 14c1065..3da1a8b 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -1845,7 +1845,8 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
const struct target_desc *tdesc = info.target_desc;
- struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info;
+ struct tdesc_arch_data *tdesc_data =
+ (struct tdesc_arch_data *) info.tdep_info;
const struct tdesc_feature *feature;
int valid_p;
@@ -2057,11 +2058,12 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
}
static void
-amd64_x32_linux_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
+amd64_x32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
const struct target_desc *tdesc = info.target_desc;
- struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info;
+ struct tdesc_arch_data *tdesc_data =
+ (struct tdesc_arch_data *) info.tdep_info;
const struct tdesc_feature *feature;
int valid_p;
diff --git a/gdb/amd64-nat.c b/gdb/amd64-nat.c
index 6a1690e..884f04d 100644
--- a/gdb/amd64-nat.c
+++ b/gdb/amd64-nat.c
@@ -88,7 +88,7 @@ void
amd64_supply_native_gregset (struct regcache *regcache,
const void *gregs, int regnum)
{
- const char *regs = gregs;
+ const char *regs = (const char *) gregs;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
int num_regs = amd64_native_gregset64_num_regs;
int i;
@@ -119,7 +119,7 @@ void
amd64_collect_native_gregset (const struct regcache *regcache,
void *gregs, int regnum)
{
- char *regs = gregs;
+ char *regs = (char *) gregs;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
int num_regs = amd64_native_gregset64_num_regs;
int i;
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index 808042e..7c48848 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -2471,7 +2471,7 @@ amd64_frame_cache (struct frame_info *this_frame, void **this_cache)
struct amd64_frame_cache *cache;
if (*this_cache)
- return *this_cache;
+ return (struct amd64_frame_cache *) *this_cache;
cache = amd64_alloc_frame_cache ();
*this_cache = cache;
@@ -2590,7 +2590,7 @@ amd64_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct amd64_frame_cache *) *this_cache;
cache = amd64_alloc_frame_cache ();
@@ -2766,7 +2766,7 @@ amd64_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache)
gdb_byte buf[8];
if (*this_cache)
- return *this_cache;
+ return (struct amd64_frame_cache *) *this_cache;
cache = amd64_alloc_frame_cache ();
*this_cache = cache;
@@ -3182,7 +3182,7 @@ amd64_supply_fxsave (struct regcache *regcache, int regnum,
if (fxsave
&& gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64)
{
- const gdb_byte *regs = fxsave;
+ const gdb_byte *regs = (const gdb_byte *) fxsave;
if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep))
regcache_raw_supply (regcache, I387_FISEG_REGNUM (tdep), regs + 12);
@@ -3205,7 +3205,7 @@ amd64_supply_xsave (struct regcache *regcache, int regnum,
if (xsave
&& gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64)
{
- const gdb_byte *regs = xsave;
+ const gdb_byte *regs = (const gdb_byte *) xsave;
if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep))
regcache_raw_supply (regcache, I387_FISEG_REGNUM (tdep),
@@ -3227,7 +3227,7 @@ amd64_collect_fxsave (const struct regcache *regcache, int regnum,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- gdb_byte *regs = fxsave;
+ gdb_byte *regs = (gdb_byte *) fxsave;
i387_collect_fxsave (regcache, regnum, fxsave);
@@ -3248,7 +3248,7 @@ amd64_collect_xsave (const struct regcache *regcache, int regnum,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- gdb_byte *regs = xsave;
+ gdb_byte *regs = (gdb_byte *) xsave;
i387_collect_xsave (regcache, regnum, xsave, gcore);
diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c
index 8b6e52b..296bdb2 100644
--- a/gdb/amd64-windows-tdep.c
+++ b/gdb/amd64-windows-tdep.c
@@ -1025,7 +1025,7 @@ amd64_windows_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR unwind_info = 0;
if (*this_cache)
- return *this_cache;
+ return (struct amd64_windows_frame_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct amd64_windows_frame_cache);
*this_cache = cache;
diff --git a/gdb/amd64obsd-tdep.c b/gdb/amd64obsd-tdep.c
index 46bf7c5..4effa08 100644
--- a/gdb/amd64obsd-tdep.c
+++ b/gdb/amd64obsd-tdep.c
@@ -363,7 +363,7 @@ amd64obsd_trapframe_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
*this_cache = cache;
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 46d59ba..b7c5b99 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -506,7 +506,7 @@ arm_linux_supply_gregset (const struct regset *regset,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- const gdb_byte *gregs = gregs_buf;
+ const gdb_byte *gregs = (const gdb_byte *) gregs_buf;
int regno;
CORE_ADDR reg_pc;
gdb_byte pc_buf[INT_REGISTER_SIZE];
@@ -542,7 +542,7 @@ arm_linux_collect_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs_buf, size_t len)
{
- gdb_byte *gregs = gregs_buf;
+ gdb_byte *gregs = (gdb_byte *) gregs_buf;
int regno;
for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++)
@@ -649,7 +649,7 @@ arm_linux_supply_nwfpe (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *regs_buf, size_t len)
{
- const gdb_byte *regs = regs_buf;
+ const gdb_byte *regs = (const gdb_byte *) regs_buf;
int regno;
if (regnum == ARM_FPS_REGNUM || regnum == -1)
@@ -666,7 +666,7 @@ arm_linux_collect_nwfpe (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *regs_buf, size_t len)
{
- gdb_byte *regs = regs_buf;
+ gdb_byte *regs = (gdb_byte *) regs_buf;
int regno;
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
@@ -687,7 +687,7 @@ arm_linux_supply_vfp (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *regs_buf, size_t len)
{
- const gdb_byte *regs = regs_buf;
+ const gdb_byte *regs = (const gdb_byte *) regs_buf;
int regno;
if (regnum == ARM_FPSCR_REGNUM || regnum == -1)
@@ -704,7 +704,7 @@ arm_linux_collect_vfp (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *regs_buf, size_t len)
{
- gdb_byte *regs = regs_buf;
+ gdb_byte *regs = (gdb_byte *) regs_buf;
int regno;
if (regnum == ARM_FPSCR_REGNUM || regnum == -1)
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 1ee7d68..d9325a3 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -333,7 +333,8 @@ arm_find_mapping_symbol (CORE_ADDR memaddr, CORE_ADDR *start)
0 };
unsigned int idx;
- data = objfile_data (sec->objfile, arm_objfile_data_key);
+ data = (struct arm_per_objfile *) objfile_data (sec->objfile,
+ arm_objfile_data_key);
if (data != NULL)
{
map = data->section_maps[sec->the_bfd_section->index];
@@ -2028,7 +2029,7 @@ arm_prologue_unwind_stop_reason (struct frame_info *this_frame,
if (*this_cache == NULL)
*this_cache = arm_make_prologue_cache (this_frame);
- cache = *this_cache;
+ cache = (struct arm_prologue_cache *) *this_cache;
/* This is meant to halt the backtrace at "_start". */
pc = get_frame_pc (this_frame);
@@ -2056,7 +2057,7 @@ arm_prologue_this_id (struct frame_info *this_frame,
if (*this_cache == NULL)
*this_cache = arm_make_prologue_cache (this_frame);
- cache = *this_cache;
+ cache = (struct arm_prologue_cache *) *this_cache;
/* Use function start address as part of the frame ID. If we cannot
identify the start address (due to missing symbol information),
@@ -2080,7 +2081,7 @@ arm_prologue_prev_register (struct frame_info *this_frame,
if (*this_cache == NULL)
*this_cache = arm_make_prologue_cache (this_frame);
- cache = *this_cache;
+ cache = (struct arm_prologue_cache *) *this_cache;
/* If we are asked to unwind the PC, then we need to return the LR
instead. The prologue may save PC, but it will point into this
@@ -2160,7 +2161,7 @@ struct arm_exidx_data
static void
arm_exidx_data_free (struct objfile *objfile, void *arg)
{
- struct arm_exidx_data *data = arg;
+ struct arm_exidx_data *data = (struct arm_exidx_data *) arg;
unsigned int i;
for (i = 0; i < objfile->obfd->section_count; i++)
@@ -2435,7 +2436,8 @@ arm_find_exidx_entry (CORE_ADDR memaddr, CORE_ADDR *start)
struct arm_exidx_entry map_key = { memaddr - obj_section_addr (sec), 0 };
unsigned int idx;
- data = objfile_data (sec->objfile, arm_exidx_data_key);
+ data = ((struct arm_exidx_data *)
+ objfile_data (sec->objfile, arm_exidx_data_key));
if (data != NULL)
{
map = data->section_maps[sec->the_bfd_section->index];
@@ -2960,7 +2962,7 @@ arm_stub_this_id (struct frame_info *this_frame,
if (*this_cache == NULL)
*this_cache = arm_make_stub_cache (this_frame);
- cache = *this_cache;
+ cache = (struct arm_prologue_cache *) *this_cache;
*this_id = frame_id_build (cache->prev_sp, get_frame_pc (this_frame));
}
@@ -3054,7 +3056,7 @@ arm_m_exception_this_id (struct frame_info *this_frame,
if (*this_cache == NULL)
*this_cache = arm_m_exception_cache (this_frame);
- cache = *this_cache;
+ cache = (struct arm_prologue_cache *) *this_cache;
/* Our frame ID for a stub frame is the current SP and LR. */
*this_id = frame_id_build (cache->prev_sp,
@@ -3074,7 +3076,7 @@ arm_m_exception_prev_register (struct frame_info *this_frame,
if (*this_cache == NULL)
*this_cache = arm_m_exception_cache (this_frame);
- cache = *this_cache;
+ cache = (struct arm_prologue_cache *) *this_cache;
/* The value was already reconstructed into PREV_SP. */
if (prev_regnum == ARM_SP_REGNUM)
@@ -3127,7 +3129,7 @@ arm_normal_frame_base (struct frame_info *this_frame, void **this_cache)
if (*this_cache == NULL)
*this_cache = arm_make_prologue_cache (this_frame);
- cache = *this_cache;
+ cache = (struct arm_prologue_cache *) *this_cache;
return cache->prev_sp - cache->framesize;
}
@@ -8770,7 +8772,7 @@ arm_displaced_step_fixup (struct gdbarch *gdbarch,
static int
gdb_print_insn_arm (bfd_vma memaddr, disassemble_info *info)
{
- struct gdbarch *gdbarch = info->application_data;
+ struct gdbarch *gdbarch = (struct gdbarch *) info->application_data;
if (arm_pc_is_thumb (gdbarch, memaddr))
{
@@ -9598,7 +9600,7 @@ arm_coff_make_msymbol_special(int val, struct minimal_symbol *msym)
static void
arm_objfile_data_free (struct objfile *objfile, void *arg)
{
- struct arm_per_objfile *data = arg;
+ struct arm_per_objfile *data = (struct arm_per_objfile *) arg;
unsigned int i;
for (i = 0; i < objfile->obfd->section_count; i++)
@@ -9618,7 +9620,8 @@ arm_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile,
if (name[1] != 'a' && name[1] != 't' && name[1] != 'd')
return;
- data = objfile_data (objfile, arm_objfile_data_key);
+ data =
+ (struct arm_per_objfile *) objfile_data (objfile, arm_objfile_data_key);
if (data == NULL)
{
data = OBSTACK_ZALLOC (&objfile->objfile_obstack,
@@ -9822,7 +9825,7 @@ arm_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
static struct value *
value_of_arm_user_reg (struct frame_info *frame, const void *baton)
{
- const int *reg_p = baton;
+ const int *reg_p = (const int *) baton;
return value_of_register (*reg_p, frame);
}
\f
diff --git a/gdb/armbsd-tdep.c b/gdb/armbsd-tdep.c
index c043b51..1b9bad7 100644
--- a/gdb/armbsd-tdep.c
+++ b/gdb/armbsd-tdep.c
@@ -50,7 +50,7 @@ armbsd_supply_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
- const gdb_byte *regs = fpregs;
+ const gdb_byte *regs = (const gdb_byte *) fpregs;
int i;
gdb_assert (len >= ARMBSD_SIZEOF_FPREGS);
@@ -71,7 +71,7 @@ armbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
gdb_assert (len >= ARMBSD_SIZEOF_GREGS);
diff --git a/gdb/auto-load.c b/gdb/auto-load.c
index 119c673..35c5cb1 100644
--- a/gdb/auto-load.c
+++ b/gdb/auto-load.c
@@ -580,7 +580,7 @@ static const struct program_space_data *auto_load_pspace_data;
static void
auto_load_pspace_data_cleanup (struct program_space *pspace, void *arg)
{
- struct auto_load_pspace_info *info = arg;
+ struct auto_load_pspace_info *info = (struct auto_load_pspace_info *) arg;
if (info->loaded_script_files)
htab_delete (info->loaded_script_files);
@@ -597,7 +597,8 @@ get_auto_load_pspace_data (struct program_space *pspace)
{
struct auto_load_pspace_info *info;
- info = program_space_data (pspace, auto_load_pspace_data);
+ info = ((struct auto_load_pspace_info *)
+ program_space_data (pspace, auto_load_pspace_data));
if (info == NULL)
{
info = XCNEW (struct auto_load_pspace_info);
@@ -612,7 +613,7 @@ get_auto_load_pspace_data (struct program_space *pspace)
static hashval_t
hash_loaded_script_entry (const void *data)
{
- const struct loaded_script *e = data;
+ const struct loaded_script *e = (const struct loaded_script *) data;
return htab_hash_string (e->name) ^ htab_hash_pointer (e->language);
}
@@ -622,8 +623,8 @@ hash_loaded_script_entry (const void *data)
static int
eq_loaded_script_entry (const void *a, const void *b)
{
- const struct loaded_script *ea = a;
- const struct loaded_script *eb = b;
+ const struct loaded_script *ea = (const struct loaded_script *) a;
+ const struct loaded_script *eb = (const struct loaded_script *) b;
return strcmp (ea->name, eb->name) == 0 && ea->language == eb->language;
}
@@ -762,7 +763,8 @@ clear_section_scripts (void)
struct program_space *pspace = current_program_space;
struct auto_load_pspace_info *info;
- info = program_space_data (pspace, auto_load_pspace_data);
+ info = ((struct auto_load_pspace_info *)
+ program_space_data (pspace, auto_load_pspace_data));
if (info != NULL && info->loaded_script_files != NULL)
{
htab_delete (info->loaded_script_files);
@@ -1249,8 +1251,9 @@ struct collect_matching_scripts_data
static int
collect_matching_scripts (void **slot, void *info)
{
- struct loaded_script *script = *slot;
- struct collect_matching_scripts_data *data = info;
+ struct loaded_script *script = (struct loaded_script *) *slot;
+ struct collect_matching_scripts_data *data =
+ (struct collect_matching_scripts_data *) info;
if (script->language == data->language && re_exec (script->name))
VEC_safe_push (loaded_script_ptr, *data->scripts_p, script);
diff --git a/gdb/auxv.c b/gdb/auxv.c
index f99da36..1f22d8a 100644
--- a/gdb/auxv.c
+++ b/gdb/auxv.c
@@ -320,7 +320,7 @@ auxv_inferior_data_cleanup (struct inferior *inf, void *arg)
{
struct auxv_info *info;
- info = inferior_data (inf, auxv_inferior_data);
+ info = (struct auxv_info *) inferior_data (inf, auxv_inferior_data);
if (info != NULL)
{
xfree (info->data);
@@ -355,7 +355,7 @@ get_auxv_inferior_data (struct target_ops *ops)
struct auxv_info *info;
struct inferior *inf = current_inferior ();
- info = inferior_data (inf, auxv_inferior_data);
+ info = (struct auxv_info *) inferior_data (inf, auxv_inferior_data);
if (info == NULL)
{
info = XCNEW (struct auxv_info);
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index aaa2921..4fcae53 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -987,7 +987,7 @@ avr_frame_unwind_cache (struct frame_info *this_frame,
int i;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct avr_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct avr_unwind_cache);
*this_prologue_cache = info;
diff --git a/gdb/ax-general.c b/gdb/ax-general.c
index 411b478..98c42e7 100644
--- a/gdb/ax-general.c
+++ b/gdb/ax-general.c
@@ -73,7 +73,7 @@ free_agent_expr (struct agent_expr *x)
static void
do_free_agent_expr_cleanup (void *x)
{
- free_agent_expr (x);
+ free_agent_expr ((struct agent_expr *) x);
}
struct cleanup *
diff --git a/gdb/bfd-target.c b/gdb/bfd-target.c
index b7cd8e6..ee93c3b 100644
--- a/gdb/bfd-target.c
+++ b/gdb/bfd-target.c
@@ -48,7 +48,7 @@ target_bfd_xfer_partial (struct target_ops *ops,
{
case TARGET_OBJECT_MEMORY:
{
- struct target_bfd_data *data = ops->to_data;
+ struct target_bfd_data *data = (struct target_bfd_data *) ops->to_data;
return section_table_xfer_memory_partial (readbuf, writebuf,
offset, len, xfered_len,
data->table.sections,
@@ -63,14 +63,14 @@ target_bfd_xfer_partial (struct target_ops *ops,
static struct target_section_table *
target_bfd_get_section_table (struct target_ops *ops)
{
- struct target_bfd_data *data = ops->to_data;
+ struct target_bfd_data *data = (struct target_bfd_data *) ops->to_data;
return &data->table;
}
static void
target_bfd_xclose (struct target_ops *t)
{
- struct target_bfd_data *data = t->to_data;
+ struct target_bfd_data *data = (struct target_bfd_data *) t->to_data;
gdb_bfd_unref (data->bfd);
xfree (data->table.sections);
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index 4532e1b..3afa7bc 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -292,7 +292,7 @@ bfin_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct bfin_frame_cache *) *this_cache;
cache = bfin_alloc_frame_cache ();
*this_cache = cache;
diff --git a/gdb/block.c b/gdb/block.c
index 3195baa..a1fb3ad 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -140,7 +140,7 @@ find_block_in_blockvector (const struct blockvector *bl, CORE_ADDR pc)
/* If we have an addrmap mapping code addresses to blocks, then use
that. */
if (BLOCKVECTOR_MAP (bl))
- return addrmap_find (BLOCKVECTOR_MAP (bl), pc);
+ return (struct block *) addrmap_find (BLOCKVECTOR_MAP (bl), pc);
/* Otherwise, use binary search to find the last block that starts
before PC.
@@ -246,7 +246,7 @@ call_site_for_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
: MSYMBOL_PRINT_NAME (msym.minsym)));
}
- return *slot;
+ return (struct call_site *) *slot;
}
/* Return the blockvector immediately containing the innermost lexical block
@@ -870,7 +870,7 @@ block_find_non_opaque_type (struct symbol *sym, void *data)
int
block_find_non_opaque_type_preferred (struct symbol *sym, void *data)
{
- struct symbol **best = data;
+ struct symbol **best = (struct symbol **) data;
if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym)))
return 1;
diff --git a/gdb/break-catch-sig.c b/gdb/break-catch-sig.c
index 419d226..2318161 100644
--- a/gdb/break-catch-sig.c
+++ b/gdb/break-catch-sig.c
@@ -107,7 +107,7 @@ signal_catchpoint_dtor (struct breakpoint *b)
static int
signal_catchpoint_insert_location (struct bp_location *bl)
{
- struct signal_catchpoint *c = (void *) bl->owner;
+ struct signal_catchpoint *c = (struct signal_catchpoint *) bl->owner;
int i;
if (c->signals_to_be_caught != NULL)
@@ -139,7 +139,7 @@ signal_catchpoint_insert_location (struct bp_location *bl)
static int
signal_catchpoint_remove_location (struct bp_location *bl)
{
- struct signal_catchpoint *c = (void *) bl->owner;
+ struct signal_catchpoint *c = (struct signal_catchpoint *) bl->owner;
int i;
if (c->signals_to_be_caught != NULL)
@@ -180,7 +180,8 @@ signal_catchpoint_breakpoint_hit (const struct bp_location *bl,
CORE_ADDR bp_addr,
const struct target_waitstatus *ws)
{
- const struct signal_catchpoint *c = (void *) bl->owner;
+ const struct signal_catchpoint *c =
+ (const struct signal_catchpoint *) bl->owner;
gdb_signal_type signal_number;
if (ws->kind != TARGET_WAITKIND_STOPPED)
@@ -238,7 +239,7 @@ static void
signal_catchpoint_print_one (struct breakpoint *b,
struct bp_location **last_loc)
{
- struct signal_catchpoint *c = (void *) b;
+ struct signal_catchpoint *c = (struct signal_catchpoint *) b;
struct value_print_options opts;
struct ui_out *uiout = current_uiout;
@@ -296,7 +297,7 @@ signal_catchpoint_print_one (struct breakpoint *b,
static void
signal_catchpoint_print_mention (struct breakpoint *b)
{
- struct signal_catchpoint *c = (void *) b;
+ struct signal_catchpoint *c = (struct signal_catchpoint *) b;
if (c->signals_to_be_caught)
{
@@ -330,7 +331,7 @@ signal_catchpoint_print_mention (struct breakpoint *b)
static void
signal_catchpoint_print_recreate (struct breakpoint *b, struct ui_file *fp)
{
- struct signal_catchpoint *c = (void *) b;
+ struct signal_catchpoint *c = (struct signal_catchpoint *) b;
fprintf_unfiltered (fp, "catch signal");
diff --git a/gdb/break-catch-syscall.c b/gdb/break-catch-syscall.c
index 1718f49..7ae115f 100644
--- a/gdb/break-catch-syscall.c
+++ b/gdb/break-catch-syscall.c
@@ -85,7 +85,8 @@ get_catch_syscall_inferior_data (struct inferior *inf)
{
struct catch_syscall_inferior_data *inf_data;
- inf_data = inferior_data (inf, catch_syscall_inferior_data);
+ inf_data = ((struct catch_syscall_inferior_data *)
+ inferior_data (inf, catch_syscall_inferior_data));
if (inf_data == NULL)
{
inf_data = XCNEW (struct catch_syscall_inferior_data);
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index c09d56a..a4541d9 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -766,7 +766,7 @@ decref_counted_command_line (struct counted_command_line **cmdp)
static void
do_cleanup_counted_command_line (void *arg)
{
- decref_counted_command_line (arg);
+ decref_counted_command_line ((struct counted_command_line **) arg);
}
/* Create a cleanup that calls decref_counted_command_line on the
@@ -925,8 +925,8 @@ show_condition_evaluation_mode (struct ui_file *file, int from_tty,
static int
bp_location_compare_addrs (const void *ap, const void *bp)
{
- struct bp_location *a = *(void **) ap;
- struct bp_location *b = *(void **) bp;
+ const struct bp_location *a = *(const struct bp_location **) ap;
+ const struct bp_location *b = *(const struct bp_location **) bp;
if (a->address == b->address)
return 0;
@@ -951,9 +951,10 @@ get_first_locp_gte_addr (CORE_ADDR address)
dummy_loc.address = address;
/* Find a close match to the first location at ADDRESS. */
- locp_found = bsearch (&dummy_locp, bp_location, bp_location_count,
- sizeof (struct bp_location **),
- bp_location_compare_addrs);
+ locp_found = ((struct bp_location **)
+ bsearch (&dummy_locp, bp_location, bp_location_count,
+ sizeof (struct bp_location **),
+ bp_location_compare_addrs));
/* Nothing was found, nothing left to do. */
if (locp_found == NULL)
@@ -1323,7 +1324,7 @@ breakpoint_set_task (struct breakpoint *b, int task)
void
check_tracepoint_command (char *line, void *closure)
{
- struct breakpoint *b = closure;
+ struct breakpoint *b = (struct breakpoint *) closure;
validate_actionline (line, b);
}
@@ -1354,7 +1355,7 @@ struct commands_info
static void
do_map_commands_command (struct breakpoint *b, void *data)
{
- struct commands_info *info = data;
+ struct commands_info *info = (struct commands_info *) data;
if (info->cmd == NULL)
{
@@ -3393,7 +3394,8 @@ get_breakpoint_objfile_data (struct objfile *objfile)
{
struct breakpoint_objfile_data *bp_objfile_data;
- bp_objfile_data = objfile_data (objfile, breakpoint_objfile_key);
+ bp_objfile_data = ((struct breakpoint_objfile_data *)
+ objfile_data (objfile, breakpoint_objfile_key));
if (bp_objfile_data == NULL)
{
bp_objfile_data =
@@ -3408,7 +3410,8 @@ get_breakpoint_objfile_data (struct objfile *objfile)
static void
free_breakpoint_probes (struct objfile *obj, void *data)
{
- struct breakpoint_objfile_data *bp_objfile_data = data;
+ struct breakpoint_objfile_data *bp_objfile_data =
+ (struct breakpoint_objfile_data *) data;
VEC_free (probe_p, bp_objfile_data->longjmp_probes);
VEC_free (probe_p, bp_objfile_data->exception_probes);
@@ -6651,7 +6654,8 @@ struct captured_breakpoint_query_args
static int
do_captured_breakpoint_query (struct ui_out *uiout, void *data)
{
- struct captured_breakpoint_query_args *args = data;
+ struct captured_breakpoint_query_args *args =
+ (struct captured_breakpoint_query_args *) data;
struct breakpoint *b;
struct bp_location *dummy_loc = NULL;
@@ -11852,9 +11856,9 @@ tcatch_command (char *arg, int from_tty)
static int
compare_breakpoints (const void *a, const void *b)
{
- const breakpoint_p *ba = a;
+ const breakpoint_p *ba = (const breakpoint_p *) a;
uintptr_t ua = (uintptr_t) *ba;
- const breakpoint_p *bb = b;
+ const breakpoint_p *bb = (const breakpoint_p *) b;
uintptr_t ub = (uintptr_t) *bb;
if ((*ba)->number < (*bb)->number)
@@ -12074,8 +12078,8 @@ breakpoint_auto_delete (bpstat bs)
static int
bp_location_compare (const void *ap, const void *bp)
{
- struct bp_location *a = *(void **) ap;
- struct bp_location *b = *(void **) bp;
+ const struct bp_location *a = *(const struct bp_location **) ap;
+ const struct bp_location *b = *(const struct bp_location **) bp;
if (a->address != b->address)
return (a->address > b->address) - (a->address < b->address);
@@ -12676,7 +12680,7 @@ bpstat_remove_bp_location (bpstat bps, struct breakpoint *bpt)
static int
bpstat_remove_breakpoint_callback (struct thread_info *th, void *data)
{
- struct breakpoint *bpt = data;
+ struct breakpoint *bpt = (struct breakpoint *) data;
bpstat_remove_bp_location (th->control.stop_bpstat, bpt);
return 0;
@@ -13780,7 +13784,7 @@ delete_breakpoint (struct breakpoint *bpt)
static void
do_delete_breakpoint_cleanup (void *b)
{
- delete_breakpoint (b);
+ delete_breakpoint ((struct breakpoint *) b);
}
struct cleanup *
diff --git a/gdb/bsd-uthread.c b/gdb/bsd-uthread.c
index a5abb63..311eff7 100644
--- a/gdb/bsd-uthread.c
+++ b/gdb/bsd-uthread.c
@@ -68,7 +68,9 @@ bsd_uthread_set_supply_uthread (struct gdbarch *gdbarch,
void (*supply_uthread) (struct regcache *,
int, CORE_ADDR))
{
- struct bsd_uthread_ops *ops = gdbarch_data (gdbarch, bsd_uthread_data);
+ struct bsd_uthread_ops *ops =
+ (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
+
ops->supply_uthread = supply_uthread;
}
@@ -80,7 +82,9 @@ bsd_uthread_set_collect_uthread (struct gdbarch *gdbarch,
void (*collect_uthread) (const struct regcache *,
int, CORE_ADDR))
{
- struct bsd_uthread_ops *ops = gdbarch_data (gdbarch, bsd_uthread_data);
+ struct bsd_uthread_ops *ops =
+ (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
+
ops->collect_uthread = collect_uthread;
}
@@ -161,7 +165,8 @@ static int
bsd_uthread_activate (struct objfile *objfile)
{
struct gdbarch *gdbarch = target_gdbarch ();
- struct bsd_uthread_ops *ops = gdbarch_data (gdbarch, bsd_uthread_data);
+ struct bsd_uthread_ops *ops =
+ (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
/* Skip if the thread stratum has already been activated. */
if (bsd_uthread_active)
@@ -283,7 +288,8 @@ bsd_uthread_fetch_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- struct bsd_uthread_ops *uthread_ops = gdbarch_data (gdbarch, bsd_uthread_data);
+ struct bsd_uthread_ops *uthread_ops =
+ (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
CORE_ADDR addr = ptid_get_tid (inferior_ptid);
struct target_ops *beneath = find_target_beneath (ops);
CORE_ADDR active_addr;
@@ -310,7 +316,8 @@ bsd_uthread_store_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- struct bsd_uthread_ops *uthread_ops = gdbarch_data (gdbarch, bsd_uthread_data);
+ struct bsd_uthread_ops *uthread_ops =
+ (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
struct target_ops *beneath = find_target_beneath (ops);
CORE_ADDR addr = ptid_get_tid (inferior_ptid);
CORE_ADDR active_addr;
diff --git a/gdb/btrace.c b/gdb/btrace.c
index 4292dc7..164f3ad 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -1384,7 +1384,8 @@ check_xml_btrace_version (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC (gdb_xml_value_s) *attributes)
{
- const char *version = xml_find_attribute (attributes, "version")->value;
+ const char *version =
+ (const char *) xml_find_attribute (attributes, "version")->value;
if (strcmp (version, "1.0") != 0)
gdb_xml_error (parser, _("Unsupported btrace version: \"%s\""), version);
@@ -1401,7 +1402,7 @@ parse_xml_btrace_block (struct gdb_xml_parser *parser,
struct btrace_block *block;
ULONGEST *begin, *end;
- btrace = user_data;
+ btrace = (struct btrace_data *) user_data;
switch (btrace->format)
{
@@ -1417,8 +1418,8 @@ parse_xml_btrace_block (struct gdb_xml_parser *parser,
gdb_xml_error (parser, _("Btrace format error."));
}
- begin = xml_find_attribute (attributes, "begin")->value;
- end = xml_find_attribute (attributes, "end")->value;
+ begin = (long unsigned int *) xml_find_attribute (attributes, "begin")->value;
+ end = (long unsigned int *) xml_find_attribute (attributes, "end")->value;
block = VEC_safe_push (btrace_block_s, btrace->variant.bts.blocks, NULL);
block->begin = *begin;
@@ -1477,12 +1478,12 @@ parse_xml_btrace_pt_config_cpu (struct gdb_xml_parser *parser,
const char *vendor;
ULONGEST *family, *model, *stepping;
- vendor = xml_find_attribute (attributes, "vendor")->value;
- family = xml_find_attribute (attributes, "family")->value;
- model = xml_find_attribute (attributes, "model")->value;
- stepping = xml_find_attribute (attributes, "stepping")->value;
+ vendor = (const char *) xml_find_attribute (attributes, "vendor")->value;
+ family = (ULONGEST *) xml_find_attribute (attributes, "family")->value;
+ model = (ULONGEST *) xml_find_attribute (attributes, "model")->value;
+ stepping = (ULONGEST *) xml_find_attribute (attributes, "stepping")->value;
- btrace = user_data;
+ btrace = (struct btrace_data *) user_data;
if (strcmp (vendor, "GenuineIntel") == 0)
btrace->variant.pt.config.cpu.vendor = CV_INTEL;
@@ -1501,7 +1502,7 @@ parse_xml_btrace_pt_raw (struct gdb_xml_parser *parser,
{
struct btrace_data *btrace;
- btrace = user_data;
+ btrace = (struct btrace_data *) user_data;
parse_xml_raw (parser, body_text, &btrace->variant.pt.data,
&btrace->variant.pt.size);
}
@@ -1515,7 +1516,7 @@ parse_xml_btrace_pt (struct gdb_xml_parser *parser,
{
struct btrace_data *btrace;
- btrace = user_data;
+ btrace = (struct btrace_data *) user_data;
btrace->format = BTRACE_FORMAT_PT;
btrace->variant.pt.config.cpu.vendor = CV_UNKNOWN;
btrace->variant.pt.data = NULL;
@@ -1610,7 +1611,7 @@ parse_xml_btrace_conf_bts (struct gdb_xml_parser *parser,
struct btrace_config *conf;
struct gdb_xml_value *size;
- conf = user_data;
+ conf = (struct btrace_config *) user_data;
conf->format = BTRACE_FORMAT_BTS;
conf->bts.size = 0;
@@ -1629,7 +1630,7 @@ parse_xml_btrace_conf_pt (struct gdb_xml_parser *parser,
struct btrace_config *conf;
struct gdb_xml_value *size;
- conf = user_data;
+ conf = (struct btrace_config *) user_data;
conf->format = BTRACE_FORMAT_PT;
conf->pt.size = 0;
@@ -2250,7 +2251,7 @@ btrace_is_empty (struct thread_info *tp)
static void
do_btrace_data_cleanup (void *arg)
{
- btrace_data_fini (arg);
+ btrace_data_fini ((struct btrace_data *) arg);
}
/* See btrace.h. */
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index 708ace0..1af477c 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -50,7 +50,7 @@ static void c_type_print_modifier (struct type *,
static const char *
find_typedef_for_canonicalize (struct type *t, void *data)
{
- return find_typedef_in_hash (data, t);
+ return find_typedef_in_hash ((const struct type_print_options *) data, t);
}
/* Print NAME on STREAM. If the 'raw' field of FLAGS is not set,
diff --git a/gdb/charset.c b/gdb/charset.c
index afd9220..ee1ae20 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -468,7 +468,7 @@ host_hex_value (char c)
static void
cleanup_iconv (void *p)
{
- iconv_t *descp = p;
+ iconv_t *descp = (iconv_t *) p;
iconv_close (*descp);
}
@@ -617,7 +617,7 @@ make_wchar_iterator (const gdb_byte *input, size_t bytes,
static void
do_cleanup_iterator (void *p)
{
- struct wchar_iterator *iter = p;
+ struct wchar_iterator *iter = (struct wchar_iterator *) p;
iconv_close (iter->desc);
xfree (iter->out);
diff --git a/gdb/cli-out.c b/gdb/cli-out.c
index 2a83169..df26d3b 100644
--- a/gdb/cli-out.c
+++ b/gdb/cli-out.c
@@ -44,7 +44,7 @@ static void out_field_fmt (struct ui_out *uiout, int fldno,
static void
cli_uiout_dtor (struct ui_out *ui_out)
{
- cli_out_data *data = ui_out_data (ui_out);
+ cli_out_data *data = (cli_out_data *) ui_out_data (ui_out);
VEC_free (ui_filep, data->streams);
xfree (data);
@@ -59,7 +59,7 @@ cli_table_begin (struct ui_out *uiout, int nbrofcols,
int nr_rows,
const char *tblid)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (nr_rows == 0)
data->suppress_output = 1;
@@ -74,7 +74,7 @@ cli_table_begin (struct ui_out *uiout, int nbrofcols,
static void
cli_table_body (struct ui_out *uiout)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -87,7 +87,7 @@ cli_table_body (struct ui_out *uiout)
static void
cli_table_end (struct ui_out *uiout)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
data->suppress_output = 0;
}
@@ -99,7 +99,7 @@ cli_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
const char *col_name,
const char *colhdr)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -117,7 +117,7 @@ cli_begin (struct ui_out *uiout,
int level,
const char *id)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -130,7 +130,7 @@ cli_end (struct ui_out *uiout,
enum ui_out_type type,
int level)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -144,7 +144,7 @@ cli_field_int (struct ui_out *uiout, int fldno, int width,
const char *fldname, int value)
{
char buffer[20]; /* FIXME: how many chars long a %d can become? */
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -162,7 +162,7 @@ cli_field_skip (struct ui_out *uiout, int fldno, int width,
enum ui_align alignment,
const char *fldname)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -185,7 +185,7 @@ cli_field_string (struct ui_out *uiout,
{
int before = 0;
int after = 0;
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -233,7 +233,7 @@ cli_field_fmt (struct ui_out *uiout, int fldno,
const char *format,
va_list args)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
struct ui_file *stream;
if (data->suppress_output)
@@ -249,7 +249,7 @@ cli_field_fmt (struct ui_out *uiout, int fldno,
static void
cli_spaces (struct ui_out *uiout, int numspaces)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
struct ui_file *stream;
if (data->suppress_output)
@@ -262,7 +262,7 @@ cli_spaces (struct ui_out *uiout, int numspaces)
static void
cli_text (struct ui_out *uiout, const char *string)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
struct ui_file *stream;
if (data->suppress_output)
@@ -276,7 +276,7 @@ static void ATTRIBUTE_PRINTF (3, 0)
cli_message (struct ui_out *uiout, int verbosity,
const char *format, va_list args)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -292,7 +292,7 @@ cli_message (struct ui_out *uiout, int verbosity,
static void
cli_wrap_hint (struct ui_out *uiout, char *identstring)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -302,7 +302,7 @@ cli_wrap_hint (struct ui_out *uiout, char *identstring)
static void
cli_flush (struct ui_out *uiout)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
gdb_flush (stream);
@@ -315,7 +315,7 @@ cli_flush (struct ui_out *uiout)
static int
cli_redirect (struct ui_out *uiout, struct ui_file *outstream)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (outstream != NULL)
VEC_safe_push (ui_filep, data->streams, outstream);
@@ -336,7 +336,7 @@ out_field_fmt (struct ui_out *uiout, int fldno,
const char *fldname,
const char *format,...)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
va_list args;
@@ -351,7 +351,7 @@ out_field_fmt (struct ui_out *uiout, int fldno,
static void
field_separator (void)
{
- cli_out_data *data = ui_out_data (current_uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (current_uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
fputc_filtered (' ', stream);
@@ -409,7 +409,7 @@ cli_out_new (struct ui_file *stream)
struct ui_file *
cli_out_set_stream (struct ui_out *uiout, struct ui_file *stream)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
struct ui_file *old;
old = VEC_pop (ui_filep, data->streams);
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 424bf5e..6753c70 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -1554,8 +1554,8 @@ ambiguous_line_spec (struct symtabs_and_lines *sals)
static int
compare_symtabs (const void *a, const void *b)
{
- const struct symtab_and_line *sala = a;
- const struct symtab_and_line *salb = b;
+ const struct symtab_and_line *sala = (const struct symtab_and_line *) a;
+ const struct symtab_and_line *salb = (const struct symtab_and_line *) b;
const char *dira = SYMTAB_DIRNAME (sala->symtab);
const char *dirb = SYMTAB_DIRNAME (salb->symtab);
int r;
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index aabe3e3..931bb4a 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -392,7 +392,7 @@ struct dump_context
static void
call_dump_func (struct cmd_list_element *c, char *args, int from_tty)
{
- struct dump_context *d = get_cmd_context (c);
+ struct dump_context *d = (struct dump_context *) get_cmd_context (c);
d->func (args, d->mode);
}
@@ -447,7 +447,7 @@ struct callback_data {
static void
restore_section_callback (bfd *ibfd, asection *isec, void *args)
{
- struct callback_data *data = args;
+ struct callback_data *data = (struct callback_data *) args;
bfd_vma sec_start = bfd_section_vma (ibfd, isec);
bfd_size_type size = bfd_section_size (ibfd, isec);
bfd_vma sec_end = sec_start + size;
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 624a493..6a3c068 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -307,7 +307,7 @@ print_command_lines (struct ui_out *uiout, struct command_line *cmd,
static void
clear_hook_in_cleanup (void *data)
{
- struct cmd_list_element *c = data;
+ struct cmd_list_element *c = (struct cmd_list_element *) data;
c->hook_in = 0; /* Allow hook to work again once it is complete. */
}
@@ -341,7 +341,7 @@ execute_cmd_post_hook (struct cmd_list_element *c)
static void
do_restore_user_call_depth (void * call_depth)
{
- int *depth = call_depth;
+ int *depth = (int *) call_depth;
(*depth)--;
if ((*depth) == 0)
@@ -1390,7 +1390,7 @@ free_command_lines (struct command_line **lptr)
static void
do_free_command_lines_cleanup (void *arg)
{
- free_command_lines (arg);
+ free_command_lines ((struct command_line **) arg);
}
struct cleanup *
diff --git a/gdb/coff-pe-read.c b/gdb/coff-pe-read.c
index 2d780b9..a7e4f2b 100644
--- a/gdb/coff-pe-read.c
+++ b/gdb/coff-pe-read.c
@@ -125,7 +125,7 @@ struct pe_sections_info
static void
get_section_vmas (bfd *abfd, asection *sectp, void *context)
{
- struct pe_sections_info *data = context;
+ struct pe_sections_info *data = (struct pe_sections_info *) context;
struct read_pe_section_data *sections = data->sections;
int sectix = get_pe_section_index (sectp->name, sections,
data->nb_sections);
@@ -313,7 +313,7 @@ pe_get32 (bfd *abfd, int where)
static unsigned int
pe_as16 (void *ptr)
{
- unsigned char *b = ptr;
+ unsigned char *b = (unsigned char *) ptr;
return b[0] + (b[1] << 8);
}
@@ -321,7 +321,7 @@ pe_as16 (void *ptr)
static unsigned int
pe_as32 (void *ptr)
{
- unsigned char *b = ptr;
+ unsigned char *b = (unsigned char *) ptr;
return b[0] + (b[1] << 8) + (b[2] << 16) + (b[3] << 24);
}
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 44d1ec2..1b694fb 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -572,7 +572,8 @@ coff_symfile_read (struct objfile *objfile, int symfile_flags)
struct cleanup *back_to, *cleanup_minimal_symbols;
int stabstrsize;
- info = objfile_data (objfile, coff_objfile_data_key);
+ info =
+ (struct coff_symfile_info *) objfile_data (objfile, coff_objfile_data_key);
dbxinfo = DBX_SYMFILE_INFO (objfile);
symfile_bfd = abfd; /* Kludge for swap routines. */
diff --git a/gdb/common/agent.c b/gdb/common/agent.c
index 5bb18641..5c30729 100644
--- a/gdb/common/agent.c
+++ b/gdb/common/agent.c
@@ -93,9 +93,10 @@ agent_look_up_symbols (void *arg)
{
CORE_ADDR *addrp =
(CORE_ADDR *) ((char *) &ipa_sym_addrs + symbol_list[i].offset);
+ struct objfile *objfile = (struct objfile *) arg;
if (find_minimal_symbol_address (symbol_list[i].name, addrp,
- arg) != 0)
+ objfile) != 0)
{
DEBUG_AGENT ("symbol `%s' not found\n", symbol_list[i].name);
return -1;
diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c
index 4348527..798a411 100644
--- a/gdb/common/filestuff.c
+++ b/gdb/common/filestuff.c
@@ -410,7 +410,7 @@ gdb_pipe_cloexec (int filedes[2])
static void
do_close_cleanup (void *arg)
{
- int *fd = arg;
+ int *fd = (int *) arg;
close (*fd);
}
diff --git a/gdb/common/format.c b/gdb/common/format.c
index 52c6b81..65c1fb4 100644
--- a/gdb/common/format.c
+++ b/gdb/common/format.c
@@ -381,7 +381,7 @@ free_format_pieces (struct format_piece *pieces)
void
free_format_pieces_cleanup (void *ptr)
{
- void **location = ptr;
+ struct format_piece **location = (struct format_piece **) ptr;
if (location == NULL)
return;
diff --git a/gdb/common/vec.c b/gdb/common/vec.c
index ce7bc6e..6b7f25e 100644
--- a/gdb/common/vec.c
+++ b/gdb/common/vec.c
@@ -90,7 +90,7 @@ vec_p_reserve (void *vec, int reserve)
void *
vec_o_reserve (void *vec, int reserve, size_t vec_offset, size_t elt_size)
{
- struct vec_prefix *pfx = vec;
+ struct vec_prefix *pfx = (struct vec_prefix *) vec;
unsigned alloc = calculate_allocation (pfx, reserve);
if (!alloc)
diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c
index 39f06c6..07f0fbd 100644
--- a/gdb/compile/compile-c-support.c
+++ b/gdb/compile/compile-c-support.c
@@ -124,7 +124,7 @@ print_one_macro (const char *name, const struct macro_definition *macro,
struct macro_source_file *source, int line,
void *user_data)
{
- struct ui_file *file = user_data;
+ struct ui_file *file = (struct ui_file *) user_data;
/* Don't print command-line defines. They will be supplied another
way. */
diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c
index 355b063..f5ca15c 100644
--- a/gdb/compile/compile-c-symbols.c
+++ b/gdb/compile/compile-c-symbols.c
@@ -51,7 +51,7 @@ struct symbol_error
static hashval_t
hash_symbol_error (const void *a)
{
- const struct symbol_error *se = a;
+ const struct symbol_error *se = (const struct symbol_error *) a;
return htab_hash_pointer (se->sym);
}
@@ -61,8 +61,8 @@ hash_symbol_error (const void *a)
static int
eq_symbol_error (const void *a, const void *b)
{
- const struct symbol_error *sea = a;
- const struct symbol_error *seb = b;
+ const struct symbol_error *sea = (const struct symbol_error *) a;
+ const struct symbol_error *seb = (const struct symbol_error *) b;
return sea->sym == seb->sym;
}
@@ -72,7 +72,7 @@ eq_symbol_error (const void *a, const void *b)
static void
del_symbol_error (void *a)
{
- struct symbol_error *se = a;
+ struct symbol_error *se = (struct symbol_error *) a;
xfree (se->message);
xfree (se);
@@ -113,7 +113,7 @@ error_symbol_once (struct compile_c_instance *context,
return;
search.sym = sym;
- err = htab_find (context->symbol_err_map, &search);
+ err = (struct symbol_error *) htab_find (context->symbol_err_map, &search);
if (err == NULL || err->message == NULL)
return;
@@ -421,7 +421,7 @@ gcc_convert_symbol (void *datum,
enum gcc_c_oracle_request request,
const char *identifier)
{
- struct compile_c_instance *context = datum;
+ struct compile_c_instance *context = (struct compile_c_instance *) datum;
domain_enum domain;
int found = 0;
@@ -484,7 +484,7 @@ gcc_address
gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
const char *identifier)
{
- struct compile_c_instance *context = datum;
+ struct compile_c_instance *context = (struct compile_c_instance *) datum;
gcc_address result = 0;
int found = 0;
@@ -547,7 +547,7 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
static hashval_t
hash_symname (const void *a)
{
- const struct symbol *sym = a;
+ const struct symbol *sym = (const struct symbol *) a;
return htab_hash_string (SYMBOL_NATURAL_NAME (sym));
}
@@ -558,8 +558,8 @@ hash_symname (const void *a)
static int
eq_symname (const void *a, const void *b)
{
- const struct symbol *syma = a;
- const struct symbol *symb = b;
+ const struct symbol *syma = (const struct symbol *) a;
+ const struct symbol *symb = (const struct symbol *) b;
return strcmp (SYMBOL_NATURAL_NAME (syma), SYMBOL_NATURAL_NAME (symb)) == 0;
}
diff --git a/gdb/compile/compile-c-types.c b/gdb/compile/compile-c-types.c
index 77fbd68..60f9bd4 100644
--- a/gdb/compile/compile-c-types.c
+++ b/gdb/compile/compile-c-types.c
@@ -39,7 +39,7 @@ struct type_map_instance
static hashval_t
hash_type_map_instance (const void *p)
{
- const struct type_map_instance *inst = p;
+ const struct type_map_instance *inst = (const struct type_map_instance *) p;
return htab_hash_pointer (inst->type);
}
@@ -49,8 +49,8 @@ hash_type_map_instance (const void *p)
static int
eq_type_map_instance (const void *a, const void *b)
{
- const struct type_map_instance *insta = a;
- const struct type_map_instance *instb = b;
+ const struct type_map_instance *insta = (const struct type_map_instance *) a;
+ const struct type_map_instance *instb = (const struct type_map_instance *) b;
return insta->type == instb->type;
}
@@ -75,7 +75,7 @@ insert_type (struct compile_c_instance *context, struct type *type,
inst.gcc_type = gcc_type;
slot = htab_find_slot (context->type_map, &inst, INSERT);
- add = *slot;
+ add = (struct type_map_instance *) *slot;
/* The type might have already been inserted in order to handle
recursive types. */
if (add != NULL && add->gcc_type != gcc_type)
@@ -386,7 +386,7 @@ convert_type (struct compile_c_instance *context, struct type *type)
type = check_typedef (type);
inst.type = type;
- found = htab_find (context->type_map, &inst);
+ found = (struct type_map_instance *) htab_find (context->type_map, &inst);
if (found != NULL)
return found->gcc_type;
diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c
index ea1a19a..3f46bd7 100644
--- a/gdb/compile/compile-object-load.c
+++ b/gdb/compile/compile-object-load.c
@@ -79,7 +79,7 @@ munmap_list_free (struct munmap_list *head)
static void
munmap_listp_free_cleanup (void *headp_voidp)
{
- struct munmap_list **headp = headp_voidp;
+ struct munmap_list **headp = (struct munmap_list **) headp_voidp;
munmap_list_free (*headp);
}
@@ -111,7 +111,7 @@ struct setup_sections_data
static void
setup_sections (bfd *abfd, asection *sect, void *data_voidp)
{
- struct setup_sections_data *data = data_voidp;
+ struct setup_sections_data *data = (struct setup_sections_data *) data_voidp;
CORE_ADDR alignment;
unsigned prot;
@@ -336,7 +336,8 @@ struct link_hash_table_cleanup_data
static void
link_hash_table_free (void *d)
{
- struct link_hash_table_cleanup_data *data = d;
+ struct link_hash_table_cleanup_data *data =
+ (struct link_hash_table_cleanup_data *) d;
if (data->abfd->is_linker_output)
(*data->abfd->link.hash->hash_table_free) (data->abfd);
@@ -348,7 +349,7 @@ link_hash_table_free (void *d)
static void
copy_sections (bfd *abfd, asection *sect, void *data)
{
- asymbol **symbol_table = data;
+ asymbol **symbol_table = (asymbol **) data;
bfd_byte *sect_data, *sect_data_got;
struct cleanup *cleanups;
struct bfd_link_info link_info;
diff --git a/gdb/compile/compile-object-run.c b/gdb/compile/compile-object-run.c
index 6bc96b9..e5d2b643 100644
--- a/gdb/compile/compile-object-run.c
+++ b/gdb/compile/compile-object-run.c
@@ -61,7 +61,7 @@ static dummy_frame_dtor_ftype do_module_cleanup;
static void
do_module_cleanup (void *arg, int registers_valid)
{
- struct do_module_cleanup *data = arg;
+ struct do_module_cleanup *data = (struct do_module_cleanup *) arg;
struct objfile *objfile;
if (data->executedp != NULL)
diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
index 3d710ed..7560028 100644
--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -169,7 +169,7 @@ compile_code_command (char *arg, int from_tty)
void
compile_print_value (struct value *val, void *data_voidp)
{
- const struct format_data *fmtp = data_voidp;
+ const struct format_data *fmtp = (const struct format_data *) data_voidp;
print_value (val, fmtp);
}
@@ -214,7 +214,7 @@ compile_print_command (char *arg_param, int from_tty)
static void
do_rmdir (void *arg)
{
- const char *dir = arg;
+ const char *dir = (const char *) arg;
char *zap;
int wstat;
@@ -431,7 +431,7 @@ get_args (const struct compile_instance *compiler, struct gdbarch *gdbarch,
static void
cleanup_compile_instance (void *arg)
{
- struct compile_instance *inst = arg;
+ struct compile_instance *inst = (struct compile_instance *) arg;
inst->destroy (inst);
}
@@ -441,7 +441,7 @@ cleanup_compile_instance (void *arg)
static void
cleanup_unlink_file (void *arg)
{
- const char *filename = arg;
+ const char *filename = (const char *) arg;
unlink (filename);
}
diff --git a/gdb/completer.c b/gdb/completer.c
index f13289a..210a078 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -985,7 +985,7 @@ new_completion_tracker (void)
static void
free_completion_tracker (void *p)
{
- completion_tracker_t *tracker_ptr = p;
+ completion_tracker_t *tracker_ptr = (completion_tracker_t *) p;
htab_delete (*tracker_ptr);
*tracker_ptr = NULL;
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 5462e02..f7a8bb3 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -656,7 +656,7 @@ struct spuid_list
static void
add_to_spuid_list (bfd *abfd, asection *asect, void *list_p)
{
- struct spuid_list *list = list_p;
+ struct spuid_list *list = (struct spuid_list *) list_p;
enum bfd_endian byte_order
= bfd_big_endian (abfd) ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE;
int fd, pos = 0;
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index 9812daa..d4f2139 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -343,7 +343,7 @@ cp_lookup_symbol_in_namespace (const char *the_namespace, const char *name,
static void
reset_directive_searched (void *data)
{
- struct using_direct *direct = data;
+ struct using_direct *direct = (struct using_direct *) data;
direct->searched = 0;
}
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 0e3c948..a14455a 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -1339,7 +1339,7 @@ make_symbol_overload_list_adl (struct type **arg_types, int nargs,
static void
reset_directive_searched (void *data)
{
- struct using_direct *direct = data;
+ struct using_direct *direct = (struct using_direct *) data;
direct->searched = 0;
}
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 88a6441..73e4048 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -320,7 +320,7 @@ cris_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
int i;
if ((*this_cache))
- return (*this_cache);
+ return (struct cris_unwind_cache *) (*this_cache);
info = FRAME_OBSTACK_ZALLOC (struct cris_unwind_cache);
(*this_cache) = info;
@@ -704,7 +704,7 @@ cris_frame_unwind_cache (struct frame_info *this_frame,
struct cris_unwind_cache *info;
if ((*this_prologue_cache))
- return (*this_prologue_cache);
+ return (struct cris_unwind_cache *) (*this_prologue_cache);
info = FRAME_OBSTACK_ZALLOC (struct cris_unwind_cache);
(*this_prologue_cache) = info;
diff --git a/gdb/d-lang.c b/gdb/d-lang.c
index 2fc5080..0fbc2fa 100644
--- a/gdb/d-lang.c
+++ b/gdb/d-lang.c
@@ -322,7 +322,7 @@ static struct gdbarch_data *d_type_data;
const struct builtin_d_type *
builtin_d_type (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, d_type_data);
+ return (const struct builtin_d_type *) gdbarch_data (gdbarch, d_type_data);
}
/* Provide a prototype to silence -Wmissing-prototypes. */
diff --git a/gdb/d-namespace.c b/gdb/d-namespace.c
index e3f9a33..1f3ec3f 100644
--- a/gdb/d-namespace.c
+++ b/gdb/d-namespace.c
@@ -356,7 +356,7 @@ d_lookup_nested_symbol (struct type *parent_type,
static void
reset_directive_searched (void *data)
{
- struct using_direct *direct = data;
+ struct using_direct *direct = (struct using_direct *) data;
direct->searched = 0;
}
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index f7f6556..acd1c30 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -729,7 +729,7 @@ dbx_symfile_finish (struct objfile *objfile)
static void
dbx_free_symfile_info (struct objfile *objfile, void *arg)
{
- struct dbx_symfile_info *dbx = arg;
+ struct dbx_symfile_info *dbx = (struct dbx_symfile_info *) arg;
if (dbx->header_files != NULL)
{
@@ -942,7 +942,7 @@ free_bincl_list (struct objfile *objfile)
static void
do_free_bincl_list_cleanup (void *objfile)
{
- free_bincl_list (objfile);
+ free_bincl_list ((struct objfile *) objfile);
}
static struct cleanup *
diff --git a/gdb/disasm.c b/gdb/disasm.c
index 2b65c6a..6e3d6c1 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -59,7 +59,7 @@ struct dis_line_entry
static hashval_t
hash_dis_line_entry (const void *item)
{
- const struct dis_line_entry *dle = item;
+ const struct dis_line_entry *dle = (const struct dis_line_entry *) item;
return htab_hash_pointer (dle->symtab) + dle->line;
}
@@ -69,8 +69,8 @@ hash_dis_line_entry (const void *item)
static int
eq_dis_line_entry (const void *item_lhs, const void *item_rhs)
{
- const struct dis_line_entry *lhs = item_lhs;
- const struct dis_line_entry *rhs = item_rhs;
+ const struct dis_line_entry *lhs = (const struct dis_line_entry *) item_lhs;
+ const struct dis_line_entry *rhs = (const struct dis_line_entry *) item_rhs;
return (lhs->symtab == rhs->symtab
&& lhs->line == rhs->line);
@@ -139,9 +139,9 @@ dis_asm_memory_error (int status, bfd_vma memaddr,
static void
dis_asm_print_address (bfd_vma addr, struct disassemble_info *info)
{
- struct gdbarch *gdbarch = info->application_data;
+ struct gdbarch *gdbarch = (struct gdbarch *) info->application_data;
- print_address (gdbarch, addr, info->stream);
+ print_address (gdbarch, addr, (struct ui_file *) info->stream);
}
static int
@@ -713,7 +713,7 @@ fprintf_disasm (void *stream, const char *format, ...)
va_list args;
va_start (args, format);
- vfprintf_filtered (stream, format, args);
+ vfprintf_filtered ((struct ui_file *) stream, format, args);
va_end (args);
/* Something non -ve. */
return 0;
@@ -806,7 +806,7 @@ gdb_print_insn (struct gdbarch *gdbarch, CORE_ADDR memaddr,
static void
do_ui_file_delete (void *arg)
{
- ui_file_delete (arg);
+ ui_file_delete ((struct ui_file *) arg);
}
/* Return the length in bytes of the instruction at address MEMADDR in
diff --git a/gdb/doublest.c b/gdb/doublest.c
index e8e39af..0babb10 100644
--- a/gdb/doublest.c
+++ b/gdb/doublest.c
@@ -183,7 +183,7 @@ convert_floatformat_to_doublest (const struct floatformat *fmt,
/* For non-numbers, reuse libiberty's logic to find the correct
format. We do not lose any precision in this case by passing
through a double. */
- kind = floatformat_classify (fmt, from);
+ kind = floatformat_classify (fmt, (const bfd_byte *) from);
if (kind == float_infinite || kind == float_nan)
{
double dto;
diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c
index b6993a2..3734f6b 100644
--- a/gdb/dummy-frame.c
+++ b/gdb/dummy-frame.c
@@ -128,7 +128,7 @@ remove_dummy_frame (struct dummy_frame **dummy_ptr)
static int
pop_dummy_frame_bpt (struct breakpoint *b, void *dummy_voidp)
{
- struct dummy_frame *dummy = dummy_voidp;
+ struct dummy_frame *dummy = (struct dummy_frame *) dummy_voidp;
if (b->thread == pid_to_thread_id (dummy->id.ptid)
&& b->disposition == disp_del && frame_id_eq (b->frame_id, dummy->id.id))
@@ -337,7 +337,8 @@ dummy_frame_prev_register (struct frame_info *this_frame,
void **this_prologue_cache,
int regnum)
{
- struct dummy_frame_cache *cache = (*this_prologue_cache);
+ struct dummy_frame_cache *cache =
+ (struct dummy_frame_cache *) (*this_prologue_cache);
struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct value *reg_val;
@@ -367,7 +368,8 @@ dummy_frame_this_id (struct frame_info *this_frame,
struct frame_id *this_id)
{
/* The dummy-frame sniffer always fills in the cache. */
- struct dummy_frame_cache *cache = (*this_prologue_cache);
+ struct dummy_frame_cache *cache =
+ (struct dummy_frame_cache *) (*this_prologue_cache);
gdb_assert (cache != NULL);
(*this_id) = cache->this_id;
diff --git a/gdb/dwarf2-frame-tailcall.c b/gdb/dwarf2-frame-tailcall.c
index e4a8112..952bc14 100644
--- a/gdb/dwarf2-frame-tailcall.c
+++ b/gdb/dwarf2-frame-tailcall.c
@@ -68,7 +68,7 @@ struct tailcall_cache
static hashval_t
cache_hash (const void *arg)
{
- const struct tailcall_cache *cache = arg;
+ const struct tailcall_cache *cache = (const struct tailcall_cache *) arg;
return htab_hash_pointer (cache->next_bottom_frame);
}
@@ -78,8 +78,8 @@ cache_hash (const void *arg)
static int
cache_eq (const void *arg1, const void *arg2)
{
- const struct tailcall_cache *cache1 = arg1;
- const struct tailcall_cache *cache2 = arg2;
+ const struct tailcall_cache *cache1 = (const struct tailcall_cache *) arg1;
+ const struct tailcall_cache *cache2 = (const struct tailcall_cache *) arg2;
return cache1->next_bottom_frame == cache2->next_bottom_frame;
}
@@ -160,7 +160,7 @@ cache_find (struct frame_info *fi)
if (slot == NULL)
return NULL;
- cache = *slot;
+ cache = (struct tailcall_cache *) *slot;
gdb_assert (cache != NULL);
return cache;
}
@@ -209,7 +209,7 @@ static void
tailcall_frame_this_id (struct frame_info *this_frame, void **this_cache,
struct frame_id *this_id)
{
- struct tailcall_cache *cache = *this_cache;
+ struct tailcall_cache *cache = (struct tailcall_cache *) *this_cache;
struct frame_info *next_frame;
/* Tail call does not make sense for a sentinel frame. */
@@ -264,7 +264,7 @@ dwarf2_tailcall_prev_register_first (struct frame_info *this_frame,
void **tailcall_cachep, int regnum)
{
struct gdbarch *this_gdbarch = get_frame_arch (this_frame);
- struct tailcall_cache *cache = *tailcall_cachep;
+ struct tailcall_cache *cache = (struct tailcall_cache *) *tailcall_cachep;
CORE_ADDR addr;
if (regnum == gdbarch_pc_regnum (this_gdbarch))
@@ -293,7 +293,7 @@ static struct value *
tailcall_frame_prev_register (struct frame_info *this_frame,
void **this_cache, int regnum)
{
- struct tailcall_cache *cache = *this_cache;
+ struct tailcall_cache *cache = (struct tailcall_cache *) *this_cache;
struct value *val;
gdb_assert (this_frame != cache->next_bottom_frame);
@@ -430,7 +430,7 @@ dwarf2_tailcall_sniffer_first (struct frame_info *this_frame,
static void
tailcall_frame_dealloc_cache (struct frame_info *self, void *this_cache)
{
- struct tailcall_cache *cache = this_cache;
+ struct tailcall_cache *cache = (struct tailcall_cache *) this_cache;
cache_unref (cache);
}
@@ -442,7 +442,7 @@ static struct gdbarch *
tailcall_frame_prev_arch (struct frame_info *this_frame,
void **this_prologue_cache)
{
- struct tailcall_cache *cache = *this_prologue_cache;
+ struct tailcall_cache *cache = (struct tailcall_cache *) *this_prologue_cache;
return get_frame_arch (cache->next_bottom_frame);
}
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index e93a9a8..0adef31 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -275,7 +275,7 @@ dwarf2_frame_state_free_regs (struct dwarf2_frame_state_reg_info *rs)
static void
dwarf2_frame_state_free (void *p)
{
- struct dwarf2_frame_state *fs = p;
+ struct dwarf2_frame_state *fs = (struct dwarf2_frame_state *) p;
dwarf2_frame_state_free_regs (fs->initial.prev);
dwarf2_frame_state_free_regs (fs->regs.prev);
@@ -782,7 +782,8 @@ dwarf2_frame_set_init_reg (struct gdbarch *gdbarch,
struct dwarf2_frame_state_reg *,
struct frame_info *))
{
- struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+ struct dwarf2_frame_ops *ops =
+ (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
ops->init_reg = init_reg;
}
@@ -794,7 +795,8 @@ dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
struct dwarf2_frame_state_reg *reg,
struct frame_info *this_frame)
{
- struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+ struct dwarf2_frame_ops *ops =
+ (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
ops->init_reg (gdbarch, regnum, reg, this_frame);
}
@@ -807,7 +809,8 @@ dwarf2_frame_set_signal_frame_p (struct gdbarch *gdbarch,
int (*signal_frame_p) (struct gdbarch *,
struct frame_info *))
{
- struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+ struct dwarf2_frame_ops *ops =
+ (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
ops->signal_frame_p = signal_frame_p;
}
@@ -819,7 +822,8 @@ static int
dwarf2_frame_signal_frame_p (struct gdbarch *gdbarch,
struct frame_info *this_frame)
{
- struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+ struct dwarf2_frame_ops *ops =
+ (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
if (ops->signal_frame_p == NULL)
return 0;
@@ -834,7 +838,8 @@ dwarf2_frame_set_adjust_regnum (struct gdbarch *gdbarch,
int (*adjust_regnum) (struct gdbarch *,
int, int))
{
- struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+ struct dwarf2_frame_ops *ops =
+ (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
ops->adjust_regnum = adjust_regnum;
}
@@ -846,7 +851,8 @@ static int
dwarf2_frame_adjust_regnum (struct gdbarch *gdbarch,
int regnum, int eh_frame_p)
{
- struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+ struct dwarf2_frame_ops *ops =
+ (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
if (ops->adjust_regnum == NULL)
return regnum;
@@ -1010,7 +1016,7 @@ struct dwarf2_frame_cache
static void
clear_pointer_cleanup (void *arg)
{
- void **ptr = arg;
+ void **ptr = (void **) arg;
*ptr = NULL;
}
@@ -1029,7 +1035,7 @@ dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache)
const gdb_byte *instr;
if (*this_cache)
- return *this_cache;
+ return (struct dwarf2_frame_cache *) *this_cache;
/* Allocate a new cache. */
cache = FRAME_OBSTACK_ZALLOC (struct dwarf2_frame_cache);
@@ -1720,8 +1726,9 @@ find_cie (struct dwarf2_cie_table *cie_table, ULONGEST cie_pointer)
return NULL;
}
- p_cie = bsearch (&cie_pointer, cie_table->entries, cie_table->num_entries,
- sizeof (cie_table->entries[0]), bsearch_cie_cmp);
+ p_cie = ((struct dwarf2_cie **)
+ bsearch (&cie_pointer, cie_table->entries, cie_table->num_entries,
+ sizeof (cie_table->entries[0]), bsearch_cie_cmp));
if (p_cie != NULL)
return *p_cie;
return NULL;
@@ -1770,11 +1777,13 @@ dwarf2_frame_find_fde (CORE_ADDR *pc, CORE_ADDR *out_offset)
CORE_ADDR offset;
CORE_ADDR seek_pc;
- fde_table = objfile_data (objfile, dwarf2_frame_objfile_data);
+ fde_table = ((struct dwarf2_fde_table *)
+ objfile_data (objfile, dwarf2_frame_objfile_data));
if (fde_table == NULL)
{
dwarf2_build_frame_info (objfile);
- fde_table = objfile_data (objfile, dwarf2_frame_objfile_data);
+ fde_table = ((struct dwarf2_fde_table *)
+ objfile_data (objfile, dwarf2_frame_objfile_data));
}
gdb_assert (fde_table != NULL);
@@ -1789,8 +1798,9 @@ dwarf2_frame_find_fde (CORE_ADDR *pc, CORE_ADDR *out_offset)
continue;
seek_pc = *pc - offset;
- p_fde = bsearch (&seek_pc, fde_table->entries, fde_table->num_entries,
- sizeof (fde_table->entries[0]), bsearch_fde_cmp);
+ p_fde = ((struct dwarf2_fde **)
+ bsearch (&seek_pc, fde_table->entries, fde_table->num_entries,
+ sizeof (fde_table->entries[0]), bsearch_fde_cmp));
if (p_fde != NULL)
{
*pc = (*p_fde)->initial_location + offset;
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index cdb6b98..adbd59b 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -64,8 +64,9 @@ dwarf_gdbarch_types_init (struct gdbarch *gdbarch)
static struct type *
dwarf_expr_address_type (struct dwarf_expr_context *ctx)
{
- struct dwarf_gdbarch_types *types = gdbarch_data (ctx->gdbarch,
- dwarf_arch_cookie);
+ struct dwarf_gdbarch_types *types =
+ (struct dwarf_gdbarch_types *) gdbarch_data (ctx->gdbarch,
+ dwarf_arch_cookie);
int ndx;
if (ctx->addr_size == 2)
@@ -119,7 +120,7 @@ free_dwarf_expr_context (struct dwarf_expr_context *ctx)
static void
free_dwarf_expr_context_cleanup (void *arg)
{
- free_dwarf_expr_context (arg);
+ free_dwarf_expr_context ((struct dwarf_expr_context *) arg);
}
/* Return a cleanup that calls free_dwarf_expr_context. */
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index c2c0c59..19db498 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -375,7 +375,8 @@ static void
locexpr_find_frame_base_location (struct symbol *framefunc, CORE_ADDR pc,
const gdb_byte **start, size_t *length)
{
- struct dwarf2_locexpr_baton *symbaton = SYMBOL_LOCATION_BATON (framefunc);
+ struct dwarf2_locexpr_baton *symbaton =
+ (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (framefunc);
*length = symbaton->size;
*start = symbaton->data;
@@ -401,7 +402,7 @@ locexpr_get_frame_base (struct symbol *framefunc, struct frame_info *frame)
gdbarch = get_frame_arch (frame);
type = builtin_type (gdbarch)->builtin_data_ptr;
- dlbaton = SYMBOL_LOCATION_BATON (framefunc);
+ dlbaton = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (framefunc);
SYMBOL_BLOCK_OPS (framefunc)->find_frame_base_location
(framefunc, get_frame_pc (frame), &start, &length);
@@ -432,7 +433,8 @@ static void
loclist_find_frame_base_location (struct symbol *framefunc, CORE_ADDR pc,
const gdb_byte **start, size_t *length)
{
- struct dwarf2_loclist_baton *symbaton = SYMBOL_LOCATION_BATON (framefunc);
+ struct dwarf2_loclist_baton *symbaton =
+ (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (framefunc);
*start = dwarf2_find_location_expression (symbaton, length, pc);
}
@@ -457,7 +459,7 @@ loclist_get_frame_base (struct symbol *framefunc, struct frame_info *frame)
gdbarch = get_frame_arch (frame);
type = builtin_type (gdbarch)->builtin_data_ptr;
- dlbaton = SYMBOL_LOCATION_BATON (framefunc);
+ dlbaton = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (framefunc);
SYMBOL_BLOCK_OPS (framefunc)->find_frame_base_location
(framefunc, get_frame_pc (frame), &start, &length);
@@ -559,7 +561,7 @@ per_cu_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset,
static void
dwarf_expr_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset)
{
- struct dwarf_expr_baton *debaton = ctx->baton;
+ struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) ctx->baton;
per_cu_dwarf_call (ctx, die_offset, debaton->per_cu,
ctx->funcs->get_frame_pc, ctx->baton);
@@ -571,7 +573,7 @@ static struct type *
dwarf_expr_get_base_type (struct dwarf_expr_context *ctx,
cu_offset die_offset)
{
- struct dwarf_expr_baton *debaton = ctx->baton;
+ struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) ctx->baton;
return dwarf2_get_die_type (die_offset, debaton->per_cu);
}
@@ -1263,7 +1265,7 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
size_t size;
gdb_assert (ctx->funcs == &dwarf_expr_ctx_funcs);
- debaton = ctx->baton;
+ debaton = (struct dwarf_expr_baton *) ctx->baton;
frame = debaton->frame;
caller_frame = get_prev_frame (frame);
@@ -1315,7 +1317,7 @@ dwarf_expr_get_addr_index (void *baton, unsigned int index)
static CORE_ADDR
dwarf_expr_get_obj_addr (void *baton)
{
- struct dwarf_expr_baton *debaton = baton;
+ struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton;
gdb_assert (debaton != NULL);
@@ -1338,7 +1340,7 @@ entry_data_value_coerce_ref (const struct value *value)
if (TYPE_CODE (checked_type) != TYPE_CODE_REF)
return NULL;
- target_val = value_computed_closure (value);
+ target_val = (struct value *) value_computed_closure (value);
value_incref (target_val);
return target_val;
}
@@ -1348,7 +1350,7 @@ entry_data_value_coerce_ref (const struct value *value)
static void *
entry_data_value_copy_closure (const struct value *v)
{
- struct value *target_val = value_computed_closure (v);
+ struct value *target_val = (struct value *) value_computed_closure (v);
value_incref (target_val);
return target_val;
@@ -1359,7 +1361,7 @@ entry_data_value_copy_closure (const struct value *v)
static void
entry_data_value_free_closure (struct value *v)
{
- struct value *target_val = value_computed_closure (v);
+ struct value *target_val = (struct value *) value_computed_closure (v);
value_free (target_val);
}
@@ -2068,7 +2070,7 @@ check_pieced_synthetic_pointer (const struct value *value, int bit_offset,
static CORE_ADDR
get_frame_address_in_block_wrapper (void *baton)
{
- return get_frame_address_in_block (baton);
+ return get_frame_address_in_block ((struct frame_info *) baton);
}
/* An implementation of an lval_funcs method to indirect through a
@@ -2549,7 +2551,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
{
case PROP_LOCEXPR:
{
- const struct dwarf2_property_baton *baton = prop->data.baton;
+ const struct dwarf2_property_baton *baton =
+ (const struct dwarf2_property_baton *) prop->data.baton;
if (dwarf2_locexpr_baton_eval (&baton->locexpr, frame,
addr_stack ? addr_stack->addr : 0,
@@ -2568,7 +2571,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
case PROP_LOCLIST:
{
- struct dwarf2_property_baton *baton = prop->data.baton;
+ struct dwarf2_property_baton *baton =
+ (struct dwarf2_property_baton *) prop->data.baton;
CORE_ADDR pc = get_frame_address_in_block (frame);
const gdb_byte *data;
struct value *val;
@@ -2594,7 +2598,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
case PROP_ADDR_OFFSET:
{
- struct dwarf2_property_baton *baton = prop->data.baton;
+ struct dwarf2_property_baton *baton =
+ (struct dwarf2_property_baton *) prop->data.baton;
struct property_addr_info *pinfo;
struct value *val;
@@ -2629,7 +2634,8 @@ dwarf2_compile_property_to_c (struct ui_file *stream,
CORE_ADDR pc,
struct symbol *sym)
{
- struct dwarf2_property_baton *baton = prop->data.baton;
+ struct dwarf2_property_baton *baton =
+ (struct dwarf2_property_baton *) prop->data.baton;
const gdb_byte *data;
size_t size;
struct dwarf2_per_cu_data *per_cu;
@@ -2667,7 +2673,7 @@ struct needs_frame_baton
static CORE_ADDR
needs_frame_read_addr_from_reg (void *baton, int regnum)
{
- struct needs_frame_baton *nf_baton = baton;
+ struct needs_frame_baton *nf_baton = (struct needs_frame_baton *) baton;
nf_baton->needs_frame = 1;
return 1;
@@ -2679,7 +2685,7 @@ needs_frame_read_addr_from_reg (void *baton, int regnum)
static struct value *
needs_frame_get_reg_value (void *baton, struct type *type, int regnum)
{
- struct needs_frame_baton *nf_baton = baton;
+ struct needs_frame_baton *nf_baton = (struct needs_frame_baton *) baton;
nf_baton->needs_frame = 1;
return value_zero (type, not_lval);
@@ -2697,7 +2703,7 @@ static void
needs_frame_frame_base (void *baton, const gdb_byte **start, size_t * length)
{
static gdb_byte lit0 = DW_OP_lit0;
- struct needs_frame_baton *nf_baton = baton;
+ struct needs_frame_baton *nf_baton = (struct needs_frame_baton *) baton;
*start = &lit0;
*length = 1;
@@ -2710,7 +2716,7 @@ needs_frame_frame_base (void *baton, const gdb_byte **start, size_t * length)
static CORE_ADDR
needs_frame_frame_cfa (void *baton)
{
- struct needs_frame_baton *nf_baton = baton;
+ struct needs_frame_baton *nf_baton = (struct needs_frame_baton *) baton;
nf_baton->needs_frame = 1;
return 1;
@@ -2720,7 +2726,7 @@ needs_frame_frame_cfa (void *baton)
static CORE_ADDR
needs_frame_tls_address (void *baton, CORE_ADDR offset)
{
- struct needs_frame_baton *nf_baton = baton;
+ struct needs_frame_baton *nf_baton = (struct needs_frame_baton *) baton;
nf_baton->needs_frame = 1;
return 1;
@@ -2731,7 +2737,7 @@ needs_frame_tls_address (void *baton, CORE_ADDR offset)
static void
needs_frame_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset)
{
- struct needs_frame_baton *nf_baton = ctx->baton;
+ struct needs_frame_baton *nf_baton = (struct needs_frame_baton *) ctx->baton;
per_cu_dwarf_call (ctx, die_offset, nf_baton->per_cu,
ctx->funcs->get_frame_pc, ctx->baton);
@@ -2744,7 +2750,7 @@ needs_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
enum call_site_parameter_kind kind,
union call_site_parameter_u kind_u, int deref_size)
{
- struct needs_frame_baton *nf_baton = ctx->baton;
+ struct needs_frame_baton *nf_baton = (struct needs_frame_baton *) ctx->baton;
nf_baton->needs_frame = 1;
@@ -2911,7 +2917,7 @@ access_memory (struct gdbarch *arch, struct agent_expr *expr, ULONGEST nbits)
static CORE_ADDR
get_ax_pc (void *baton)
{
- struct agent_expr *expr = baton;
+ struct agent_expr *expr = (struct agent_expr *) baton;
return expr->scope;
}
@@ -3601,7 +3607,8 @@ dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc,
static struct value *
locexpr_read_variable (struct symbol *symbol, struct frame_info *frame)
{
- struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_locexpr_baton *dlbaton =
+ (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
struct value *val;
val = dwarf2_evaluate_loc_desc (SYMBOL_TYPE (symbol), frame, dlbaton->data,
@@ -3617,7 +3624,8 @@ locexpr_read_variable (struct symbol *symbol, struct frame_info *frame)
static struct value *
locexpr_read_variable_at_entry (struct symbol *symbol, struct frame_info *frame)
{
- struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_locexpr_baton *dlbaton =
+ (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
return value_of_dwarf_block_entry (SYMBOL_TYPE (symbol), frame, dlbaton->data,
dlbaton->size);
@@ -3627,7 +3635,8 @@ locexpr_read_variable_at_entry (struct symbol *symbol, struct frame_info *frame)
static int
locexpr_read_needs_frame (struct symbol *symbol)
{
- struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_locexpr_baton *dlbaton =
+ (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
return dwarf2_loc_desc_needs_frame (dlbaton->data, dlbaton->size,
dlbaton->per_cu);
@@ -4292,7 +4301,8 @@ static void
locexpr_describe_location (struct symbol *symbol, CORE_ADDR addr,
struct ui_file *stream)
{
- struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_locexpr_baton *dlbaton =
+ (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
struct objfile *objfile = dwarf2_per_cu_objfile (dlbaton->per_cu);
unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
int offset_size = dwarf2_per_cu_offset_size (dlbaton->per_cu);
@@ -4310,7 +4320,8 @@ static void
locexpr_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
struct agent_expr *ax, struct axs_value *value)
{
- struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_locexpr_baton *dlbaton =
+ (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
if (dlbaton->size == 0)
@@ -4329,7 +4340,8 @@ locexpr_generate_c_location (struct symbol *sym, struct ui_file *stream,
unsigned char *registers_used,
CORE_ADDR pc, const char *result_name)
{
- struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (sym);
+ struct dwarf2_locexpr_baton *dlbaton =
+ (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (sym);
unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
if (dlbaton->size == 0)
@@ -4362,7 +4374,8 @@ const struct symbol_computed_ops dwarf2_locexpr_funcs = {
static struct value *
loclist_read_variable (struct symbol *symbol, struct frame_info *frame)
{
- struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_loclist_baton *dlbaton =
+ (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol);
struct value *val;
const gdb_byte *data;
size_t size;
@@ -4386,7 +4399,8 @@ loclist_read_variable (struct symbol *symbol, struct frame_info *frame)
static struct value *
loclist_read_variable_at_entry (struct symbol *symbol, struct frame_info *frame)
{
- struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_loclist_baton *dlbaton =
+ (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol);
const gdb_byte *data;
size_t size;
CORE_ADDR pc;
@@ -4422,7 +4436,8 @@ static void
loclist_describe_location (struct symbol *symbol, CORE_ADDR addr,
struct ui_file *stream)
{
- struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_loclist_baton *dlbaton =
+ (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol);
const gdb_byte *loc_ptr, *buf_end;
struct objfile *objfile = dwarf2_per_cu_objfile (dlbaton->per_cu);
struct gdbarch *gdbarch = get_objfile_arch (objfile);
@@ -4511,7 +4526,8 @@ static void
loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
struct agent_expr *ax, struct axs_value *value)
{
- struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_loclist_baton *dlbaton =
+ (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol);
const gdb_byte *data;
size_t size;
unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
@@ -4532,7 +4548,8 @@ loclist_generate_c_location (struct symbol *sym, struct ui_file *stream,
unsigned char *registers_used,
CORE_ADDR pc, const char *result_name)
{
- struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (sym);
+ struct dwarf2_loclist_baton *dlbaton =
+ (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (sym);
unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
const gdb_byte *data;
size_t size;
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 1afad71..e743478 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1962,7 +1962,7 @@ line_header_hash (const struct line_header *ofs)
static hashval_t
line_header_hash_voidp (const void *item)
{
- const struct line_header *ofs = item;
+ const struct line_header *ofs = (const struct line_header *) item;
return line_header_hash (ofs);
}
@@ -1972,8 +1972,8 @@ line_header_hash_voidp (const void *item)
static int
line_header_eq_voidp (const void *item_lhs, const void *item_rhs)
{
- const struct line_header *ofs_lhs = item_lhs;
- const struct line_header *ofs_rhs = item_rhs;
+ const struct line_header *ofs_lhs = (const struct line_header *) item_lhs;
+ const struct line_header *ofs_rhs = (const struct line_header *) item_rhs;
return (ofs_lhs->offset.sect_off == ofs_rhs->offset.sect_off
&& ofs_lhs->offset_in_dwz == ofs_rhs->offset_in_dwz);
@@ -2043,7 +2043,8 @@ int
dwarf2_has_info (struct objfile *objfile,
const struct dwarf2_debug_sections *names)
{
- dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
+ dwarf2_per_objfile = ((struct dwarf2_per_objfile *)
+ objfile_data (objfile, dwarf2_objfile_data_key));
if (!dwarf2_per_objfile)
{
/* Initialize per-objfile state. */
@@ -2375,8 +2376,9 @@ dwarf2_get_section_info (struct objfile *objfile,
asection **sectp, const gdb_byte **bufp,
bfd_size_type *sizep)
{
- struct dwarf2_per_objfile *data
- = objfile_data (objfile, dwarf2_objfile_data_key);
+ struct dwarf2_per_objfile *data =
+ (struct dwarf2_per_objfile *) objfile_data (objfile,
+ dwarf2_objfile_data_key);
struct dwarf2_section_info *info;
/* We may see an objfile without any DWARF, in which case we just
@@ -2412,7 +2414,7 @@ dwarf2_get_section_info (struct objfile *objfile,
static void
locate_dwz_sections (bfd *abfd, asection *sectp, void *arg)
{
- struct dwz_file *dwz_file = arg;
+ struct dwz_file *dwz_file = (struct dwz_file *) arg;
/* Note that we only support the standard ELF names, because .dwz
is ELF-only (at the time of writing). */
@@ -2609,7 +2611,8 @@ eq_stmt_list_entry (const struct stmt_list_hash *lhs,
static hashval_t
hash_file_name_entry (const void *e)
{
- const struct quick_file_names *file_data = e;
+ const struct quick_file_names *file_data =
+ (const struct quick_file_names *) e;
return hash_stmt_list_entry (&file_data->hash);
}
@@ -2619,8 +2622,8 @@ hash_file_name_entry (const void *e)
static int
eq_file_name_entry (const void *a, const void *b)
{
- const struct quick_file_names *ea = a;
- const struct quick_file_names *eb = b;
+ const struct quick_file_names *ea = (const struct quick_file_names *) a;
+ const struct quick_file_names *eb = (const struct quick_file_names *) b;
return eq_stmt_list_entry (&ea->hash, &eb->hash);
}
@@ -2630,7 +2633,7 @@ eq_file_name_entry (const void *a, const void *b)
static void
delete_file_name_entry (void *e)
{
- struct quick_file_names *file_data = e;
+ struct quick_file_names *file_data = (struct quick_file_names *) e;
int i;
for (i = 0; i < file_data->num_file_names; ++i)
@@ -3245,7 +3248,8 @@ dwarf2_read_index (struct objfile *objfile)
static void
dw2_setup (struct objfile *objfile)
{
- dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
+ dwarf2_per_objfile = ((struct dwarf2_per_objfile *)
+ objfile_data (objfile, dwarf2_objfile_data_key));
gdb_assert (dwarf2_per_objfile);
}
@@ -3300,7 +3304,7 @@ dw2_get_file_names_reader (const struct die_reader_specs *reader,
&find_entry, INSERT);
if (*slot != NULL)
{
- lh_cu->v.quick->file_names = *slot;
+ lh_cu->v.quick->file_names = (struct quick_file_names *) *slot;
return;
}
@@ -4092,7 +4096,8 @@ dw2_find_pc_sect_compunit_symtab (struct objfile *objfile,
if (!objfile->psymtabs_addrmap)
return NULL;
- data = addrmap_find (objfile->psymtabs_addrmap, pc);
+ data = (struct dwarf2_per_cu_data *) addrmap_find (objfile->psymtabs_addrmap,
+ pc);
if (!data)
return NULL;
@@ -4550,7 +4555,8 @@ dwarf2_build_include_psymtabs (struct dwarf2_cu *cu,
static hashval_t
hash_signatured_type (const void *item)
{
- const struct signatured_type *sig_type = item;
+ const struct signatured_type *sig_type =
+ (const struct signatured_type *) item;
/* This drops the top 32 bits of the signature, but is ok for a hash. */
return sig_type->signature;
@@ -4559,8 +4565,8 @@ hash_signatured_type (const void *item)
static int
eq_signatured_type (const void *item_lhs, const void *item_rhs)
{
- const struct signatured_type *lhs = item_lhs;
- const struct signatured_type *rhs = item_rhs;
+ const struct signatured_type *lhs = (const struct signatured_type *) item_lhs;
+ const struct signatured_type *rhs = (const struct signatured_type *) item_rhs;
return lhs->signature == rhs->signature;
}
@@ -4584,8 +4590,8 @@ allocate_signatured_type_table (struct objfile *objfile)
static int
add_signatured_type_cu_to_table (void **slot, void *datum)
{
- struct signatured_type *sigt = *slot;
- struct signatured_type ***datap = datum;
+ struct signatured_type *sigt = (struct signatured_type *) *slot;
+ struct signatured_type ***datap = (struct signatured_type ***) datum;
**datap = sigt;
++*datap;
@@ -4723,13 +4729,15 @@ create_debug_types_hash_table (struct dwo_file *dwo_file,
if (dwo_file)
{
- const struct dwo_unit *dup_tu = *slot;
+ const struct dwo_unit *dup_tu =
+ (const struct dwo_unit *) *slot;
dup_offset = dup_tu->offset;
}
else
{
- const struct signatured_type *dup_tu = *slot;
+ const struct signatured_type *dup_tu =
+ (const struct signatured_type *) *slot;
dup_offset = dup_tu->per_cu.offset;
}
@@ -4908,7 +4916,7 @@ lookup_dwo_signatured_type (struct dwarf2_cu *cu, ULONGEST sig)
find_sig_entry.signature = sig;
slot = htab_find_slot (dwarf2_per_objfile->signatured_types,
&find_sig_entry, INSERT);
- sig_entry = *slot;
+ sig_entry = (struct signatured_type *) *slot;
/* We can get here with the TU already read, *or* in the process of being
read. Don't reassign the global entry to point to this DWO if that's
@@ -4930,7 +4938,7 @@ lookup_dwo_signatured_type (struct dwarf2_cu *cu, ULONGEST sig)
if (dwo_file->tus == NULL)
return NULL;
find_dwo_entry.signature = sig;
- dwo_entry = htab_find (dwo_file->tus, &find_dwo_entry);
+ dwo_entry = (struct dwo_unit *) htab_find (dwo_file->tus, &find_dwo_entry);
if (dwo_entry == NULL)
return NULL;
@@ -4971,7 +4979,7 @@ lookup_dwp_signatured_type (struct dwarf2_cu *cu, ULONGEST sig)
find_sig_entry.signature = sig;
slot = htab_find_slot (dwarf2_per_objfile->signatured_types,
&find_sig_entry, INSERT);
- sig_entry = *slot;
+ sig_entry = (struct signatured_type *) *slot;
/* Have we already tried to read this TU?
Note: sig_entry can be NULL if the skeleton TU was removed (thus it
@@ -5016,7 +5024,8 @@ lookup_signatured_type (struct dwarf2_cu *cu, ULONGEST sig)
if (dwarf2_per_objfile->signatured_types == NULL)
return NULL;
find_entry.signature = sig;
- entry = htab_find (dwarf2_per_objfile->signatured_types, &find_entry);
+ entry = ((struct signatured_type *)
+ htab_find (dwarf2_per_objfile->signatured_types, &find_entry));
return entry;
}
}
@@ -5741,7 +5750,8 @@ init_cutu_and_read_dies_simple (struct dwarf2_per_cu_data *this_cu,
static hashval_t
hash_type_unit_group (const void *item)
{
- const struct type_unit_group *tu_group = item;
+ const struct type_unit_group *tu_group =
+ (const struct type_unit_group *) item;
return hash_stmt_list_entry (&tu_group->hash);
}
@@ -5749,8 +5759,8 @@ hash_type_unit_group (const void *item)
static int
eq_type_unit_group (const void *item_lhs, const void *item_rhs)
{
- const struct type_unit_group *lhs = item_lhs;
- const struct type_unit_group *rhs = item_rhs;
+ const struct type_unit_group *lhs = (const struct type_unit_group *) item_lhs;
+ const struct type_unit_group *rhs = (const struct type_unit_group *) item_rhs;
return eq_stmt_list_entry (&lhs->hash, &rhs->hash);
}
@@ -5864,7 +5874,7 @@ get_type_unit_group (struct dwarf2_cu *cu, const struct attribute *stmt_list)
&type_unit_group_for_lookup, INSERT);
if (*slot != NULL)
{
- tu_group = *slot;
+ tu_group = (struct type_unit_group *) *slot;
gdb_assert (tu_group != NULL);
}
else
@@ -5940,7 +5950,8 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
struct partial_symtab *pst;
int has_pc_info;
const char *filename;
- struct process_psymtab_comp_unit_data *info = data;
+ struct process_psymtab_comp_unit_data *info =
+ (struct process_psymtab_comp_unit_data *) data;
if (comp_unit_die->tag == DW_TAG_partial_unit && !info->want_partial_unit)
return;
@@ -6139,8 +6150,10 @@ struct tu_abbrev_offset
static int
sort_tu_by_abbrev_offset (const void *ap, const void *bp)
{
- const struct tu_abbrev_offset * const *a = ap;
- const struct tu_abbrev_offset * const *b = bp;
+ const struct tu_abbrev_offset * const *a =
+ (const struct tu_abbrev_offset * const*) ap;
+ const struct tu_abbrev_offset * const *b =
+ (const struct tu_abbrev_offset * const*) bp;
unsigned int aoff = (*a)->abbrev_offset.sect_off;
unsigned int boff = (*b)->abbrev_offset.sect_off;
@@ -6329,7 +6342,7 @@ static int
process_skeletonless_type_unit (void **slot, void *info)
{
struct dwo_unit *dwo_unit = (struct dwo_unit *) *slot;
- struct objfile *objfile = info;
+ struct objfile *objfile = (struct objfile *) info;
struct signatured_type find_entry, *entry;
/* If this TU doesn't exist in the global table, add it and read it in. */
@@ -6399,7 +6412,7 @@ process_skeletonless_type_units (struct objfile *objfile)
static void
psymtabs_addrmap_cleanup (void *o)
{
- struct objfile *objfile = o;
+ struct objfile *objfile = (struct objfile *) o;
objfile->psymtabs_addrmap = NULL;
}
@@ -7408,7 +7421,9 @@ dwarf2_read_symtab (struct partial_symtab *self,
}
/* Restore our global data. */
- dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
+ dwarf2_per_objfile =
+ (struct dwarf2_per_objfile *) objfile_data (objfile,
+ dwarf2_objfile_data_key);
/* If this psymtab is constructed from a debug-only objfile, the
has_section_at_zero flag will not necessarily be correct. We
@@ -7416,9 +7431,10 @@ dwarf2_read_symtab (struct partial_symtab *self,
associated with the (presumably stripped) associated objfile. */
if (objfile->separate_debug_objfile_backlink)
{
- struct dwarf2_per_objfile *dpo_backlink
- = objfile_data (objfile->separate_debug_objfile_backlink,
- dwarf2_objfile_data_key);
+ struct dwarf2_per_objfile *dpo_backlink =
+ ((struct dwarf2_per_objfile *)
+ objfile_data (objfile->separate_debug_objfile_backlink,
+ dwarf2_objfile_data_key));
dwarf2_per_objfile->has_section_at_zero
= dpo_backlink->has_section_at_zero;
@@ -7638,7 +7654,7 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
psymtab_to_symtab_1 (pst->dependencies[i]);
}
- per_cu = pst->read_symtab_private;
+ per_cu = (struct dwarf2_per_cu_data *) pst->read_symtab_private;
if (per_cu == NULL)
{
@@ -7657,7 +7673,7 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
static hashval_t
die_hash (const void *item)
{
- const struct die_info *die = item;
+ const struct die_info *die = (const struct die_info *) item;
return die->offset.sect_off;
}
@@ -7668,8 +7684,8 @@ die_hash (const void *item)
static int
die_eq (const void *item_lhs, const void *item_rhs)
{
- const struct die_info *die_lhs = item_lhs;
- const struct die_info *die_rhs = item_rhs;
+ const struct die_info *die_lhs = (const struct die_info *) item_lhs;
+ const struct die_info *die_rhs = (const struct die_info *) item_rhs;
return die_lhs->offset.sect_off == die_rhs->offset.sect_off;
}
@@ -7686,7 +7702,7 @@ load_full_comp_unit_reader (const struct die_reader_specs *reader,
void *data)
{
struct dwarf2_cu *cu = reader->cu;
- enum language *language_ptr = data;
+ enum language *language_ptr = (enum language *) data;
gdb_assert (cu->die_hash == NULL);
cu->die_hash =
@@ -8219,7 +8235,7 @@ process_imported_unit_die (struct die_info *die, struct dwarf2_cu *cu)
static void
reset_die_in_process (void *arg)
{
- struct die_info *die = arg;
+ struct die_info *die = (struct die_info *) arg;
die->in_process = 0;
}
@@ -9017,7 +9033,7 @@ read_import_statement (struct die_info *die, struct dwarf2_cu *cu)
static void
free_cu_line_header (void *arg)
{
- struct dwarf2_cu *cu = arg;
+ struct dwarf2_cu *cu = (struct dwarf2_cu *) arg;
free_line_header (cu->line_header);
cu->line_header = NULL;
@@ -9128,7 +9144,7 @@ handle_DW_AT_stmt_list (struct die_info *die, struct dwarf2_cu *cu,
if (die->tag == DW_TAG_partial_unit && slot != NULL)
{
gdb_assert (*slot != NULL);
- cu->line_header = *slot;
+ cu->line_header = (struct line_header *) *slot;
return;
}
}
@@ -9402,7 +9418,7 @@ read_type_unit_scope (struct die_info *die, struct dwarf2_cu *cu)
static hashval_t
hash_dwo_file (const void *item)
{
- const struct dwo_file *dwo_file = item;
+ const struct dwo_file *dwo_file = (const struct dwo_file *) item;
hashval_t hash;
hash = htab_hash_string (dwo_file->dwo_name);
@@ -9414,8 +9430,8 @@ hash_dwo_file (const void *item)
static int
eq_dwo_file (const void *item_lhs, const void *item_rhs)
{
- const struct dwo_file *lhs = item_lhs;
- const struct dwo_file *rhs = item_rhs;
+ const struct dwo_file *lhs = (const struct dwo_file *) item_lhs;
+ const struct dwo_file *rhs = (const struct dwo_file *) item_rhs;
if (strcmp (lhs->dwo_name, rhs->dwo_name) != 0)
return 0;
@@ -9462,7 +9478,7 @@ lookup_dwo_file_slot (const char *dwo_name, const char *comp_dir)
static hashval_t
hash_dwo_unit (const void *item)
{
- const struct dwo_unit *dwo_unit = item;
+ const struct dwo_unit *dwo_unit = (const struct dwo_unit *) item;
/* This drops the top 32 bits of the id, but is ok for a hash. */
return dwo_unit->signature;
@@ -9471,8 +9487,8 @@ hash_dwo_unit (const void *item)
static int
eq_dwo_unit (const void *item_lhs, const void *item_rhs)
{
- const struct dwo_unit *lhs = item_lhs;
- const struct dwo_unit *rhs = item_rhs;
+ const struct dwo_unit *lhs = (const struct dwo_unit *) item_lhs;
+ const struct dwo_unit *rhs = (const struct dwo_unit *) item_rhs;
/* The signature is assumed to be unique within the DWO file.
So while object file CU dwo_id's always have the value zero,
@@ -9519,7 +9535,7 @@ create_dwo_cu_reader (const struct die_reader_specs *reader,
struct objfile *objfile = dwarf2_per_objfile->objfile;
sect_offset offset = cu->per_cu->offset;
struct dwarf2_section_info *section = cu->per_cu->section;
- struct create_dwo_cu_data *data = datap;
+ struct create_dwo_cu_data *data = (struct create_dwo_cu_data *) datap;
struct dwo_file *dwo_file = data->dwo_file;
struct dwo_unit *dwo_unit = &data->dwo_unit;
struct attribute *attr;
@@ -10136,7 +10152,7 @@ create_dwo_unit_in_dwp_v1 (struct dwp_file *dwp_file,
fprintf_unfiltered (gdb_stdlog, "Using existing virtual DWO: %s\n",
virtual_dwo_name);
}
- dwo_file = *dwo_file_slot;
+ dwo_file = (struct dwo_file *) *dwo_file_slot;
}
do_cleanups (cleanups);
@@ -10351,7 +10367,7 @@ create_dwo_unit_in_dwp_v2 (struct dwp_file *dwp_file,
fprintf_unfiltered (gdb_stdlog, "Using existing virtual DWO: %s\n",
virtual_dwo_name);
}
- dwo_file = *dwo_file_slot;
+ dwo_file = (struct dwo_file *) *dwo_file_slot;
}
do_cleanups (cleanups);
@@ -10395,7 +10411,7 @@ lookup_dwo_unit_in_dwp (struct dwp_file *dwp_file, const char *comp_dir,
&find_dwo_cu, INSERT);
if (*slot != NULL)
- return *slot;
+ return (struct dwo_unit *) *slot;
/* Use a for loop so that we don't loop forever on bad debug info. */
for (i = 0; i < dwp_htab->nr_slots; ++i)
@@ -10422,7 +10438,7 @@ lookup_dwo_unit_in_dwp (struct dwp_file *dwp_file, const char *comp_dir,
comp_dir, signature,
is_debug_types);
}
- return *slot;
+ return (struct dwo_unit *) *slot;
}
if (signature_in_table == 0)
return NULL;
@@ -10543,7 +10559,7 @@ open_dwo_file (const char *file_name, const char *comp_dir)
static void
dwarf2_locate_dwo_sections (bfd *abfd, asection *sectp, void *dwo_sections_ptr)
{
- struct dwo_sections *dwo_sections = dwo_sections_ptr;
+ struct dwo_sections *dwo_sections = (struct dwo_sections *) dwo_sections_ptr;
const struct dwop_section_names *names = &dwop_section_names;
if (section_is_p (sectp->name, &names->abbrev_dwo))
@@ -10648,7 +10664,7 @@ static void
dwarf2_locate_common_dwp_sections (bfd *abfd, asection *sectp,
void *dwp_file_ptr)
{
- struct dwp_file *dwp_file = dwp_file_ptr;
+ struct dwp_file *dwp_file = (struct dwp_file *) dwp_file_ptr;
const struct dwop_section_names *names = &dwop_section_names;
unsigned int elf_section_nr = elf_section_data (sectp)->this_idx;
@@ -10683,7 +10699,7 @@ dwarf2_locate_common_dwp_sections (bfd *abfd, asection *sectp,
static void
dwarf2_locate_v2_dwp_sections (bfd *abfd, asection *sectp, void *dwp_file_ptr)
{
- struct dwp_file *dwp_file = dwp_file_ptr;
+ struct dwp_file *dwp_file = (struct dwp_file *) dwp_file_ptr;
const struct dwop_section_names *names = &dwop_section_names;
unsigned int elf_section_nr = elf_section_data (sectp)->this_idx;
@@ -10740,7 +10756,7 @@ dwarf2_locate_v2_dwp_sections (bfd *abfd, asection *sectp, void *dwp_file_ptr)
static hashval_t
hash_dwp_loaded_cutus (const void *item)
{
- const struct dwo_unit *dwo_unit = item;
+ const struct dwo_unit *dwo_unit = (const struct dwo_unit *) item;
/* This drops the top 32 bits of the signature, but is ok for a hash. */
return dwo_unit->signature;
@@ -10751,8 +10767,8 @@ hash_dwp_loaded_cutus (const void *item)
static int
eq_dwp_loaded_cutus (const void *a, const void *b)
{
- const struct dwo_unit *dua = a;
- const struct dwo_unit *dub = b;
+ const struct dwo_unit *dua = (const struct dwo_unit *) a;
+ const struct dwo_unit *dub = (const struct dwo_unit *) b;
return dua->signature == dub->signature;
}
@@ -10970,7 +10986,7 @@ lookup_dwo_cutu (struct dwarf2_per_cu_data *this_unit,
*dwo_file_slot = open_and_init_dwo_file (this_unit, dwo_name, comp_dir);
}
/* NOTE: This will be NULL if unable to open the file. */
- dwo_file = *dwo_file_slot;
+ dwo_file = (struct dwo_file *) *dwo_file_slot;
if (dwo_file != NULL)
{
@@ -10982,7 +10998,8 @@ lookup_dwo_cutu (struct dwarf2_per_cu_data *this_unit,
memset (&find_dwo_cutu, 0, sizeof (find_dwo_cutu));
find_dwo_cutu.signature = signature;
- dwo_cutu = htab_find (dwo_file->tus, &find_dwo_cutu);
+ dwo_cutu =
+ (struct dwo_unit *) htab_find (dwo_file->tus, &find_dwo_cutu);
}
else if (!is_debug_types && dwo_file->cu)
{
@@ -15424,7 +15441,7 @@ abbrev_table_free (struct abbrev_table *abbrev_table)
static void
abbrev_table_free_cleanup (void *table_ptr)
{
- struct abbrev_table **abbrev_table_ptr = table_ptr;
+ struct abbrev_table **abbrev_table_ptr = (struct abbrev_table **) table_ptr;
if (*abbrev_table_ptr != NULL)
abbrev_table_free (*abbrev_table_ptr);
@@ -15446,7 +15463,7 @@ dwarf2_read_abbrevs (struct dwarf2_cu *cu,
static void
dwarf2_free_abbrev_table (void *ptr_to_cu)
{
- struct dwarf2_cu *cu = ptr_to_cu;
+ struct dwarf2_cu *cu = (struct dwarf2_cu *) ptr_to_cu;
if (cu->abbrev_table != NULL)
abbrev_table_free (cu->abbrev_table);
@@ -15988,8 +16005,9 @@ find_partial_die_in_comp_unit (sect_offset offset, struct dwarf2_cu *cu)
struct partial_die_info part_die;
part_die.offset = offset;
- lookup_die = htab_find_with_hash (cu->partial_dies, &part_die,
- offset.sect_off);
+ lookup_die = ((struct partial_die_info *)
+ htab_find_with_hash (cu->partial_dies, &part_die,
+ offset.sect_off));
return lookup_die;
}
@@ -17187,7 +17205,7 @@ free_line_header (struct line_header *lh)
static void
free_line_header_voidp (void *arg)
{
- struct line_header *lh = arg;
+ struct line_header *lh = (struct line_header *) arg;
free_line_header (lh);
}
@@ -20005,7 +20023,8 @@ follow_die_offset (sect_offset offset, int offset_in_dwz,
*ref_cu = target_cu;
temp_die.offset = offset;
- return htab_find_with_hash (target_cu->die_hash, &temp_die, offset.sect_off);
+ return (struct die_info *) htab_find_with_hash (target_cu->die_hash,
+ &temp_die, offset.sect_off);
}
/* Follow reference attribute ATTR of SRC_DIE.
@@ -20311,8 +20330,8 @@ follow_die_sig_1 (struct die_info *src_die, struct signatured_type *sig_type,
gdb_assert (sig_cu != NULL);
gdb_assert (sig_type->type_offset_in_section.sect_off != 0);
temp_die.offset = sig_type->type_offset_in_section;
- die = htab_find_with_hash (sig_cu->die_hash, &temp_die,
- temp_die.offset.sect_off);
+ die = (struct die_info *) htab_find_with_hash (sig_cu->die_hash, &temp_die,
+ temp_die.offset.sect_off);
if (die)
{
/* For .gdb_index version 7 keep track of included TUs.
@@ -22102,7 +22121,7 @@ prepare_one_comp_unit (struct dwarf2_cu *cu, struct die_info *comp_unit_die,
static void
free_heap_comp_unit (void *data)
{
- struct dwarf2_cu *cu = data;
+ struct dwarf2_cu *cu = (struct dwarf2_cu *) data;
gdb_assert (cu->per_cu != NULL);
cu->per_cu->cu = NULL;
@@ -22120,7 +22139,7 @@ free_heap_comp_unit (void *data)
static void
free_stack_comp_unit (void *data)
{
- struct dwarf2_cu *cu = data;
+ struct dwarf2_cu *cu = (struct dwarf2_cu *) data;
gdb_assert (cu->per_cu != NULL);
cu->per_cu->cu = NULL;
@@ -22224,7 +22243,9 @@ free_one_cached_comp_unit (struct dwarf2_per_cu_data *target_per_cu)
void
dwarf2_free_objfile (struct objfile *objfile)
{
- dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
+ dwarf2_per_objfile =
+ (struct dwarf2_per_objfile *) objfile_data (objfile,
+ dwarf2_objfile_data_key);
if (dwarf2_per_objfile == NULL)
return;
@@ -22267,7 +22288,8 @@ struct dwarf2_per_cu_offset_and_type
static hashval_t
per_cu_offset_and_type_hash (const void *item)
{
- const struct dwarf2_per_cu_offset_and_type *ofs = item;
+ const struct dwarf2_per_cu_offset_and_type *ofs =
+ (const struct dwarf2_per_cu_offset_and_type *) item;
return (uintptr_t) ofs->per_cu + ofs->offset.sect_off;
}
@@ -22277,8 +22299,10 @@ per_cu_offset_and_type_hash (const void *item)
static int
per_cu_offset_and_type_eq (const void *item_lhs, const void *item_rhs)
{
- const struct dwarf2_per_cu_offset_and_type *ofs_lhs = item_lhs;
- const struct dwarf2_per_cu_offset_and_type *ofs_rhs = item_rhs;
+ const struct dwarf2_per_cu_offset_and_type *ofs_lhs =
+ (const struct dwarf2_per_cu_offset_and_type *) item_lhs;
+ const struct dwarf2_per_cu_offset_and_type *ofs_rhs =
+ (const struct dwarf2_per_cu_offset_and_type *) item_rhs;
return (ofs_lhs->per_cu == ofs_rhs->per_cu
&& ofs_lhs->offset.sect_off == ofs_rhs->offset.sect_off);
@@ -22372,7 +22396,8 @@ get_die_type_at_offset (sect_offset offset,
ofs.per_cu = per_cu;
ofs.offset = offset;
- slot = htab_find (dwarf2_per_objfile->die_type_hash, &ofs);
+ slot = ((struct dwarf2_per_cu_offset_and_type *)
+ htab_find (dwarf2_per_objfile->die_type_hash, &ofs));
if (slot)
return slot->type;
else
@@ -22464,7 +22489,8 @@ dwarf2_clear_marks (struct dwarf2_per_cu_data *per_cu)
static hashval_t
partial_die_hash (const void *item)
{
- const struct partial_die_info *part_die = item;
+ const struct partial_die_info *part_die =
+ (const struct partial_die_info *) item;
return part_die->offset.sect_off;
}
@@ -22475,8 +22501,10 @@ partial_die_hash (const void *item)
static int
partial_die_eq (const void *item_lhs, const void *item_rhs)
{
- const struct partial_die_info *part_die_lhs = item_lhs;
- const struct partial_die_info *part_die_rhs = item_rhs;
+ const struct partial_die_info *part_die_lhs =
+ (const struct partial_die_info *) item_lhs;
+ const struct partial_die_info *part_die_rhs =
+ (const struct partial_die_info *) item_rhs;
return part_die_lhs->offset.sect_off == part_die_rhs->offset.sect_off;
}
@@ -22502,7 +22530,7 @@ show_dwarf_cmd (char *args, int from_tty)
static void
dwarf2_per_objfile_free (struct objfile *objfile, void *d)
{
- struct dwarf2_per_objfile *data = d;
+ struct dwarf2_per_objfile *data = (struct dwarf2_per_objfile *) d;
int ix;
/* Make sure we don't accidentally use dwarf2_per_objfile while
@@ -22547,7 +22575,7 @@ struct strtab_entry
static hashval_t
hash_strtab_entry (const void *e)
{
- const struct strtab_entry *entry = e;
+ const struct strtab_entry *entry = (const struct strtab_entry *) e;
return mapped_index_string_hash (INT_MAX, entry->str);
}
@@ -22556,8 +22584,8 @@ hash_strtab_entry (const void *e)
static int
eq_strtab_entry (const void *a, const void *b)
{
- const struct strtab_entry *ea = a;
- const struct strtab_entry *eb = b;
+ const struct strtab_entry *ea = (const struct strtab_entry *) a;
+ const struct strtab_entry *eb = (const struct strtab_entry *) b;
return !strcmp (ea->str, eb->str);
}
@@ -22583,7 +22611,7 @@ add_string (htab_t table, struct obstack *cpool, const char *str)
entry.str = str;
slot = htab_find_slot (table, &entry, INSERT);
if (*slot)
- result = *slot;
+ result = (struct strtab_entry *) *slot;
else
{
result = XNEW (struct strtab_entry);
@@ -22620,7 +22648,8 @@ struct mapped_symtab
static hashval_t
hash_symtab_entry (const void *e)
{
- const struct symtab_index_entry *entry = e;
+ const struct symtab_index_entry *entry =
+ (const struct symtab_index_entry *) e;
return iterative_hash (VEC_address (offset_type, entry->cu_indices),
sizeof (offset_type) * VEC_length (offset_type,
entry->cu_indices),
@@ -22632,8 +22661,8 @@ hash_symtab_entry (const void *e)
static int
eq_symtab_entry (const void *a, const void *b)
{
- const struct symtab_index_entry *ea = a;
- const struct symtab_index_entry *eb = b;
+ const struct symtab_index_entry *ea = (const struct symtab_index_entry *) a;
+ const struct symtab_index_entry *eb = (const struct symtab_index_entry *) b;
int len = VEC_length (offset_type, ea->cu_indices);
if (len != VEC_length (offset_type, eb->cu_indices))
return 0;
@@ -22647,7 +22676,7 @@ eq_symtab_entry (const void *a, const void *b)
static void
delete_symtab_entry (void *p)
{
- struct symtab_index_entry *entry = p;
+ struct symtab_index_entry *entry = (struct symtab_index_entry *) p;
VEC_free (offset_type, entry->cu_indices);
xfree (entry);
}
@@ -22678,7 +22707,7 @@ create_mapped_symtab (void)
static void
cleanup_mapped_symtab (void *p)
{
- struct mapped_symtab *symtab = p;
+ struct mapped_symtab *symtab = (struct mapped_symtab *) p;
/* The contents of the array are freed when the other hash table is
destroyed. */
xfree (symtab->data);
@@ -22855,7 +22884,8 @@ add_indices_to_cpool (htab_t symbol_hash_table, struct obstack *cpool,
}
else
{
- struct symtab_index_entry *old_entry = *slot;
+ struct symtab_index_entry *old_entry =
+ (struct symtab_index_entry *) *slot;
entry->index_offset = old_entry->index_offset;
entry = old_entry;
}
@@ -22923,7 +22953,8 @@ struct psymtab_cu_index_map
static hashval_t
hash_psymtab_cu_index (const void *item)
{
- const struct psymtab_cu_index_map *map = item;
+ const struct psymtab_cu_index_map *map =
+ (const struct psymtab_cu_index_map *) item;
return htab_hash_pointer (map->psymtab);
}
@@ -22931,8 +22962,10 @@ hash_psymtab_cu_index (const void *item)
static int
eq_psymtab_cu_index (const void *item_lhs, const void *item_rhs)
{
- const struct psymtab_cu_index_map *lhs = item_lhs;
- const struct psymtab_cu_index_map *rhs = item_rhs;
+ const struct psymtab_cu_index_map *lhs =
+ (const struct psymtab_cu_index_map *) item_lhs;
+ const struct psymtab_cu_index_map *rhs =
+ (const struct psymtab_cu_index_map *) item_rhs;
return lhs->psymtab == rhs->psymtab;
}
@@ -22979,8 +23012,8 @@ add_address_entry (struct objfile *objfile, struct obstack *obstack,
static int
add_address_entry_worker (void *datap, CORE_ADDR start_addr, void *obj)
{
- struct addrmap_index_data *data = datap;
- struct partial_symtab *pst = obj;
+ struct addrmap_index_data *data = (struct addrmap_index_data *) datap;
+ struct partial_symtab *pst = (struct partial_symtab *) obj;
if (data->previous_valid)
add_address_entry (data->objfile, data->addr_obstack,
@@ -22992,7 +23025,8 @@ add_address_entry_worker (void *datap, CORE_ADDR start_addr, void *obj)
{
struct psymtab_cu_index_map find_map, *map;
find_map.psymtab = pst;
- map = htab_find (data->cu_index_htab, &find_map);
+ map = ((struct psymtab_cu_index_map *)
+ htab_find (data->cu_index_htab, &find_map));
gdb_assert (map != NULL);
data->previous_cu_index = map->cu_index;
data->previous_valid = 1;
@@ -23122,7 +23156,7 @@ write_obstack (FILE *file, struct obstack *obstack)
static void
unlink_if_set (void *p)
{
- char **filename = p;
+ char **filename = (char **) p;
if (*filename)
unlink (*filename);
}
@@ -23143,7 +23177,8 @@ struct signatured_type_index_data
static int
write_one_signatured_type (void **slot, void *d)
{
- struct signatured_type_index_data *info = d;
+ struct signatured_type_index_data *info =
+ (struct signatured_type_index_data *) d;
struct signatured_type *entry = (struct signatured_type *) *slot;
struct partial_symtab *psymtab = entry->per_cu.v.psymtab;
gdb_byte val[8];
@@ -23410,7 +23445,9 @@ save_gdb_index_command (char *arg, int from_tty)
if (stat (objfile_name (objfile), &st) < 0)
continue;
- dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
+ dwarf2_per_objfile =
+ (struct dwarf2_per_objfile *) objfile_data (objfile,
+ dwarf2_objfile_data_key);
if (dwarf2_per_objfile)
{
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 63eee6f..15eefae 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -338,8 +338,9 @@ elf_symtab_read (struct objfile *objfile, int type,
continue;
if (sym->flags & BSF_FILE)
{
- filesymname = bcache (sym->name, strlen (sym->name) + 1,
- objfile->per_bfd->filename_cache);
+ filesymname =
+ (const char *) bcache (sym->name, strlen (sym->name) + 1,
+ objfile->per_bfd->filename_cache);
}
else if (sym->flags & BSF_SECTION_SYM)
continue;
@@ -638,7 +639,8 @@ struct elf_gnu_ifunc_cache
static hashval_t
elf_gnu_ifunc_cache_hash (const void *a_voidp)
{
- const struct elf_gnu_ifunc_cache *a = a_voidp;
+ const struct elf_gnu_ifunc_cache *a =
+ (const struct elf_gnu_ifunc_cache *) a_voidp;
return htab_hash_string (a->name);
}
@@ -648,8 +650,10 @@ elf_gnu_ifunc_cache_hash (const void *a_voidp)
static int
elf_gnu_ifunc_cache_eq (const void *a_voidp, const void *b_voidp)
{
- const struct elf_gnu_ifunc_cache *a = a_voidp;
- const struct elf_gnu_ifunc_cache *b = b_voidp;
+ const struct elf_gnu_ifunc_cache *a =
+ (const struct elf_gnu_ifunc_cache *) a_voidp;
+ const struct elf_gnu_ifunc_cache *b =
+ (const struct elf_gnu_ifunc_cache *) b_voidp;
return strcmp (a->name, b->name) == 0;
}
@@ -687,7 +691,7 @@ elf_gnu_ifunc_record_cache (const char *name, CORE_ADDR addr)
if (strcmp (bfd_get_section_name (objfile->obfd, sect), ".plt") == 0)
return 0;
- htab = objfile_data (objfile, elf_objfile_gnu_ifunc_cache_data);
+ htab = (htab_t) objfile_data (objfile, elf_objfile_gnu_ifunc_cache_data);
if (htab == NULL)
{
htab = htab_create_alloc_ex (1, elf_gnu_ifunc_cache_hash,
@@ -708,7 +712,8 @@ elf_gnu_ifunc_record_cache (const char *name, CORE_ADDR addr)
slot = htab_find_slot (htab, entry_p, INSERT);
if (*slot != NULL)
{
- struct elf_gnu_ifunc_cache *entry_found_p = *slot;
+ struct elf_gnu_ifunc_cache *entry_found_p =
+ (struct elf_gnu_ifunc_cache *) *slot;
struct gdbarch *gdbarch = get_objfile_arch (objfile);
if (entry_found_p->addr != addr)
@@ -747,7 +752,7 @@ elf_gnu_ifunc_resolve_by_cache (const char *name, CORE_ADDR *addr_p)
struct elf_gnu_ifunc_cache *entry_p;
void **slot;
- htab = objfile_data (objfile, elf_objfile_gnu_ifunc_cache_data);
+ htab = (htab_t) objfile_data (objfile, elf_objfile_gnu_ifunc_cache_data);
if (htab == NULL)
continue;
@@ -758,7 +763,7 @@ elf_gnu_ifunc_resolve_by_cache (const char *name, CORE_ADDR *addr_p)
slot = htab_find_slot (htab, entry_p, NO_INSERT);
if (slot == NULL)
continue;
- entry_p = *slot;
+ entry_p = (struct elf_gnu_ifunc_cache *) *slot;
gdb_assert (entry_p != NULL);
if (addr_p)
@@ -1326,7 +1331,7 @@ elf_get_probes (struct objfile *objfile)
VEC (probe_p) *probes_per_bfd;
/* Have we parsed this objfile's probes already? */
- probes_per_bfd = bfd_data (objfile->obfd, probe_key);
+ probes_per_bfd = (VEC (probe_p) *) bfd_data (objfile->obfd, probe_key);
if (!probes_per_bfd)
{
@@ -1358,7 +1363,7 @@ static void
probe_key_free (bfd *abfd, void *d)
{
int ix;
- VEC (probe_p) *probes = d;
+ VEC (probe_p) *probes = (VEC (probe_p) *) d;
struct probe *probe;
for (ix = 0; VEC_iterate (probe_p, probes, ix, probe); ix++)
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index e4deeb9..9101330 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -343,7 +343,7 @@ static struct gdbarch_data *f_type_data;
const struct builtin_f_type *
builtin_f_type (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, f_type_data);
+ return (const struct builtin_f_type *) gdbarch_data (gdbarch, f_type_data);
}
void
diff --git a/gdb/frame-base.c b/gdb/frame-base.c
index 47327ca..2493bd2 100644
--- a/gdb/frame-base.c
+++ b/gdb/frame-base.c
@@ -82,7 +82,8 @@ void
frame_base_append_sniffer (struct gdbarch *gdbarch,
frame_base_sniffer_ftype *sniffer)
{
- struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data);
+ struct frame_base_table *table =
+ (struct frame_base_table *) gdbarch_data (gdbarch, frame_base_data);
(*table->tail)
= GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_base_table_entry);
@@ -94,7 +95,8 @@ void
frame_base_set_default (struct gdbarch *gdbarch,
const struct frame_base *default_base)
{
- struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data);
+ struct frame_base_table *table =
+ (struct frame_base_table *) gdbarch_data (gdbarch, frame_base_data);
table->default_base = default_base;
}
@@ -103,7 +105,8 @@ const struct frame_base *
frame_base_find_by_frame (struct frame_info *this_frame)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data);
+ struct frame_base_table *table =
+ (struct frame_base_table *) gdbarch_data (gdbarch, frame_base_data);
struct frame_base_table_entry *entry;
for (entry = table->head; entry != NULL; entry = entry->next)
diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c
index bba1ae7..60b8256 100644
--- a/gdb/frame-unwind.c
+++ b/gdb/frame-unwind.c
@@ -64,7 +64,8 @@ void
frame_unwind_prepend_unwinder (struct gdbarch *gdbarch,
const struct frame_unwind *unwinder)
{
- struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
+ struct frame_unwind_table *table =
+ (struct frame_unwind_table *) gdbarch_data (gdbarch, frame_unwind_data);
struct frame_unwind_table_entry *entry;
/* Insert the new entry at the start of the list. */
@@ -78,7 +79,8 @@ void
frame_unwind_append_unwinder (struct gdbarch *gdbarch,
const struct frame_unwind *unwinder)
{
- struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
+ struct frame_unwind_table *table =
+ (struct frame_unwind_table *) gdbarch_data (gdbarch, frame_unwind_data);
struct frame_unwind_table_entry **ip;
/* Find the end of the list and insert the new entry there. */
@@ -140,7 +142,8 @@ void
frame_unwind_find_by_frame (struct frame_info *this_frame, void **this_cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
+ struct frame_unwind_table *table =
+ (struct frame_unwind_table *) gdbarch_data (gdbarch, frame_unwind_data);
struct frame_unwind_table_entry *entry;
const struct frame_unwind *unwinder_from_target;
diff --git a/gdb/frame.c b/gdb/frame.c
index 8b804cd..93bb7f6 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -162,7 +162,7 @@ static htab_t frame_stash;
static hashval_t
frame_addr_hash (const void *ap)
{
- const struct frame_info *frame = ap;
+ const struct frame_info *frame = (const struct frame_info *) ap;
const struct frame_id f_id = frame->this_id.value;
hashval_t hash = 0;
@@ -189,8 +189,8 @@ frame_addr_hash (const void *ap)
static int
frame_addr_hash_eq (const void *a, const void *b)
{
- const struct frame_info *f_entry = a;
- const struct frame_info *f_element = b;
+ const struct frame_info *f_entry = (const struct frame_info *) a;
+ const struct frame_info *f_element = (const struct frame_info *) b;
return frame_id_eq (f_entry->this_id.value,
f_element->this_id.value);
@@ -246,7 +246,7 @@ frame_stash_find (struct frame_id id)
struct frame_info *frame;
dummy.this_id.value = id;
- frame = htab_find (frame_stash, &dummy);
+ frame = (struct frame_info *) htab_find (frame_stash, &dummy);
return frame;
}
@@ -930,7 +930,7 @@ get_frame_func (struct frame_info *this_frame)
static enum register_status
do_frame_register_read (void *src, int regnum, gdb_byte *buf)
{
- if (!deprecated_frame_register_read (src, regnum, buf))
+ if (!deprecated_frame_register_read ((struct frame_info *) src, regnum, buf))
return REG_UNAVAILABLE;
else
return REG_VALID;
@@ -1447,7 +1447,7 @@ frame_obstack_zalloc (unsigned long size)
static int
unwind_to_current_frame (struct ui_out *ui_out, void *args)
{
- struct frame_info *frame = get_prev_frame (args);
+ struct frame_info *frame = get_prev_frame ((struct frame_info *) args);
/* A sentinel frame can fail to unwind, e.g., because its PC value
lands in somewhere like start. */
@@ -2703,7 +2703,7 @@ frame_stop_reason_symbol_string (enum unwind_stop_reason reason)
static void
frame_cleanup_after_sniffer (void *arg)
{
- struct frame_info *frame = arg;
+ struct frame_info *frame = (struct frame_info *) arg;
/* The sniffer should not allocate a prologue cache if it did not
match this frame. */
diff --git a/gdb/frv-linux-tdep.c b/gdb/frv-linux-tdep.c
index 8775d19..6950b6c 100644
--- a/gdb/frv-linux-tdep.c
+++ b/gdb/frv-linux-tdep.c
@@ -271,7 +271,7 @@ frv_linux_sigtramp_frame_cache (struct frame_info *this_frame,
struct frame_id this_id;
if (*this_cache)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 19ff87e..984c6e8 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -1099,7 +1099,7 @@ frv_frame_unwind_cache (struct frame_info *this_frame,
struct frv_unwind_cache *info;
if ((*this_prologue_cache))
- return (*this_prologue_cache);
+ return (struct frv_unwind_cache *) (*this_prologue_cache);
info = FRAME_OBSTACK_ZALLOC (struct frv_unwind_cache);
(*this_prologue_cache) = info;
diff --git a/gdb/ft32-tdep.c b/gdb/ft32-tdep.c
index 2e5deca..6ea802e 100644
--- a/gdb/ft32-tdep.c
+++ b/gdb/ft32-tdep.c
@@ -369,7 +369,7 @@ ft32_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct ft32_frame_cache *) *this_cache;
cache = ft32_alloc_frame_cache ();
*this_cache = cache;
diff --git a/gdb/gcore.c b/gdb/gcore.c
index 44b9d0c..a883e89 100644
--- a/gdb/gcore.c
+++ b/gdb/gcore.c
@@ -137,10 +137,10 @@ write_gcore_file (bfd *obfd)
static void
do_bfd_delete_cleanup (void *arg)
{
- bfd *obfd = arg;
+ bfd *obfd = (bfd *) arg;
const char *filename = obfd->filename;
- gdb_bfd_unref (arg);
+ gdb_bfd_unref ((bfd *) arg);
unlink (filename);
}
@@ -417,7 +417,7 @@ static int
gcore_create_callback (CORE_ADDR vaddr, unsigned long size, int read,
int write, int exec, int modified, void *data)
{
- bfd *obfd = data;
+ bfd *obfd = (bfd *) data;
asection *osec;
flagword flags = SEC_ALLOC | SEC_HAS_CONTENTS | SEC_LOAD;
diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c
index 43d0837..29a2789 100644
--- a/gdb/gdb_bfd.c
+++ b/gdb/gdb_bfd.c
@@ -155,7 +155,7 @@ struct gdb_bfd_cache_search
static hashval_t
hash_bfd (const void *b)
{
- const bfd *abfd = b;
+ const bfd *abfd = (const struct bfd *) b;
/* It is simplest to just hash the filename. */
return htab_hash_string (bfd_get_filename (abfd));
@@ -167,9 +167,10 @@ hash_bfd (const void *b)
static int
eq_bfd (const void *a, const void *b)
{
- const bfd *abfd = a;
- const struct gdb_bfd_cache_search *s = b;
- struct gdb_bfd_data *gdata = bfd_usrdata (abfd);
+ const bfd *abfd = (const struct bfd *) a;
+ const struct gdb_bfd_cache_search *s =
+ (const struct gdb_bfd_cache_search *) b;
+ struct gdb_bfd_data *gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
return (gdata->mtime == s->mtime
&& gdata->size == s->size
@@ -417,7 +418,7 @@ gdb_bfd_open (const char *name, const char *target, int fd)
/* Note that we cannot use htab_find_slot_with_hash here, because
opening the BFD may fail; and this would violate hashtab
invariants. */
- abfd = htab_find_with_hash (gdb_bfd_cache, &search, hash);
+ abfd = (struct bfd *) htab_find_with_hash (gdb_bfd_cache, &search, hash);
if (bfd_sharing && abfd != NULL)
{
if (debug_bfd_cache)
@@ -457,7 +458,8 @@ gdb_bfd_open (const char *name, const char *target, int fd)
static void
free_one_bfd_section (bfd *abfd, asection *sectp, void *ignore)
{
- struct gdb_bfd_section_data *sect = bfd_get_section_userdata (abfd, sectp);
+ struct gdb_bfd_section_data *sect =
+ (struct gdb_bfd_section_data *) bfd_get_section_userdata (abfd, sectp);
if (sect != NULL && sect->data != NULL)
{
@@ -506,7 +508,7 @@ gdb_bfd_ref (struct bfd *abfd)
if (abfd == NULL)
return;
- gdata = bfd_usrdata (abfd);
+ gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
if (debug_bfd_cache)
fprintf_unfiltered (gdb_stdlog,
@@ -563,7 +565,7 @@ gdb_bfd_unref (struct bfd *abfd)
if (abfd == NULL)
return;
- gdata = bfd_usrdata (abfd);
+ gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
gdb_assert (gdata->refc >= 1);
gdata->refc -= 1;
@@ -627,7 +629,8 @@ get_section_descriptor (asection *section)
{
struct gdb_bfd_section_data *result;
- result = bfd_get_section_userdata (section->owner, section);
+ result = ((struct gdb_bfd_section_data *)
+ bfd_get_section_userdata (section->owner, section));
if (result == NULL)
{
@@ -710,7 +713,7 @@ gdb_bfd_map_section (asection *sectp, bfd_size_type *size)
done:
gdb_assert (descriptor->data != NULL);
*size = descriptor->size;
- return descriptor->data;
+ return (const gdb_byte *) descriptor->data;
}
/* Return 32-bit CRC for ABFD. If successful store it to *FILE_CRC_RETURN and
@@ -755,7 +758,7 @@ get_file_crc (bfd *abfd, unsigned long *file_crc_return)
int
gdb_bfd_crc (struct bfd *abfd, unsigned long *crc_out)
{
- struct gdb_bfd_data *gdata = bfd_usrdata (abfd);
+ struct gdb_bfd_data *gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
if (!gdata->crc_computed)
gdata->crc_computed = get_file_crc (abfd, &gdata->crc);
@@ -846,7 +849,7 @@ gdb_bfd_mark_parent (bfd *child, bfd *parent)
/* No need to stash the filename here, because we also keep a
reference on the parent archive. */
- gdata = bfd_usrdata (child);
+ gdata = (struct gdb_bfd_data *) bfd_usrdata (child);
if (gdata->archive_bfd == NULL)
{
gdata->archive_bfd = parent;
@@ -877,7 +880,7 @@ gdb_bfd_record_inclusion (bfd *includer, bfd *includee)
struct gdb_bfd_data *gdata;
gdb_bfd_ref (includee);
- gdata = bfd_usrdata (includer);
+ gdata = (struct gdb_bfd_data *) bfd_usrdata (includer);
VEC_safe_push (bfdp, gdata->included_bfds, includee);
}
@@ -929,7 +932,7 @@ gdb_bfd_count_sections (bfd *abfd)
int
gdb_bfd_requires_relocations (bfd *abfd)
{
- struct gdb_bfd_data *gdata = bfd_usrdata (abfd);
+ struct gdb_bfd_data *gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
if (gdata->relocation_computed == 0)
{
@@ -955,9 +958,9 @@ gdb_bfd_requires_relocations (bfd *abfd)
static int
print_one_bfd (void **slot, void *data)
{
- bfd *abfd = *slot;
- struct gdb_bfd_data *gdata = bfd_usrdata (abfd);
- struct ui_out *uiout = data;
+ bfd *abfd = (struct bfd *) *slot;
+ struct gdb_bfd_data *gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
+ struct ui_out *uiout = (struct ui_out *) data;
struct cleanup *inner;
inner = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
diff --git a/gdb/gdbserver/dll.c b/gdb/gdbserver/dll.c
index c4f838c..608cf23 100644
--- a/gdb/gdbserver/dll.c
+++ b/gdb/gdbserver/dll.c
@@ -41,8 +41,8 @@ free_one_dll (struct inferior_list_entry *inf)
static int
match_dll (struct inferior_list_entry *inf, void *arg)
{
- struct dll_info *iter = (void *) inf;
- struct dll_info *key = arg;
+ struct dll_info *iter = (struct dll_info *) inf;
+ struct dll_info *key = (struct dll_info *) arg;
if (key->base_addr != UNSPECIFIED_CORE_ADDR
&& iter->base_addr == key->base_addr)
@@ -83,7 +83,7 @@ unloaded_dll (const char *name, CORE_ADDR base_addr)
key_dll.name = (char *) name;
key_dll.base_addr = base_addr;
- dll = (void *) find_inferior (&all_dlls, match_dll, &key_dll);
+ dll = (struct dll_info *) find_inferior (&all_dlls, match_dll, &key_dll);
if (dll == NULL)
/* For some inferiors we might get unloaded_dll events without having
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 12a2332..3a1a6ae 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -1089,7 +1089,7 @@ struct counter
static int
second_thread_of_pid_p (struct inferior_list_entry *entry, void *args)
{
- struct counter *counter = args;
+ struct counter *counter = (struct counter *) args;
if (ptid_get_pid (entry->id) == counter->pid)
{
@@ -1429,7 +1429,7 @@ delete_lwp_callback (struct inferior_list_entry *entry, void *proc)
{
struct thread_info *thread = (struct thread_info *) entry;
struct lwp_info *lwp = get_thread_lwp (thread);
- struct process_info *process = proc;
+ struct process_info *process = (struct process_info *) proc;
if (pid_of (thread) == pid_of (process))
delete_lwp (lwp);
@@ -2633,7 +2633,7 @@ count_events_callback (struct inferior_list_entry *entry, void *data)
{
struct thread_info *thread = (struct thread_info *) entry;
struct lwp_info *lp = get_thread_lwp (thread);
- int *count = data;
+ int *count = (int *) data;
gdb_assert (count != NULL);
@@ -2668,7 +2668,7 @@ select_event_lwp_callback (struct inferior_list_entry *entry, void *data)
{
struct thread_info *thread = (struct thread_info *) entry;
struct lwp_info *lp = get_thread_lwp (thread);
- int *selector = data;
+ int *selector = (int *) data;
gdb_assert (selector != NULL);
@@ -4152,7 +4152,7 @@ linux_set_resume_request (struct inferior_list_entry *entry, void *arg)
int ndx;
struct thread_resume_array *r;
- r = arg;
+ r = (struct thread_resume_array *) arg;
for (ndx = 0; ndx < r->n; ndx++)
{
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 53763e5..f20563c 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -1280,7 +1280,7 @@ static void
accumulate_file_name_length (struct inferior_list_entry *inf, void *arg)
{
struct dll_info *dll = (struct dll_info *) inf;
- unsigned int *total_len = arg;
+ unsigned int *total_len = (unsigned int *) arg;
/* Over-estimate the necessary memory. Assume that every character
in the library name must be escaped. */
@@ -1294,7 +1294,7 @@ static void
emit_dll_description (struct inferior_list_entry *inf, void *arg)
{
struct dll_info *dll = (struct dll_info *) inf;
- char **p_ptr = arg;
+ char **p_ptr = (char **) arg;
char *p = *p_ptr;
char *name;
@@ -1450,7 +1450,7 @@ static void
handle_qxfer_threads_worker (struct inferior_list_entry *inf, void *arg)
{
struct thread_info *thread = (struct thread_info *) inf;
- struct buffer *buffer = arg;
+ struct buffer *buffer = (struct buffer *) arg;
ptid_t ptid = thread_to_gdb_id (thread);
char ptid_s[100];
int core = target_core_of_thread (ptid);
@@ -2459,7 +2459,8 @@ struct visit_actioned_threads_data
static int
visit_actioned_threads (struct inferior_list_entry *entry, void *datap)
{
- struct visit_actioned_threads_data *data = datap;
+ struct visit_actioned_threads_data *data =
+ (struct visit_actioned_threads_data *) datap;
const struct thread_resume *actions = data->actions;
size_t num_actions = data->num_actions;
visit_actioned_threads_callback_ftype *callback = data->callback;
diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c
index f5fdf10..ffe722d 100644
--- a/gdb/gdbserver/thread-db.c
+++ b/gdb/gdbserver/thread-db.c
@@ -874,7 +874,7 @@ thread_db_init (int use_events)
static int
any_thread_of (struct inferior_list_entry *entry, void *args)
{
- int *pid_p = args;
+ int *pid_p = (int *) args;
if (ptid_get_pid (entry->id) == *pid_p)
return 1;
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index a14fbfa..9ca1008 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -3947,7 +3947,7 @@ cmd_qtstmat (char *packet)
static int
same_process_p (struct inferior_list_entry *entry, void *data)
{
- int *pid = data;
+ int *pid = (int *) data;
return ptid_get_pid (entry->id) == *pid;
}
@@ -5066,7 +5066,7 @@ agent_tsv_read (struct eval_agent_expr_context *ctx, int n)
static int
match_blocktype (char blocktype, unsigned char *dataptr, void *data)
{
- char *wantedp = data;
+ char *wantedp = (char *) data;
if (*wantedp == blocktype)
return 1;
@@ -5412,7 +5412,7 @@ traceframe_read_sdata (int tfnum, ULONGEST offset,
static int
build_traceframe_info_xml (char blocktype, unsigned char *dataptr, void *data)
{
- struct buffer *buffer = data;
+ struct buffer *buffer = (struct buffer *) data;
switch (blocktype)
{
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index e77a337..d39702a 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -4308,7 +4308,7 @@ struct type_pair
static hashval_t
type_pair_hash (const void *item)
{
- const struct type_pair *pair = item;
+ const struct type_pair *pair = (const struct type_pair *) item;
return htab_hash_pointer (pair->old);
}
@@ -4316,7 +4316,8 @@ type_pair_hash (const void *item)
static int
type_pair_eq (const void *item_lhs, const void *item_rhs)
{
- const struct type_pair *lhs = item_lhs, *rhs = item_rhs;
+ const struct type_pair *lhs = (const struct type_pair *) item_lhs;
+ const struct type_pair *rhs = (const struct type_pair *) item_rhs;
return lhs->old == rhs->old;
}
@@ -4780,7 +4781,7 @@ static struct gdbarch_data *gdbtypes_data;
const struct builtin_type *
builtin_type (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, gdbtypes_data);
+ return (const struct builtin_type *) gdbarch_data (gdbarch, gdbtypes_data);
}
static void *
@@ -4925,7 +4926,7 @@ objfile_type (struct objfile *objfile)
{
struct gdbarch *gdbarch;
struct objfile_type *objfile_type
- = objfile_data (objfile, objfile_type_data);
+ = (struct objfile_type *) objfile_data (objfile, objfile_type_data);
if (objfile_type)
return objfile_type;
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index b493112..9b15de8 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -174,7 +174,8 @@ build_gdb_vtable_type (struct gdbarch *arch)
static struct type *
vtable_ptrdiff_type (struct gdbarch *gdbarch)
{
- struct type *vtable_type = gdbarch_data (gdbarch, vtable_type_gdbarch_data);
+ struct type *vtable_type =
+ (struct type *) gdbarch_data (gdbarch, vtable_type_gdbarch_data);
/* The "offset_to_top" field has the appropriate (ptrdiff_t) type. */
return TYPE_FIELD_TYPE (vtable_type, vtable_field_offset_to_top);
@@ -186,7 +187,8 @@ vtable_ptrdiff_type (struct gdbarch *gdbarch)
static int
vtable_address_point_offset (struct gdbarch *gdbarch)
{
- struct type *vtable_type = gdbarch_data (gdbarch, vtable_type_gdbarch_data);
+ struct type *vtable_type =
+ (struct type *) gdbarch_data (gdbarch, vtable_type_gdbarch_data);
return (TYPE_FIELD_BITPOS (vtable_type, vtable_field_virtual_functions)
/ TARGET_CHAR_BIT);
@@ -246,8 +248,8 @@ static struct value *
gnuv3_get_vtable (struct gdbarch *gdbarch,
struct type *container_type, CORE_ADDR container_addr)
{
- struct type *vtable_type = gdbarch_data (gdbarch,
- vtable_type_gdbarch_data);
+ struct type *vtable_type =
+ (struct type *) gdbarch_data (gdbarch, vtable_type_gdbarch_data);
struct type *vtable_pointer_type;
struct value *vtable_pointer;
CORE_ADDR vtable_address;
@@ -778,7 +780,7 @@ DEF_VEC_P (value_and_voffset_p);
static hashval_t
hash_value_and_voffset (const void *p)
{
- const struct value_and_voffset *o = p;
+ const struct value_and_voffset *o = (const struct value_and_voffset *) p;
return value_address (o->value) + value_embedded_offset (o->value);
}
@@ -788,8 +790,8 @@ hash_value_and_voffset (const void *p)
static int
eq_value_and_voffset (const void *a, const void *b)
{
- const struct value_and_voffset *ova = a;
- const struct value_and_voffset *ovb = b;
+ const struct value_and_voffset *ova = (const struct value_and_voffset *) a;
+ const struct value_and_voffset *ovb = (const struct value_and_voffset *) b;
return (value_address (ova->value) + value_embedded_offset (ova->value)
== value_address (ovb->value) + value_embedded_offset (ovb->value));
@@ -800,10 +802,12 @@ eq_value_and_voffset (const void *a, const void *b)
static int
compare_value_and_voffset (const void *a, const void *b)
{
- const struct value_and_voffset * const *ova = a;
+ const struct value_and_voffset * const *ova =
+ (const struct value_and_voffset * const *) a;
CORE_ADDR addra = (value_address ((*ova)->value)
+ value_embedded_offset ((*ova)->value));
- const struct value_and_voffset * const *ovb = b;
+ const struct value_and_voffset * const *ovb =
+ (const struct value_and_voffset * const *) b;
CORE_ADDR addrb = (value_address ((*ovb)->value)
+ value_embedded_offset ((*ovb)->value));
@@ -841,7 +845,7 @@ compute_vtable_size (htab_t offset_hash,
search_vo.value = value;
slot = htab_find_slot (offset_hash, &search_vo, INSERT);
if (*slot)
- current_vo = *slot;
+ current_vo = (struct value_and_voffset *) *slot;
else
{
current_vo = XNEW (struct value_and_voffset);
@@ -1064,7 +1068,8 @@ gnuv3_get_typeid_type (struct gdbarch *gdbarch)
typeinfo = lookup_symbol ("std::type_info", NULL, STRUCT_DOMAIN,
NULL).symbol;
if (typeinfo == NULL)
- typeinfo_type = gdbarch_data (gdbarch, std_type_info_gdbarch_data);
+ typeinfo_type =
+ (struct type *) gdbarch_data (gdbarch, std_type_info_gdbarch_data);
else
typeinfo_type = SYMBOL_TYPE (typeinfo);
diff --git a/gdb/go-lang.c b/gdb/go-lang.c
index 509704c..f6d731b 100644
--- a/gdb/go-lang.c
+++ b/gdb/go-lang.c
@@ -655,7 +655,7 @@ static struct gdbarch_data *go_type_data;
const struct builtin_go_type *
builtin_go_type (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, go_type_data);
+ return (const struct builtin_go_type *) gdbarch_data (gdbarch, go_type_data);
}
extern initialize_file_ftype _initialize_go_language;
diff --git a/gdb/guile/scm-block.c b/gdb/guile/scm-block.c
index c4b367f..87dbd1a 100644
--- a/gdb/guile/scm-block.c
+++ b/gdb/guile/scm-block.c
@@ -85,7 +85,7 @@ static const struct objfile_data *bkscm_objfile_data_key;
static hashval_t
bkscm_hash_block_smob (const void *p)
{
- const block_smob *b_smob = p;
+ const block_smob *b_smob = (const block_smob *) p;
return htab_hash_pointer (b_smob->block);
}
@@ -95,8 +95,8 @@ bkscm_hash_block_smob (const void *p)
static int
bkscm_eq_block_smob (const void *ap, const void *bp)
{
- const block_smob *a = ap;
- const block_smob *b = bp;
+ const block_smob *a = (const block_smob *) ap;
+ const block_smob *b = (const block_smob *) bp;
return (a->block == b->block
&& a->block != NULL);
@@ -108,7 +108,7 @@ bkscm_eq_block_smob (const void *ap, const void *bp)
static htab_t
bkscm_objfile_block_map (struct objfile *objfile)
{
- htab_t htab = objfile_data (objfile, bkscm_objfile_data_key);
+ htab_t htab = (htab_t) objfile_data (objfile, bkscm_objfile_data_key);
if (htab == NULL)
{
@@ -347,7 +347,7 @@ bkscm_mark_block_invalid (void **slot, void *info)
static void
bkscm_del_objfile_blocks (struct objfile *objfile, void *datum)
{
- htab_t htab = datum;
+ htab_t htab = (htab_t) datum;
if (htab != NULL)
{
diff --git a/gdb/guile/scm-breakpoint.c b/gdb/guile/scm-breakpoint.c
index eea9b46..83574a3 100644
--- a/gdb/guile/scm-breakpoint.c
+++ b/gdb/guile/scm-breakpoint.c
@@ -509,7 +509,7 @@ gdbscm_delete_breakpoint_x (SCM self)
static int
bpscm_build_bp_list (struct breakpoint *bp, void *arg)
{
- SCM *list = arg;
+ SCM *list = (SCM *) arg;
breakpoint_smob *bp_smob = bp->scm_bp_object;
/* Lazily create wrappers for breakpoints created outside Scheme. */
diff --git a/gdb/guile/scm-disasm.c b/gdb/guile/scm-disasm.c
index fe37a38..46a0a6e 100644
--- a/gdb/guile/scm-disasm.c
+++ b/gdb/guile/scm-disasm.c
@@ -79,9 +79,11 @@ dascm_make_insn (CORE_ADDR pc, const char *assembly, int insn_len)
static void *
gdbscm_disasm_read_memory_worker (void *datap)
{
- struct gdbscm_disasm_read_data *data = datap;
+ struct gdbscm_disasm_read_data *data =
+ (struct gdbscm_disasm_read_data *) datap;
struct disassemble_info *dinfo = data->dinfo;
- struct gdbscm_disasm_data *disasm_data = dinfo->application_data;
+ struct gdbscm_disasm_data *disasm_data =
+ (struct gdbscm_disasm_data *) dinfo->application_data;
SCM seekto, newpos, port = disasm_data->port;
size_t bytes_read;
@@ -141,10 +143,11 @@ gdbscm_disasm_memory_error (int status, bfd_vma memaddr,
static void
gdbscm_disasm_print_address (bfd_vma addr, struct disassemble_info *info)
{
- struct gdbscm_disasm_data *data = info->application_data;
+ struct gdbscm_disasm_data *data =
+ (struct gdbscm_disasm_data *) info->application_data;
struct gdbarch *gdbarch = data->gdbarch;
- print_address (gdbarch, addr, info->stream);
+ print_address (gdbarch, addr, (struct ui_file *) info->stream);
}
/* Subroutine of gdbscm_arch_disassemble to simplify it.
diff --git a/gdb/guile/scm-frame.c b/gdb/guile/scm-frame.c
index 38e1448..24e26e8 100644
--- a/gdb/guile/scm-frame.c
+++ b/gdb/guile/scm-frame.c
@@ -84,7 +84,7 @@ static const struct inferior_data *frscm_inferior_data_key;
static hashval_t
frscm_hash_frame_smob (const void *p)
{
- const frame_smob *f_smob = p;
+ const frame_smob *f_smob = (const frame_smob *) p;
const struct frame_id *fid = &f_smob->frame_id;
hashval_t hash = htab_hash_pointer (f_smob->inferior);
@@ -104,8 +104,8 @@ frscm_hash_frame_smob (const void *p)
static int
frscm_eq_frame_smob (const void *ap, const void *bp)
{
- const frame_smob *a = ap;
- const frame_smob *b = bp;
+ const frame_smob *a = (const frame_smob *) ap;
+ const frame_smob *b = (const frame_smob *) bp;
return (frame_id_eq (a->frame_id, b->frame_id)
&& a->inferior == b->inferior
@@ -118,7 +118,7 @@ frscm_eq_frame_smob (const void *ap, const void *bp)
static htab_t
frscm_inferior_frame_map (struct inferior *inferior)
{
- htab_t htab = inferior_data (inferior, frscm_inferior_data_key);
+ htab_t htab = (htab_t) inferior_data (inferior, frscm_inferior_data_key);
if (htab == NULL)
{
@@ -379,7 +379,7 @@ frscm_mark_frame_invalid (void **slot, void *info)
static void
frscm_del_inferior_frames (struct inferior *inferior, void *datum)
{
- htab_t htab = datum;
+ htab_t htab = (htab_t) datum;
if (htab != NULL)
{
diff --git a/gdb/guile/scm-gsmob.c b/gdb/guile/scm-gsmob.c
index 52368e9..504ea6c 100644
--- a/gdb/guile/scm-gsmob.c
+++ b/gdb/guile/scm-gsmob.c
@@ -193,7 +193,7 @@ gdbscm_add_objfile_ref (struct objfile *objfile,
g_smob->prev = NULL;
if (objfile != NULL)
{
- g_smob->next = objfile_data (objfile, data_key);
+ g_smob->next = (chained_gdb_smob *) objfile_data (objfile, data_key);
if (g_smob->next)
g_smob->next->prev = g_smob;
set_objfile_data (objfile, data_key, g_smob);
diff --git a/gdb/guile/scm-objfile.c b/gdb/guile/scm-objfile.c
index 0af151d..f85975e 100644
--- a/gdb/guile/scm-objfile.c
+++ b/gdb/guile/scm-objfile.c
@@ -116,7 +116,7 @@ ofscm_release_objfile (objfile_smob *o_smob)
static void
ofscm_handle_objfile_deleted (struct objfile *objfile, void *datum)
{
- objfile_smob *o_smob = datum;
+ objfile_smob *o_smob = (objfile_smob *) datum;
gdb_assert (o_smob->objfile == objfile);
@@ -148,7 +148,7 @@ ofscm_objfile_smob_from_objfile (struct objfile *objfile)
{
objfile_smob *o_smob;
- o_smob = objfile_data (objfile, ofscm_objfile_data_key);
+ o_smob = (objfile_smob *) objfile_data (objfile, ofscm_objfile_data_key);
if (o_smob == NULL)
{
SCM o_scm = ofscm_make_objfile_smob ();
diff --git a/gdb/guile/scm-ports.c b/gdb/guile/scm-ports.c
index f005155..020da1c 100644
--- a/gdb/guile/scm-ports.c
+++ b/gdb/guile/scm-ports.c
@@ -269,9 +269,9 @@ ioscm_write (SCM port, const void *data, size_t size)
TRY
{
if (scm_is_eq (port, error_port_scm))
- fputsn_filtered (data, size, gdb_stderr);
+ fputsn_filtered ((const char *) data, size, gdb_stderr);
else
- fputsn_filtered (data, size, gdb_stdout);
+ fputsn_filtered ((const char *) data, size, gdb_stdout);
}
CATCH (except, RETURN_MASK_ALL)
{
@@ -430,7 +430,7 @@ gdbscm_error_port (void)
static void
ioscm_file_port_delete (struct ui_file *file)
{
- ioscm_file_port *stream = ui_file_data (file);
+ ioscm_file_port *stream = (ioscm_file_port *) ui_file_data (file);
if (stream->magic != &file_port_magic)
internal_error (__FILE__, __LINE__,
@@ -441,7 +441,7 @@ ioscm_file_port_delete (struct ui_file *file)
static void
ioscm_file_port_rewind (struct ui_file *file)
{
- ioscm_file_port *stream = ui_file_data (file);
+ ioscm_file_port *stream = (ioscm_file_port *) ui_file_data (file);
if (stream->magic != &file_port_magic)
internal_error (__FILE__, __LINE__,
@@ -455,7 +455,7 @@ ioscm_file_port_put (struct ui_file *file,
ui_file_put_method_ftype *write,
void *dest)
{
- ioscm_file_port *stream = ui_file_data (file);
+ ioscm_file_port *stream = (ioscm_file_port *) ui_file_data (file);
if (stream->magic != &file_port_magic)
internal_error (__FILE__, __LINE__,
@@ -469,7 +469,7 @@ ioscm_file_port_write (struct ui_file *file,
const char *buffer,
long length_buffer)
{
- ioscm_file_port *stream = ui_file_data (file);
+ ioscm_file_port *stream = (ioscm_file_port *) ui_file_data (file);
if (stream->magic != &file_port_magic)
internal_error (__FILE__, __LINE__,
diff --git a/gdb/guile/scm-progspace.c b/gdb/guile/scm-progspace.c
index a95e834..32c3206 100644
--- a/gdb/guile/scm-progspace.c
+++ b/gdb/guile/scm-progspace.c
@@ -126,7 +126,7 @@ psscm_release_pspace (pspace_smob *p_smob)
static void
psscm_handle_pspace_deleted (struct program_space *pspace, void *datum)
{
- pspace_smob *p_smob = datum;
+ pspace_smob *p_smob = (pspace_smob *) datum;
gdb_assert (p_smob->pspace == pspace);
@@ -158,7 +158,7 @@ psscm_pspace_smob_from_pspace (struct program_space *pspace)
{
pspace_smob *p_smob;
- p_smob = program_space_data (pspace, psscm_pspace_data_key);
+ p_smob = (pspace_smob *) program_space_data (pspace, psscm_pspace_data_key);
if (p_smob == NULL)
{
SCM p_scm = psscm_make_pspace_smob ();
diff --git a/gdb/guile/scm-safe-call.c b/gdb/guile/scm-safe-call.c
index 6052214..3180527 100644
--- a/gdb/guile/scm-safe-call.c
+++ b/gdb/guile/scm-safe-call.c
@@ -97,7 +97,7 @@ scscm_nop_unwind_handler (void *data, SCM key, SCM args)
static SCM
scscm_recording_pre_unwind_handler (void *datap, SCM key, SCM args)
{
- struct with_catch_data *data = datap;
+ struct with_catch_data *data = (struct with_catch_data *) datap;
excp_matcher_func *matcher = data->excp_matcher;
if (matcher != NULL && matcher (key))
@@ -126,7 +126,7 @@ scscm_recording_pre_unwind_handler (void *datap, SCM key, SCM args)
static SCM
scscm_recording_unwind_handler (void *datap, SCM key, SCM args)
{
- struct with_catch_data *data = datap;
+ struct with_catch_data *data = (struct with_catch_data *) datap;
/* We need to record the stack in the exception since we're about to
throw and lose the location that got the exception. We do this by
@@ -147,7 +147,7 @@ scscm_recording_unwind_handler (void *datap, SCM key, SCM args)
static void *
gdbscm_with_catch (void *data)
{
- struct with_catch_data *d = data;
+ struct with_catch_data *d = (struct with_catch_data *) data;
d->catch_result
= scm_c_catch (SCM_BOOL_T,
@@ -230,7 +230,7 @@ gdbscm_call_guile (SCM (*func) (void *), void *data,
static SCM
scscm_call_0_body (void *argsp)
{
- SCM *args = argsp;
+ SCM *args = (SCM *) argsp;
return scm_call_0 (args[0]);
}
@@ -248,7 +248,7 @@ gdbscm_safe_call_0 (SCM proc, excp_matcher_func *ok_excps)
static SCM
scscm_call_1_body (void *argsp)
{
- SCM *args = argsp;
+ SCM *args = (SCM *) argsp;
return scm_call_1 (args[0], args[1]);
}
@@ -266,7 +266,7 @@ gdbscm_safe_call_1 (SCM proc, SCM arg0, excp_matcher_func *ok_excps)
static SCM
scscm_call_2_body (void *argsp)
{
- SCM *args = argsp;
+ SCM *args = (SCM *) argsp;
return scm_call_2 (args[0], args[1], args[2]);
}
@@ -284,7 +284,7 @@ gdbscm_safe_call_2 (SCM proc, SCM arg0, SCM arg1, excp_matcher_func *ok_excps)
static SCM
scscm_call_3_body (void *argsp)
{
- SCM *args = argsp;
+ SCM *args = (SCM *) argsp;
return scm_call_3 (args[0], args[1], args[2], args[3]);
}
@@ -303,7 +303,7 @@ gdbscm_safe_call_3 (SCM proc, SCM arg1, SCM arg2, SCM arg3,
static SCM
scscm_call_4_body (void *argsp)
{
- SCM *args = argsp;
+ SCM *args = (SCM *) argsp;
return scm_call_4 (args[0], args[1], args[2], args[3], args[4]);
}
@@ -322,7 +322,7 @@ gdbscm_safe_call_4 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4,
static SCM
scscm_apply_1_body (void *argsp)
{
- SCM *args = argsp;
+ SCM *args = (SCM *) argsp;
return scm_apply_1 (args[0], args[1], args[2]);
}
@@ -372,7 +372,8 @@ struct eval_scheme_string_data
static void *
scscm_eval_scheme_string (void *datap)
{
- struct eval_scheme_string_data *data = datap;
+ struct eval_scheme_string_data *data =
+ (struct eval_scheme_string_data *) datap;
SCM result = scm_c_eval_string (data->string);
if (data->display_result && !scm_is_eq (result, SCM_UNSPECIFIED))
@@ -402,7 +403,7 @@ gdbscm_safe_eval_string (const char *string, int display_result)
result = gdbscm_with_guile (scscm_eval_scheme_string, (void *) &data);
if (result != NULL)
- return xstrdup (result);
+ return xstrdup ((char *) result);
return NULL;
}
\f
@@ -413,7 +414,7 @@ gdbscm_safe_eval_string (const char *string, int display_result)
static void *
scscm_source_scheme_script (void *data)
{
- const char *filename = data;
+ const char *filename = (const char *) data;
/* The Guile docs don't specify what the result is.
Maybe it's SCM_UNSPECIFIED, but the docs should specify that. :-) */
@@ -451,7 +452,7 @@ gdbscm_safe_source_script (const char *filename)
xfree (abs_filename);
if (result != NULL)
- return xstrdup (result);
+ return xstrdup ((char *) result);
return NULL;
}
\f
diff --git a/gdb/guile/scm-string.c b/gdb/guile/scm-string.c
index c55da90..e6cb1d1 100644
--- a/gdb/guile/scm-string.c
+++ b/gdb/guile/scm-string.c
@@ -93,7 +93,7 @@ struct scm_to_stringn_data
static SCM
gdbscm_call_scm_to_stringn (void *datap)
{
- struct scm_to_stringn_data *data = datap;
+ struct scm_to_stringn_data *data = (struct scm_to_stringn_data *) datap;
data->result = scm_to_stringn (data->string, data->lenp, data->charset,
data->conversion_kind);
@@ -161,7 +161,7 @@ struct scm_from_stringn_data
static SCM
gdbscm_call_scm_from_stringn (void *datap)
{
- struct scm_from_stringn_data *data = datap;
+ struct scm_from_stringn_data *data = (struct scm_from_stringn_data *) datap;
data->result = scm_from_stringn (data->string, data->len, data->charset,
data->conversion_kind);
diff --git a/gdb/guile/scm-symbol.c b/gdb/guile/scm-symbol.c
index f711a02..c848cd6 100644
--- a/gdb/guile/scm-symbol.c
+++ b/gdb/guile/scm-symbol.c
@@ -65,7 +65,7 @@ struct syscm_gdbarch_data
static hashval_t
syscm_hash_symbol_smob (const void *p)
{
- const symbol_smob *s_smob = p;
+ const symbol_smob *s_smob = (const symbol_smob *) p;
return htab_hash_pointer (s_smob->symbol);
}
@@ -75,8 +75,8 @@ syscm_hash_symbol_smob (const void *p)
static int
syscm_eq_symbol_smob (const void *ap, const void *bp)
{
- const symbol_smob *a = ap;
- const symbol_smob *b = bp;
+ const symbol_smob *a = (const symbol_smob *) ap;
+ const symbol_smob *b = (const symbol_smob *) bp;
return (a->symbol == b->symbol
&& a->symbol != NULL);
@@ -105,7 +105,7 @@ syscm_get_symbol_map (struct symbol *symbol)
{
struct objfile *objfile = symbol_objfile (symbol);
- htab = objfile_data (objfile, syscm_objfile_data_key);
+ htab = (htab_t) objfile_data (objfile, syscm_objfile_data_key);
if (htab == NULL)
{
htab = gdbscm_create_eqable_gsmob_ptr_map (syscm_hash_symbol_smob,
@@ -116,8 +116,9 @@ syscm_get_symbol_map (struct symbol *symbol)
else
{
struct gdbarch *gdbarch = symbol_arch (symbol);
- struct syscm_gdbarch_data *data = gdbarch_data (gdbarch,
- syscm_gdbarch_data_key);
+ struct syscm_gdbarch_data *data =
+ (struct syscm_gdbarch_data *) gdbarch_data (gdbarch,
+ syscm_gdbarch_data_key);
htab = data->htab;
}
@@ -311,7 +312,7 @@ syscm_mark_symbol_invalid (void **slot, void *info)
static void
syscm_del_objfile_symbols (struct objfile *objfile, void *datum)
{
- htab_t htab = datum;
+ htab_t htab = (htab_t) datum;
if (htab != NULL)
{
diff --git a/gdb/guile/scm-symtab.c b/gdb/guile/scm-symtab.c
index 6d16b27..6b6edca 100644
--- a/gdb/guile/scm-symtab.c
+++ b/gdb/guile/scm-symtab.c
@@ -86,7 +86,7 @@ static const struct objfile_data *stscm_objfile_data_key;
static hashval_t
stscm_hash_symtab_smob (const void *p)
{
- const symtab_smob *st_smob = p;
+ const symtab_smob *st_smob = (const symtab_smob *) p;
return htab_hash_pointer (st_smob->symtab);
}
@@ -96,8 +96,8 @@ stscm_hash_symtab_smob (const void *p)
static int
stscm_eq_symtab_smob (const void *ap, const void *bp)
{
- const symtab_smob *a = ap;
- const symtab_smob *b = bp;
+ const symtab_smob *a = (const symtab_smob *) ap;
+ const symtab_smob *b = (const symtab_smob *) bp;
return (a->symtab == b->symtab
&& a->symtab != NULL);
@@ -110,7 +110,7 @@ static htab_t
stscm_objfile_symtab_map (struct symtab *symtab)
{
struct objfile *objfile = SYMTAB_OBJFILE (symtab);
- htab_t htab = objfile_data (objfile, stscm_objfile_data_key);
+ htab_t htab = (htab_t) objfile_data (objfile, stscm_objfile_data_key);
if (htab == NULL)
{
@@ -292,7 +292,7 @@ stscm_mark_symtab_invalid (void **slot, void *info)
static void
stscm_del_objfile_symtabs (struct objfile *objfile, void *datum)
{
- htab_t htab = datum;
+ htab_t htab = (htab_t) datum;
if (htab != NULL)
{
diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c
index 11b355d..642ce15 100644
--- a/gdb/guile/scm-type.c
+++ b/gdb/guile/scm-type.c
@@ -139,7 +139,7 @@ tyscm_type_name (struct type *type, SCM *excp)
static hashval_t
tyscm_hash_type_smob (const void *p)
{
- const type_smob *t_smob = p;
+ const type_smob *t_smob = (const type_smob *) p;
return htab_hash_pointer (t_smob->type);
}
@@ -149,8 +149,8 @@ tyscm_hash_type_smob (const void *p)
static int
tyscm_eq_type_smob (const void *ap, const void *bp)
{
- const type_smob *a = ap;
- const type_smob *b = bp;
+ const type_smob *a = (const type_smob *) ap;
+ const type_smob *b = (const type_smob *) bp;
return (a->type == b->type
&& a->type != NULL);
@@ -170,7 +170,7 @@ tyscm_type_map (struct type *type)
if (objfile == NULL)
return global_types_map;
- htab = objfile_data (objfile, tyscm_objfile_data_key);
+ htab = (htab_t) objfile_data (objfile, tyscm_objfile_data_key);
if (htab == NULL)
{
htab = gdbscm_create_eqable_gsmob_ptr_map (tyscm_hash_type_smob,
@@ -353,7 +353,7 @@ static int
tyscm_copy_type_recursive (void **slot, void *info)
{
type_smob *t_smob = (type_smob *) *slot;
- htab_t copied_types = info;
+ htab_t copied_types = (htab_t) info;
struct objfile *objfile = TYPE_OBJFILE (t_smob->type);
htab_t htab;
eqable_gdb_smob **new_slot;
@@ -388,7 +388,7 @@ tyscm_copy_type_recursive (void **slot, void *info)
static void
save_objfile_types (struct objfile *objfile, void *datum)
{
- htab_t htab = datum;
+ htab_t htab = (htab_t) datum;
htab_t copied_types;
if (!gdb_scheme_initialized)
diff --git a/gdb/guile/scm-utils.c b/gdb/guile/scm-utils.c
index 6d67651..b170727 100644
--- a/gdb/guile/scm-utils.c
+++ b/gdb/guile/scm-utils.c
@@ -201,7 +201,7 @@ extract_arg (char format_char, SCM arg, void *argp,
{
case 's':
{
- char **arg_ptr = argp;
+ char **arg_ptr = (char **) argp;
CHECK_TYPE (gdbscm_is_true (scm_string_p (arg)), arg, position,
func_name, _("string"));
@@ -210,7 +210,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 't':
{
- int *arg_ptr = argp;
+ int *arg_ptr = (int *) argp;
/* While in Scheme, anything non-#f is "true", we're strict. */
CHECK_TYPE (gdbscm_is_bool (arg), arg, position, func_name,
@@ -220,7 +220,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 'i':
{
- int *arg_ptr = argp;
+ int *arg_ptr = (int *) argp;
CHECK_TYPE (scm_is_signed_integer (arg, INT_MIN, INT_MAX),
arg, position, func_name, _("int"));
@@ -229,7 +229,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 'u':
{
- int *arg_ptr = argp;
+ int *arg_ptr = (int *) argp;
CHECK_TYPE (scm_is_unsigned_integer (arg, 0, UINT_MAX),
arg, position, func_name, _("unsigned int"));
@@ -238,7 +238,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 'l':
{
- long *arg_ptr = argp;
+ long *arg_ptr = (long *) argp;
CHECK_TYPE (scm_is_signed_integer (arg, LONG_MIN, LONG_MAX),
arg, position, func_name, _("long"));
@@ -247,7 +247,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 'n':
{
- unsigned long *arg_ptr = argp;
+ unsigned long *arg_ptr = (unsigned long *) argp;
CHECK_TYPE (scm_is_unsigned_integer (arg, 0, ULONG_MAX),
arg, position, func_name, _("unsigned long"));
@@ -256,7 +256,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 'L':
{
- LONGEST *arg_ptr = argp;
+ LONGEST *arg_ptr = (LONGEST *) argp;
CHECK_TYPE (scm_is_signed_integer (arg, INT64_MIN, INT64_MAX),
arg, position, func_name, _("LONGEST"));
@@ -265,7 +265,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 'U':
{
- ULONGEST *arg_ptr = argp;
+ ULONGEST *arg_ptr = (ULONGEST *) argp;
CHECK_TYPE (scm_is_unsigned_integer (arg, 0, UINT64_MAX),
arg, position, func_name, _("ULONGEST"));
@@ -274,7 +274,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 'O':
{
- SCM *arg_ptr = argp;
+ SCM *arg_ptr = (SCM *) argp;
*arg_ptr = arg;
break;
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index a8cfc52..f4b97c1 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -432,7 +432,7 @@ h8300_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR current_pc;
if (*this_cache)
- return *this_cache;
+ return (struct h8300_frame_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct h8300_frame_cache);
h8300_init_frame_cache (gdbarch, cache);
diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c
index 6dc2e84..0b05c37 100644
--- a/gdb/hppa-linux-tdep.c
+++ b/gdb/hppa-linux-tdep.c
@@ -205,7 +205,7 @@ hppa_linux_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
int i;
if (*this_cache)
- return *this_cache;
+ return (struct hppa_linux_sigtramp_unwind_cache *) *this_cache;
info = FRAME_OBSTACK_ZALLOC (struct hppa_linux_sigtramp_unwind_cache);
*this_cache = info;
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index cf894ee..27d9ebc 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -223,8 +223,8 @@ hppa_init_objfile_priv_data (struct objfile *objfile)
static int
compare_unwind_entries (const void *arg1, const void *arg2)
{
- const struct unwind_table_entry *a = arg1;
- const struct unwind_table_entry *b = arg2;
+ const struct unwind_table_entry *a = (const struct unwind_table_entry *) arg1;
+ const struct unwind_table_entry *b = (const struct unwind_table_entry *) arg2;
if (a->region_start > b->region_start)
return 1;
@@ -504,14 +504,18 @@ find_unwind_entry (CORE_ADDR pc)
{
struct hppa_unwind_info *ui;
ui = NULL;
- priv = objfile_data (objfile, hppa_objfile_priv_data);
+ priv =
+ (struct hppa_objfile_private *) objfile_data (objfile,
+ hppa_objfile_priv_data);
if (priv)
ui = ((struct hppa_objfile_private *) priv)->unwind_info;
if (!ui)
{
read_unwind_info (objfile);
- priv = objfile_data (objfile, hppa_objfile_priv_data);
+ priv =
+ (struct hppa_objfile_private *) objfile_data (objfile,
+ hppa_objfile_priv_data);
if (priv == NULL)
error (_("Internal error reading unwind information."));
ui = ((struct hppa_objfile_private *) priv)->unwind_info;
@@ -1904,7 +1908,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache)
if (hppa_debug)
fprintf_unfiltered (gdb_stdlog, "base=%s (cached) }",
paddress (gdbarch, ((struct hppa_frame_cache *)*this_cache)->base));
- return (*this_cache);
+ return (struct hppa_frame_cache *) (*this_cache);
}
cache = FRAME_OBSTACK_ZALLOC (struct hppa_frame_cache);
(*this_cache) = cache;
@@ -1916,7 +1920,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache)
{
if (hppa_debug)
fprintf_unfiltered (gdb_stdlog, "base=NULL (no unwind entry) }");
- return (*this_cache);
+ return (struct hppa_frame_cache *) (*this_cache);
}
/* Turn the Entry_GR field into a bitmask. */
@@ -2006,7 +2010,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache)
{
error (_("Cannot read instruction at %s."),
paddress (gdbarch, pc));
- return (*this_cache);
+ return (struct hppa_frame_cache *) (*this_cache);
}
inst = extract_unsigned_integer (buf4, sizeof buf4, byte_order);
@@ -2279,7 +2283,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache)
if (hppa_debug)
fprintf_unfiltered (gdb_stdlog, "base=%s }",
paddress (gdbarch, ((struct hppa_frame_cache *)*this_cache)->base));
- return (*this_cache);
+ return (struct hppa_frame_cache *) (*this_cache);
}
static void
@@ -2453,7 +2457,7 @@ hppa_stub_frame_unwind_cache (struct frame_info *this_frame,
struct unwind_table_entry *u;
if (*this_cache)
- return *this_cache;
+ return (struct hppa_stub_unwind_cache *) *this_cache;
info = FRAME_OBSTACK_ZALLOC (struct hppa_stub_unwind_cache);
*this_cache = info;
diff --git a/gdb/hppanbsd-tdep.c b/gdb/hppanbsd-tdep.c
index 767db62..33ae55a 100644
--- a/gdb/hppanbsd-tdep.c
+++ b/gdb/hppanbsd-tdep.c
@@ -165,7 +165,7 @@ hppanbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
gdb_assert (len >= HPPANBSD_SIZEOF_GREGS);
diff --git a/gdb/hppaobsd-tdep.c b/gdb/hppaobsd-tdep.c
index c9bc1bf..1f5278d 100644
--- a/gdb/hppaobsd-tdep.c
+++ b/gdb/hppaobsd-tdep.c
@@ -44,7 +44,7 @@ hppaobsd_supply_gregset (const struct regset *regset,
int regnum, const void *gregs, size_t len)
{
gdb_byte zero[4] = { 0 };
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
size_t offset;
int i;
@@ -114,7 +114,7 @@ hppaobsd_supply_fpregset (const struct regset *regset,
int regnum, const void *fpregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- const gdb_byte *regs = fpregs;
+ const gdb_byte *regs = (const gdb_byte *) fpregs;
int i;
gdb_assert (len >= HPPAOBSD_SIZEOF_FPREGS);
diff --git a/gdb/i386-cygwin-tdep.c b/gdb/i386-cygwin-tdep.c
index cb70258..1c9dc91 100644
--- a/gdb/i386-cygwin-tdep.c
+++ b/gdb/i386-cygwin-tdep.c
@@ -98,7 +98,7 @@ struct cpms_data
static void
core_process_module_section (bfd *abfd, asection *sect, void *obj)
{
- struct cpms_data *data = obj;
+ struct cpms_data *data = (struct cpms_data *) obj;
enum bfd_endian byte_order = gdbarch_byte_order (data->gdbarch);
char *module_name;
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 898beda..486ad16 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -745,7 +745,8 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
const struct target_desc *tdesc = info.target_desc;
- struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info;
+ struct tdesc_arch_data *tdesc_data =
+ (struct tdesc_arch_data *) info.tdep_info;
const struct tdesc_feature *feature;
int valid_p;
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index d4df18e..2ac2f15 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -2050,7 +2050,7 @@ i386_frame_cache (struct frame_info *this_frame, void **this_cache)
struct i386_frame_cache *cache;
if (*this_cache)
- return *this_cache;
+ return (struct i386_frame_cache *) *this_cache;
cache = i386_alloc_frame_cache ();
*this_cache = cache;
@@ -2220,7 +2220,7 @@ i386_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR sp;
if (*this_cache)
- return *this_cache;
+ return (struct i386_frame_cache *) *this_cache;
cache = i386_alloc_frame_cache ();
*this_cache = cache;
@@ -2407,7 +2407,7 @@ i386_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
gdb_byte buf[4];
if (*this_cache)
- return *this_cache;
+ return (struct i386_frame_cache *) *this_cache;
cache = i386_alloc_frame_cache ();
@@ -3732,7 +3732,7 @@ i386_supply_gregset (const struct regset *regset, struct regcache *regcache,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
gdb_assert (len >= tdep->sizeof_gregset);
@@ -3757,7 +3757,7 @@ i386_collect_gregset (const struct regset *regset,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- gdb_byte *regs = gregs;
+ gdb_byte *regs = (gdb_byte *) gregs;
int i;
gdb_assert (len >= tdep->sizeof_gregset);
@@ -8478,7 +8478,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_insn_is_jump (gdbarch, i386_insn_is_jump);
/* Hook in ABI-specific overrides, if they have been registered. */
- info.tdep_info = (void *) tdesc_data;
+ info.tdep_info = (struct gdbarch_tdep_info *) tdesc_data;
gdbarch_init_osabi (info, gdbarch);
if (!i386_validate_tdesc_p (tdep, tdesc_data))
diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c
index f344a97..8684b07 100644
--- a/gdb/i386obsd-tdep.c
+++ b/gdb/i386obsd-tdep.c
@@ -141,7 +141,7 @@ i386obsd_aout_supply_regset (const struct regset *regset,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- const gdb_byte *gregs = regs;
+ const gdb_byte *gregs = (const gdb_byte *) regs;
gdb_assert (len >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE);
@@ -348,7 +348,7 @@ i386obsd_trapframe_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
*this_cache = cache;
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index ad9fa08..9bc45fb 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -449,7 +449,7 @@ i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- const gdb_byte *regs = fsave;
+ const gdb_byte *regs = (const gdb_byte *) fsave;
int i;
gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
@@ -502,7 +502,7 @@ void
i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
- gdb_byte *regs = fsave;
+ gdb_byte *regs = (gdb_byte *) fsave;
int i;
gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
@@ -595,7 +595,7 @@ void
i387_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
- const gdb_byte *regs = fxsave;
+ const gdb_byte *regs = (const gdb_byte *) fxsave;
int i;
gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
@@ -678,7 +678,7 @@ void
i387_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
- gdb_byte *regs = fxsave;
+ gdb_byte *regs = (gdb_byte *) fxsave;
int i;
gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
@@ -896,7 +896,7 @@ i387_supply_xsave (struct regcache *regcache, int regnum,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- const gdb_byte *regs = xsave;
+ const gdb_byte *regs = (const gdb_byte *) xsave;
int i;
unsigned int clear_bv;
static const gdb_byte zero[MAX_REGISTER_SIZE] = { 0 };
@@ -1269,7 +1269,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- gdb_byte *regs = xsave;
+ gdb_byte *regs = (gdb_byte *) xsave;
int i;
enum
{
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index a468be9..46a114c 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -1853,7 +1853,7 @@ ia64_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR cfm, psr;
if (*this_cache)
- return *this_cache;
+ return (struct ia64_frame_cache *) *this_cache;
cache = ia64_alloc_frame_cache ();
*this_cache = cache;
@@ -2240,7 +2240,7 @@ ia64_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
gdb_byte buf[8];
if (*this_cache)
- return *this_cache;
+ return (struct ia64_frame_cache *) *this_cache;
cache = ia64_alloc_frame_cache ();
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 4713490..925a502 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -2690,7 +2690,8 @@ struct attach_command_continuation_args
static void
attach_command_continuation (void *args, int err)
{
- struct attach_command_continuation_args *a = args;
+ struct attach_command_continuation_args *a =
+ (struct attach_command_continuation_args *) args;
if (err)
return;
@@ -2701,7 +2702,8 @@ attach_command_continuation (void *args, int err)
static void
attach_command_continuation_free_args (void *args)
{
- struct attach_command_continuation_args *a = args;
+ struct attach_command_continuation_args *a =
+ (struct attach_command_continuation_args *) args;
xfree (a->args);
xfree (a);
diff --git a/gdb/inferior.c b/gdb/inferior.c
index 04e9a28..53b0667 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -74,7 +74,7 @@ set_current_inferior (struct inferior *inf)
static void
restore_inferior (void *arg)
{
- struct inferior *saved_inferior = arg;
+ struct inferior *saved_inferior = (struct inferior *) arg;
set_current_inferior (saved_inferior);
}
@@ -171,7 +171,8 @@ struct delete_thread_of_inferior_arg
static int
delete_thread_of_inferior (struct thread_info *tp, void *data)
{
- struct delete_thread_of_inferior_arg *arg = data;
+ struct delete_thread_of_inferior_arg *arg =
+ (struct delete_thread_of_inferior_arg *) data;
if (ptid_get_pid (tp->ptid) == arg->pid)
{
diff --git a/gdb/inflow.c b/gdb/inflow.c
index cdc47a0..d38a43d 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -506,7 +506,7 @@ static const struct inferior_data *inflow_inferior_data;
static void
inflow_inferior_data_cleanup (struct inferior *inf, void *arg)
{
- struct terminal_info *info = arg;
+ struct terminal_info *info = (struct terminal_info *) arg;
xfree (info->run_terminal);
xfree (info->ttystate);
@@ -521,7 +521,7 @@ get_inflow_inferior_data (struct inferior *inf)
{
struct terminal_info *info;
- info = inferior_data (inf, inflow_inferior_data);
+ info = (struct terminal_info *) inferior_data (inf, inflow_inferior_data);
if (info == NULL)
{
info = XCNEW (struct terminal_info);
@@ -542,7 +542,7 @@ inflow_inferior_exit (struct inferior *inf)
{
struct terminal_info *info;
- info = inferior_data (inf, inflow_inferior_data);
+ info = (struct terminal_info *) inferior_data (inf, inflow_inferior_data);
if (info != NULL)
{
xfree (info->run_terminal);
diff --git a/gdb/infrun.c b/gdb/infrun.c
index ec88621..d2588f2 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1692,7 +1692,8 @@ displaced_step_clear (struct displaced_step_inferior_state *displaced)
static void
displaced_step_clear_cleanup (void *arg)
{
- struct displaced_step_inferior_state *state = arg;
+ struct displaced_step_inferior_state *state =
+ (struct displaced_step_inferior_state *) arg;
displaced_step_clear (state);
}
@@ -7835,7 +7836,7 @@ print_stop_location (struct target_waitstatus *ws)
static void
restore_current_uiout_cleanup (void *arg)
{
- struct ui_out *saved_uiout = arg;
+ struct ui_out *saved_uiout = (struct ui_out *) arg;
current_uiout = saved_uiout;
}
@@ -7941,7 +7942,7 @@ save_stop_context (void)
static void
release_stop_context_cleanup (void *arg)
{
- struct stop_context *sc = arg;
+ struct stop_context *sc = (struct stop_context *) arg;
if (sc->thread != NULL)
sc->thread->refcount--;
@@ -8727,7 +8728,7 @@ restore_infcall_suspend_state (struct infcall_suspend_state *inf_state)
static void
do_restore_infcall_suspend_state_cleanup (void *state)
{
- restore_infcall_suspend_state (state);
+ restore_infcall_suspend_state ((struct infcall_suspend_state *) state);
}
struct cleanup *
@@ -8869,7 +8870,7 @@ restore_infcall_control_state (struct infcall_control_state *inf_status)
static void
do_restore_infcall_control_state_cleanup (void *sts)
{
- restore_infcall_control_state (sts);
+ restore_infcall_control_state ((struct infcall_control_state *) sts);
}
struct cleanup *
@@ -8903,7 +8904,7 @@ discard_infcall_control_state (struct infcall_control_state *inf_status)
static void
restore_inferior_ptid (void *arg)
{
- ptid_t *saved_ptid_ptr = arg;
+ ptid_t *saved_ptid_ptr = (ptid_t *) arg;
inferior_ptid = *saved_ptid_ptr;
xfree (arg);
diff --git a/gdb/inline-frame.c b/gdb/inline-frame.c
index e5d7360..aa041d9 100644
--- a/gdb/inline-frame.c
+++ b/gdb/inline-frame.c
@@ -283,7 +283,7 @@ block_starting_point_at (CORE_ADDR pc, const struct block *block)
if (BLOCKVECTOR_MAP (bv) == NULL)
return 0;
- new_block = addrmap_find (BLOCKVECTOR_MAP (bv), pc - 1);
+ new_block = (struct block *) addrmap_find (BLOCKVECTOR_MAP (bv), pc - 1);
if (new_block == NULL)
return 1;
diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c
index f979591..efeb244 100644
--- a/gdb/iq2000-tdep.c
+++ b/gdb/iq2000-tdep.c
@@ -372,7 +372,7 @@ iq2000_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct iq2000_frame_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct iq2000_frame_cache);
iq2000_init_frame_cache (cache);
diff --git a/gdb/jit.c b/gdb/jit.c
index a37e605..3eeb35f 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -285,7 +285,7 @@ get_jit_objfile_data (struct objfile *objf)
{
struct jit_objfile_data *objf_data;
- objf_data = objfile_data (objf, jit_objfile_data);
+ objf_data = (struct jit_objfile_data *) objfile_data (objf, jit_objfile_data);
if (objf_data == NULL)
{
objf_data = XCNEW (struct jit_objfile_data);
@@ -315,7 +315,9 @@ get_jit_program_space_data (void)
{
struct jit_program_space_data *ps_data;
- ps_data = program_space_data (current_program_space, jit_program_space_data);
+ ps_data =
+ ((struct jit_program_space_data *)
+ program_space_data (current_program_space, jit_program_space_data));
if (ps_data == NULL)
{
ps_data = XCNEW (struct jit_program_space_data);
@@ -791,7 +793,7 @@ jit_object_close_impl (struct gdb_symbol_callbacks *cb,
struct objfile *objfile;
jit_dbg_reader_data *priv_data;
- priv_data = cb->priv_data;
+ priv_data = (jit_dbg_reader_data *) cb->priv_data;
objfile = allocate_objfile (NULL, "<< JIT compiled code >>",
OBJF_NOT_FILENAME);
@@ -989,7 +991,8 @@ jit_find_objf_with_entry_addr (CORE_ADDR entry_addr)
{
struct jit_objfile_data *objf_data;
- objf_data = objfile_data (objf, jit_objfile_data);
+ objf_data =
+ (struct jit_objfile_data *) objfile_data (objf, jit_objfile_data);
if (objf_data != NULL && objf_data->addr == entry_addr)
return objf;
}
@@ -1011,7 +1014,8 @@ jit_breakpoint_deleted (struct breakpoint *b)
{
struct jit_program_space_data *ps_data;
- ps_data = program_space_data (iter->pspace, jit_program_space_data);
+ ps_data = ((struct jit_program_space_data *)
+ program_space_data (iter->pspace, jit_program_space_data));
if (ps_data != NULL && ps_data->jit_breakpoint == iter->owner)
{
ps_data->cached_code_address = 0;
@@ -1100,7 +1104,7 @@ jit_unwind_reg_set_impl (struct gdb_unwind_callbacks *cb, int dwarf_regnum,
struct jit_unwind_private *priv;
int gdb_reg;
- priv = cb->priv_data;
+ priv = (struct jit_unwind_private *) cb->priv_data;
gdb_reg = gdbarch_dwarf2_reg_to_regnum (get_frame_arch (priv->this_frame),
dwarf_regnum);
@@ -1133,7 +1137,7 @@ jit_unwind_reg_get_impl (struct gdb_unwind_callbacks *cb, int regnum)
int gdb_reg, size;
struct gdbarch *frame_arch;
- priv = cb->priv_data;
+ priv = (struct jit_unwind_private *) cb->priv_data;
frame_arch = get_frame_arch (priv->this_frame);
gdb_reg = gdbarch_dwarf2_reg_to_regnum (frame_arch, regnum);
@@ -1153,7 +1157,7 @@ jit_unwind_reg_get_impl (struct gdb_unwind_callbacks *cb, int regnum)
static void
jit_dealloc_cache (struct frame_info *this_frame, void *cache)
{
- struct jit_unwind_private *priv_data = cache;
+ struct jit_unwind_private *priv_data = (struct jit_unwind_private *) cache;
struct gdbarch *frame_arch;
int i;
@@ -1196,7 +1200,7 @@ jit_frame_sniffer (const struct frame_unwind *self,
gdb_assert (!*cache);
*cache = XCNEW (struct jit_unwind_private);
- priv_data = *cache;
+ priv_data = (struct jit_unwind_private *) *cache;
priv_data->registers =
XCNEWVEC (struct gdb_reg_value *,
gdbarch_num_regs (get_frame_arch (this_frame)));
@@ -1258,7 +1262,7 @@ jit_frame_this_id (struct frame_info *this_frame, void **cache,
static struct value *
jit_frame_prev_register (struct frame_info *this_frame, void **cache, int reg)
{
- struct jit_unwind_private *priv = *cache;
+ struct jit_unwind_private *priv = (struct jit_unwind_private *) *cache;
struct gdb_reg_value *value;
if (priv == NULL)
@@ -1303,7 +1307,8 @@ jit_prepend_unwinder (struct gdbarch *gdbarch)
{
struct jit_gdbarch_data_type *data;
- data = gdbarch_data (gdbarch, jit_gdbarch_data);
+ data =
+ (struct jit_gdbarch_data_type *) gdbarch_data (gdbarch, jit_gdbarch_data);
if (!data->unwinder_registered)
{
frame_unwind_prepend_unwinder (gdbarch, &jit_frame_unwind);
@@ -1391,8 +1396,8 @@ jit_inferior_exit_hook (struct inferior *inf)
ALL_OBJFILES_SAFE (objf, temp)
{
- struct jit_objfile_data *objf_data = objfile_data (objf,
- jit_objfile_data);
+ struct jit_objfile_data *objf_data =
+ (struct jit_objfile_data *) objfile_data (objf, jit_objfile_data);
if (objf_data != NULL && objf_data->addr != 0)
jit_unregister_code (objf);
@@ -1443,13 +1448,15 @@ jit_event_handler (struct gdbarch *gdbarch)
static void
free_objfile_data (struct objfile *objfile, void *data)
{
- struct jit_objfile_data *objf_data = data;
+ struct jit_objfile_data *objf_data = (struct jit_objfile_data *) data;
if (objf_data->register_code != NULL)
{
struct jit_program_space_data *ps_data;
- ps_data = program_space_data (objfile->pspace, jit_program_space_data);
+ ps_data =
+ ((struct jit_program_space_data *)
+ program_space_data (objfile->pspace, jit_program_space_data));
if (ps_data != NULL && ps_data->objfile == objfile)
ps_data->objfile = NULL;
}
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c
index 43e2c6b..7589939 100644
--- a/gdb/jv-lang.c
+++ b/gdb/jv-lang.c
@@ -79,11 +79,12 @@ struct jv_per_objfile_data
static void
jv_per_objfile_free (struct objfile *objfile, void *data)
{
- struct jv_per_objfile_data *jv_data = data;
+ struct jv_per_objfile_data *jv_data = (struct jv_per_objfile_data *) data;
struct objfile *dynamics_objfile;
- dynamics_objfile = program_space_data (current_program_space,
- jv_dynamics_progspace_key);
+ dynamics_objfile =
+ (struct objfile *) program_space_data (current_program_space,
+ jv_dynamics_progspace_key);
gdb_assert (objfile == dynamics_objfile);
if (jv_data->dict)
@@ -106,8 +107,9 @@ get_dynamics_objfile (struct gdbarch *gdbarch)
{
struct objfile *dynamics_objfile;
- dynamics_objfile = program_space_data (current_program_space,
- jv_dynamics_progspace_key);
+ dynamics_objfile =
+ (struct objfile *) program_space_data (current_program_space,
+ jv_dynamics_progspace_key);
if (dynamics_objfile == NULL)
{
@@ -165,7 +167,8 @@ get_java_class_symtab (struct gdbarch *gdbarch)
BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK) = bl;
/* Arrange to free the dict. */
- jv_data = objfile_data (objfile, jv_dynamics_objfile_data_key);
+ jv_data = ((struct jv_per_objfile_data *)
+ objfile_data (objfile, jv_dynamics_objfile_data_key));
jv_data->dict = BLOCK_DICT (bl);
}
return class_symtab;
@@ -1236,7 +1239,8 @@ static struct gdbarch_data *java_type_data;
const struct builtin_java_type *
builtin_java_type (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, java_type_data);
+ return ((const struct builtin_java_type *)
+ gdbarch_data (gdbarch, java_type_data));
}
void
diff --git a/gdb/language.c b/gdb/language.c
index b6fe77e..5c34412 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -975,8 +975,8 @@ struct type *
language_string_char_type (const struct language_defn *la,
struct gdbarch *gdbarch)
{
- struct language_gdbarch *ld = gdbarch_data (gdbarch,
- language_gdbarch_data);
+ struct language_gdbarch *ld =
+ (struct language_gdbarch *) gdbarch_data (gdbarch, language_gdbarch_data);
return ld->arch_info[la->la_language].string_char_type;
}
@@ -985,8 +985,8 @@ struct type *
language_bool_type (const struct language_defn *la,
struct gdbarch *gdbarch)
{
- struct language_gdbarch *ld = gdbarch_data (gdbarch,
- language_gdbarch_data);
+ struct language_gdbarch *ld =
+ (struct language_gdbarch *) gdbarch_data (gdbarch, language_gdbarch_data);
if (ld->arch_info[la->la_language].bool_type_symbol)
{
@@ -1029,8 +1029,8 @@ language_lookup_primitive_type (const struct language_defn *la,
struct gdbarch *gdbarch,
const char *name)
{
- struct language_gdbarch *ld = gdbarch_data (gdbarch,
- language_gdbarch_data);
+ struct language_gdbarch *ld =
+ (struct language_gdbarch *) gdbarch_data (gdbarch, language_gdbarch_data);
struct type **typep;
typep = language_lookup_primitive_type_1 (&ld->arch_info[la->la_language],
@@ -1106,8 +1106,8 @@ language_lookup_primitive_type_as_symbol (const struct language_defn *la,
struct gdbarch *gdbarch,
const char *name)
{
- struct language_gdbarch *ld = gdbarch_data (gdbarch,
- language_gdbarch_data);
+ struct language_gdbarch *ld =
+ (struct language_gdbarch *) gdbarch_data (gdbarch, language_gdbarch_data);
struct language_arch_info *lai = &ld->arch_info[la->la_language];
struct type **typep;
struct symbol *sym;
diff --git a/gdb/linespec.c b/gdb/linespec.c
index a61b08a..4f9604a 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -868,7 +868,7 @@ add_sal_to_sals (struct linespec_state *self,
static hashval_t
hash_address_entry (const void *p)
{
- const struct address_entry *aep = p;
+ const struct address_entry *aep = (const struct address_entry *) p;
hashval_t hash;
hash = iterative_hash_object (aep->pspace, 0);
@@ -880,8 +880,8 @@ hash_address_entry (const void *p)
static int
eq_address_entry (const void *a, const void *b)
{
- const struct address_entry *aea = a;
- const struct address_entry *aeb = b;
+ const struct address_entry *aea = (const struct address_entry *) a;
+ const struct address_entry *aeb = (const struct address_entry *) b;
return aea->pspace == aeb->pspace && aea->addr == aeb->addr;
}
@@ -929,7 +929,8 @@ iterate_inline_only (struct symbol *sym, void *d)
{
if (SYMBOL_INLINED (sym))
{
- struct symbol_and_data_callback *cad = d;
+ struct symbol_and_data_callback *cad =
+ (struct symbol_and_data_callback *) d;
return cad->callback (sym, cad->data);
}
@@ -953,7 +954,8 @@ struct symbol_matcher_data
static int
iterate_name_matcher (const char *name, void *d)
{
- const struct symbol_matcher_data *data = d;
+ const struct symbol_matcher_data *data =
+ (const struct symbol_matcher_data *) d;
if (data->symbol_name_cmp (name, data->lookup_name) == 0)
return 1; /* Expand this symbol's symbol table. */
@@ -1294,8 +1296,8 @@ struct decode_line_2_item
static int
decode_line_2_compare_items (const void *ap, const void *bp)
{
- const struct decode_line_2_item *a = ap;
- const struct decode_line_2_item *b = bp;
+ const struct decode_line_2_item *a = (const struct decode_line_2_item *) ap;
+ const struct decode_line_2_item *b = (const struct decode_line_2_item *) bp;
int retval;
retval = strcmp (a->displayform, b->displayform);
@@ -2809,7 +2811,8 @@ struct decode_compound_collector
static int
collect_one_symbol (struct symbol *sym, void *d)
{
- struct decode_compound_collector *collector = d;
+ struct decode_compound_collector *collector =
+ (struct decode_compound_collector *) d;
void **slot;
struct type *t;
@@ -2889,8 +2892,8 @@ lookup_prefix_sym (struct linespec_state *state, VEC (symtab_ptr) *file_symtabs,
static int
compare_symbols (const void *a, const void *b)
{
- struct symbol * const *sa = a;
- struct symbol * const *sb = b;
+ struct symbol * const *sa = (struct symbol * const*) a;
+ struct symbol * const *sb = (struct symbol * const*) b;
uintptr_t uia, uib;
uia = (uintptr_t) SYMTAB_PSPACE (symbol_symtab (*sa));
@@ -2917,8 +2920,10 @@ compare_symbols (const void *a, const void *b)
static int
compare_msymbols (const void *a, const void *b)
{
- const struct bound_minimal_symbol *sa = a;
- const struct bound_minimal_symbol *sb = b;
+ const struct bound_minimal_symbol *sa =
+ (const struct bound_minimal_symbol *) a;
+ const struct bound_minimal_symbol *sb =
+ (const struct bound_minimal_symbol *) b;
uintptr_t uia, uib;
uia = (uintptr_t) sa->objfile->pspace;
@@ -3099,7 +3104,7 @@ struct symtab_collector
static int
add_symtabs_to_list (struct symtab *symtab, void *d)
{
- struct symtab_collector *data = d;
+ struct symtab_collector *data = (struct symtab_collector *) d;
void **slot;
slot = htab_find_slot (data->symtab_table, symtab, INSERT);
@@ -3522,7 +3527,7 @@ linespec_parse_variable (struct linespec_state *self, const char *variable)
static int
collect_symbols (struct symbol *sym, void *data)
{
- struct collect_info *info = data;
+ struct collect_info *info = (struct collect_info *) data;
/* In list mode, add all matching symbols, regardless of class.
This allows the user to type "list a_global_variable". */
@@ -3630,8 +3635,8 @@ classify_mtype (enum minimal_symbol_type t)
static int
compare_msyms (const void *a, const void *b)
{
- const bound_minimal_symbol_d *moa = a;
- const bound_minimal_symbol_d *mob = b;
+ const bound_minimal_symbol_d *moa = (const bound_minimal_symbol_d *) a;
+ const bound_minimal_symbol_d *mob = (const bound_minimal_symbol_d *) b;
enum minimal_symbol_type ta = MSYMBOL_TYPE (moa->minsym);
enum minimal_symbol_type tb = MSYMBOL_TYPE (mob->minsym);
@@ -3644,7 +3649,7 @@ compare_msyms (const void *a, const void *b)
static void
add_minsym (struct minimal_symbol *minsym, void *d)
{
- struct collect_minsyms *info = d;
+ struct collect_minsyms *info = (struct collect_minsyms *) d;
bound_minimal_symbol_d mo;
mo.minsym = minsym;
@@ -3898,7 +3903,7 @@ destroy_linespec_result (struct linespec_result *ls)
static void
cleanup_linespec_result (void *a)
{
- destroy_linespec_result (a);
+ destroy_linespec_result ((struct linespec_result *) a);
}
/* See the comment in linespec.h. */
diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c
index fdea247..9a469d4 100644
--- a/gdb/linux-fork.c
+++ b/gdb/linux-fork.c
@@ -415,7 +415,7 @@ linux_fork_detach (const char *args, int from_tty)
static void
inferior_call_waitpid_cleanup (void *fp)
{
- struct fork_info *oldfp = fp;
+ struct fork_info *oldfp = (struct fork_info *) fp;
if (oldfp)
{
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index c6dbc01..6423ecc 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -438,7 +438,7 @@ num_lwps (int pid)
static void
delete_lwp_cleanup (void *lp_voidp)
{
- struct lwp_info *lp = lp_voidp;
+ struct lwp_info *lp = (struct lwp_info *) lp_voidp;
delete_lwp (lp->ptid);
}
@@ -2719,7 +2719,7 @@ running_callback (struct lwp_info *lp, void *data)
static int
count_events_callback (struct lwp_info *lp, void *data)
{
- int *count = data;
+ int *count = (int *) data;
gdb_assert (count != NULL);
@@ -2758,7 +2758,7 @@ lwp_status_pending_p (struct lwp_info *lp)
static int
select_event_lwp_callback (struct lwp_info *lp, void *data)
{
- int *selector = data;
+ int *selector = (int *) data;
gdb_assert (selector != NULL);
@@ -3641,7 +3641,7 @@ linux_nat_wait_1 (struct target_ops *ops,
static int
resume_stopped_resumed_lwps (struct lwp_info *lp, void *data)
{
- ptid_t *wait_ptid_p = data;
+ ptid_t *wait_ptid_p = (ptid_t *) data;
if (!lp->stopped)
{
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index 86d9eef..d8024c0 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -171,7 +171,8 @@ init_linux_gdbarch_data (struct gdbarch *gdbarch)
static struct linux_gdbarch_data *
get_linux_gdbarch_data (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, linux_gdbarch_data_handle);
+ return ((struct linux_gdbarch_data *)
+ gdbarch_data (gdbarch, linux_gdbarch_data_handle));
}
/* Per-inferior data key. */
@@ -203,7 +204,7 @@ invalidate_linux_cache_inf (struct inferior *inf)
{
struct linux_info *info;
- info = inferior_data (inf, linux_inferior_data);
+ info = (struct linux_info *) inferior_data (inf, linux_inferior_data);
if (info != NULL)
{
xfree (info);
@@ -230,7 +231,7 @@ get_linux_inferior_data (void)
struct linux_info *info;
struct inferior *inf = current_inferior ();
- info = inferior_data (inf, linux_inferior_data);
+ info = (struct linux_info *) inferior_data (inf, linux_inferior_data);
if (info == NULL)
{
info = XCNEW (struct linux_info);
@@ -1306,7 +1307,8 @@ linux_find_memory_regions_thunk (ULONGEST vaddr, ULONGEST size,
int read, int write, int exec, int modified,
const char *filename, void *arg)
{
- struct linux_find_memory_regions_data *data = arg;
+ struct linux_find_memory_regions_data *data =
+ (struct linux_find_memory_regions_data *) arg;
return data->func (vaddr, size, read, write, exec, modified, data->obfd);
}
@@ -1454,7 +1456,8 @@ linux_make_mappings_callback (ULONGEST vaddr, ULONGEST size,
int read, int write, int exec, int modified,
const char *filename, void *data)
{
- struct linux_make_mappings_data *map_data = data;
+ struct linux_make_mappings_data *map_data =
+ (struct linux_make_mappings_data *) data;
gdb_byte buf[sizeof (ULONGEST)];
if (*filename == '\0' || inode == 0)
@@ -1665,7 +1668,8 @@ struct linux_corefile_thread_data
static int
linux_corefile_thread_callback (struct thread_info *info, void *data)
{
- struct linux_corefile_thread_data *args = data;
+ struct linux_corefile_thread_data *args =
+ (struct linux_corefile_thread_data *) data;
/* It can be current thread
which cannot be removed by update_thread_list. */
@@ -2252,7 +2256,7 @@ find_mapping_size (CORE_ADDR vaddr, unsigned long size,
int read, int write, int exec, int modified,
void *data)
{
- struct mem_range *range = data;
+ struct mem_range *range = (struct mem_range *) data;
if (vaddr == range->start)
{
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 91bd0dc..66e9595 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1566,7 +1566,7 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
td_err_e err;
ptid_t ptid;
struct thread_info *tp;
- struct callback_data *cb_data = data;
+ struct callback_data *cb_data = (struct callback_data *) data;
struct thread_db_info *info = cb_data->info;
err = info->td_thr_get_info_p (th_p, &ti);
diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c
index 779575c..25a7e1e 100644
--- a/gdb/lm32-tdep.c
+++ b/gdb/lm32-tdep.c
@@ -422,7 +422,7 @@ lm32_frame_cache (struct frame_info *this_frame, void **this_prologue_cache)
int i;
if ((*this_prologue_cache))
- return (*this_prologue_cache);
+ return (struct lm32_frame_cache *) (*this_prologue_cache);
info = FRAME_OBSTACK_ZALLOC (struct lm32_frame_cache);
(*this_prologue_cache) = info;
diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c
index fb93c64..2a1e166 100644
--- a/gdb/m2-lang.c
+++ b/gdb/m2-lang.c
@@ -425,7 +425,7 @@ static struct gdbarch_data *m2_type_data;
const struct builtin_m2_type *
builtin_m2_type (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, m2_type_data);
+ return (const struct builtin_m2_type *) gdbarch_data (gdbarch, m2_type_data);
}
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c
index 3b7a585..f2d060a 100644
--- a/gdb/m32c-tdep.c
+++ b/gdb/m32c-tdep.c
@@ -1875,10 +1875,11 @@ m32c_analyze_frame_prologue (struct frame_info *this_frame,
*this_prologue_cache = FRAME_OBSTACK_ZALLOC (struct m32c_prologue);
m32c_analyze_prologue (get_frame_arch (this_frame),
- func_start, stop_addr, *this_prologue_cache);
+ func_start, stop_addr,
+ (struct m32c_prologue *) *this_prologue_cache);
}
- return *this_prologue_cache;
+ return (struct m32c_prologue *) *this_prologue_cache;
}
diff --git a/gdb/m32r-linux-tdep.c b/gdb/m32r-linux-tdep.c
index 83d31fd..4abda5e 100644
--- a/gdb/m32r-linux-tdep.c
+++ b/gdb/m32r-linux-tdep.c
@@ -230,7 +230,7 @@ m32r_linux_sigtramp_frame_cache (struct frame_info *this_frame,
int regnum;
if ((*this_cache) != NULL)
- return (*this_cache);
+ return (struct m32r_frame_cache *) (*this_cache);
cache = FRAME_OBSTACK_ZALLOC (struct m32r_frame_cache);
(*this_cache) = cache;
cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -351,7 +351,7 @@ m32r_linux_supply_gregset (const struct regset *regset,
struct regcache *regcache, int regnum,
const void *gregs, size_t size)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
enum bfd_endian byte_order =
gdbarch_byte_order (get_regcache_arch (regcache));
ULONGEST psw, bbpsw;
@@ -394,7 +394,7 @@ m32r_linux_collect_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs, size_t size)
{
- gdb_byte *regs = gregs;
+ gdb_byte *regs = (gdb_byte *) gregs;
int i;
enum bfd_endian byte_order =
gdbarch_byte_order (get_regcache_arch (regcache));
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index ba93322..9b89ad9 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -540,7 +540,7 @@ m32r_frame_unwind_cache (struct frame_info *this_frame,
if ((*this_prologue_cache))
- return (*this_prologue_cache);
+ return (struct m32r_unwind_cache *) (*this_prologue_cache);
info = FRAME_OBSTACK_ZALLOC (struct m32r_unwind_cache);
(*this_prologue_cache) = info;
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index df7cd0c..a9c425c 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -792,7 +792,7 @@ m68hc11_frame_unwind_cache (struct frame_info *this_frame,
int i;
if ((*this_prologue_cache))
- return (*this_prologue_cache);
+ return (struct m68hc11_unwind_cache *) (*this_prologue_cache);
info = FRAME_OBSTACK_ZALLOC (struct m68hc11_unwind_cache);
(*this_prologue_cache) = info;
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 285a831..01e67b9 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -882,7 +882,7 @@ m68k_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct m68k_frame_cache *) *this_cache;
cache = m68k_alloc_frame_cache ();
*this_cache = cache;
diff --git a/gdb/m68kbsd-tdep.c b/gdb/m68kbsd-tdep.c
index ae0cecf..ff1da70 100644
--- a/gdb/m68kbsd-tdep.c
+++ b/gdb/m68kbsd-tdep.c
@@ -59,7 +59,7 @@ m68kbsd_supply_fpregset (const struct regset *regset,
int regnum, const void *fpregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- const gdb_byte *regs = fpregs;
+ const gdb_byte *regs = (const gdb_byte *) fpregs;
int i;
gdb_assert (len >= M68KBSD_SIZEOF_FPREGS);
@@ -81,7 +81,7 @@ m68kbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
gdb_assert (len >= M68KBSD_SIZEOF_GREGS);
diff --git a/gdb/m68klinux-tdep.c b/gdb/m68klinux-tdep.c
index c60a879..02579b1 100644
--- a/gdb/m68klinux-tdep.c
+++ b/gdb/m68klinux-tdep.c
@@ -263,7 +263,7 @@ m68k_linux_sigtramp_frame_cache (struct frame_info *this_frame,
int i;
if (*this_cache)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c
index abfd082..94ea409 100644
--- a/gdb/m88k-tdep.c
+++ b/gdb/m88k-tdep.c
@@ -652,7 +652,7 @@ m88k_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR frame_sp;
if (*this_cache)
- return *this_cache;
+ return (struct m88k_frame_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct m88k_frame_cache);
cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -782,7 +782,7 @@ m88k_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
for (i = 0; i < M88K_NUM_REGS; i++)
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
index a170f73..8b1298f 100644
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -40,7 +40,7 @@ proc do_steps_and_nexts {} {
# me with GCC 3.1 on i686-pc-linux-gnu when I compile with
# optimization.
gdb_test_multiple "list" "list" {
- -re ".*context = data.*$gdb_prompt $" {
+ -re ".*context = \\(struct captured_main_args \\*\\) data.*$gdb_prompt $" {
set description "step over context initialization"
set command "step"
}
--
2.5.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 3/2] Add some more casts (2/2)
2015-09-23 19:31 [PATCH 2/2] Add some more casts (1/2) Simon Marchi
@ 2015-09-23 19:31 ` Simon Marchi
2015-09-25 13:20 ` Yao Qi
2015-09-25 13:17 ` [PATCH 2/2] Add some more casts (1/2) Yao Qi
1 sibling, 1 reply; 12+ messages in thread
From: Simon Marchi @ 2015-09-23 19:31 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
See previous patch's description.
gdb/ChangeLog:
* macrocmd.c (print_macro_callback): Add cast(s).
* macrotab.c (macro_bcache_str): Likewise.
(new_macro_definition): Likewise.
* main.c (captured_main): Likewise.
* maint.c (print_bfd_section_info): Likewise.
* mdebugread.c (mdebug_build_psymtabs): Likewise.
(basic_type): Likewise.
* memattr.c (mem_region_cmp): Likewise.
* memory-map.c (memory_map_start_memory): Likewise.
(memory_map_end_memory): Likewise.
(memory_map_start_property): Likewise.
(memory_map_end_property): Likewise.
(clear_result): Likewise.
* memrange.c (compare_mem_ranges): Likewise.
* mep-tdep.c (mep_analyze_frame_prologue): Likewise.
* mi/mi-cmd-var.c (mi_cmd_var_update_iter): Likewise.
* mi/mi-console.c (mi_console_file_delete): Likewise.
(mi_console_file_fputs): Likewise.
(mi_console_raw_packet): Likewise.
(mi_console_file_flush): Likewise.
(mi_console_set_raw): Likewise.
* mi/mi-interp.c (mi_interpreter_resume): Likewise.
(mi_new_thread): Likewise.
(mi_thread_exit): Likewise.
(mi_record_changed): Likewise.
(mi_inferior_added): Likewise.
(mi_inferior_appeared): Likewise.
(mi_inferior_exit): Likewise.
(mi_inferior_removed): Likewise.
(mi_interp_data): Likewise.
(mi_on_normal_stop): Likewise.
(mi_traceframe_changed): Likewise.
(mi_tsv_created): Likewise.
(mi_tsv_deleted): Likewise.
(mi_tsv_modified): Likewise.
(mi_breakpoint_created): Likewise.
(mi_breakpoint_deleted): Likewise.
(mi_breakpoint_modified): Likewise.
(mi_output_running_pid): Likewise.
(mi_inferior_count): Likewise.
(mi_solib_loaded): Likewise.
(mi_solib_unloaded): Likewise.
(mi_command_param_changed): Likewise.
(mi_memory_changed): Likewise.
(report_initial_inferior): Likewise.
(mi_ui_out): Likewise.
(mi_set_logging): Likewise.
* mi/mi-main.c (collect_cores): Likewise.
(print_one_inferior): Likewise.
(free_vector_of_ints): Likewise.
(free_splay_tree): Likewise.
(mi_execute_command): Likewise.
* mi/mi-out.c (mi_table_body): Likewise.
(mi_table_end): Likewise.
(mi_table_header): Likewise.
(mi_begin): Likewise.
(mi_end): Likewise.
(mi_field_int): Likewise.
(mi_field_string): Likewise.
(mi_field_fmt): Likewise.
(mi_flush): Likewise.
(mi_redirect): Likewise.
(field_separator): Likewise.
(mi_open): Likewise.
(mi_close): Likewise.
(mi_out_buffered): Likewise.
(mi_out_rewind): Likewise.
(mi_out_put): Likewise.
(mi_version): Likewise.
(mi_out_data_dtor): Likewise.
* mi/mi-parse.c (mi_parse_cleanup): Likewise.
* microblaze-tdep.c (microblaze_frame_cache): Likewise.
* minidebug.c (lzma_open): Likewise.
(lzma_pread): Likewise.
(lzma_close): Likewise.
(lzma_stat): Likewise.
* mips-linux-tdep.c (mips_linux_init_abi): Likewise.
* mips-sde-tdep.c (mips_sde_frame_cache): Likewise.
(mips_sde_elf_osabi_sniff_abi_tag_sections): Likewise.
* mips-tdep.c (mips_insn16_frame_cache): Likewise.
(mips_micro_frame_cache): Likewise.
(mips_insn32_frame_cache): Likewise.
(mips_stub_frame_cache): Likewise.
(gdb_print_insn_mips): Likewise.
(value_of_mips_user_reg): Likewise.
(mips_gdbarch_init): Likewise.
* mips64obsd-tdep.c (mips64obsd_supply_gregset): Likewise.
* mipsnbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
(mipsnbsd_supply_gregset): Likewise.
* mn10300-linux-tdep.c (am33_supply_fpregset_method): Likewise.
(am33_collect_gregset_method): Likewise.
(am33_collect_fpregset_method): Likewise.
* mn10300-tdep.c (mn10300_analyze_frame_prologue): Likewise.
* moxie-tdep.c (moxie_frame_cache): Likewise.
* msp430-tdep.c (msp430_get_opcode_byte): Likewise.
(msp430_analyze_frame_prologue): Likewise.
* mt-tdep.c (mt_frame_unwind_cache): Likewise.
* nios2-linux-tdep.c (nios2_supply_gregset): Likewise.
(nios2_collect_gregset): Likewise.
* nios2-tdep.c (nios2_frame_unwind_cache): Likewise.
(nios2_stub_frame_cache): Likewise.
* objc-lang.c (find_methods): Likewise.
* objfiles.c (objfiles_pspace_data_cleanup): Likewise.
(get_objfile_pspace_data): Likewise.
(get_objfile_bfd_data): Likewise.
(objfile_bfd_data_free): Likewise.
(add_to_objfile_sections): Likewise.
(do_free_objfile_cleanup): Likewise.
(resume_section_map_updates_cleanup): Likewise.
* opencl-lang.c (builtin_opencl_type): Likewise.
* osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Likewise.
* osdata.c (osdata_start_osdata): Likewise.
(osdata_start_item): Likewise.
(osdata_start_column): Likewise.
(osdata_end_column): Likewise.
(clear_parsing_data): Likewise.
(osdata_free_cleanup): Likewise.
* parse.c (type_stack_cleanup): Likewise.
(exp_uses_objfile_iter): Likewise.
* ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
(ppc_linux_collect_gregset): Likewise.
(ppu2spu_prev_arch): Likewise.
(ppu2spu_this_id): Likewise.
(ppu2spu_prev_register): Likewise.
(ppu2spu_unwind_register): Likewise.
(ppu2spu_sniffer): Likewise.
(ppu2spu_dealloc_cache): Likewise.
(ppc_linux_init_abi): Likewise.
* ppcfbsd-tdep.c (ppcfbsd_sigtramp_frame_cache): Likewise.
* ppcobsd-tdep.c (ppcobsd_sigtramp_frame_cache): Likewise.
* progspace.c (restore_program_space): Likewise.
* psymtab.c (find_pc_sect_psymtab): Likewise.
(compare_psymbols): Likewise.
(psymbol_bcache_full): Likewise.
(allocate_psymtab): Likewise.
(discard_psymtabs_upto): Likewise.
* python/py-block.c (set_block): Likewise.
(del_objfile_blocks): Likewise.
* python/py-breakpoint.c (build_bp_list): Likewise.
* python/py-inferior.c (inferior_to_inferior_object): Likewise.
(build_inferior_list): Likewise.
(py_free_inferior): Likewise.
* python/py-objfile.c (py_free_objfile): Likewise.
(objfile_to_objfile_object): Likewise.
* python/py-prettyprint.c (py_restore_tstate): Likewise.
* python/py-progspace.c (py_free_pspace): Likewise.
(pspace_to_pspace_object): Likewise.
* python/py-symbol.c (set_symbol): Likewise.
(del_objfile_symbols): Likewise.
* python/py-symtab.c (set_sal): Likewise.
(set_symtab): Likewise.
(del_objfile_symtab): Likewise.
(del_objfile_sal): Likewise.
* python/py-type.c (save_objfile_types): Likewise.
(set_type): Likewise.
* python/py-unwind.c (pyuw_prev_register): Likewise.
(pyuw_on_new_gdbarch): Likewise.
* python/py-utils.c (py_decref): Likewise.
(py_xdecref): Likewise.
(gdb_py_generic_dict): Likewise.
* python/py-xmethods.c (gdbpy_free_xmethod_worker_data): Likewise.
(gdbpy_clone_xmethod_worker_data): Likewise.
(gdbpy_get_xmethod_arg_types): Likewise.
(gdbpy_get_xmethod_result_type): Likewise.
(gdbpy_invoke_xmethod): Likewise.
* python/python.c (gdbpy_apply_type_printers): Likewise.
(gdbpy_free_type_printers): Likewise.
* record-btrace.c (record_btrace_disable_callback): Likewise.
(bfcache_hash): Likewise.
(bfcache_eq): Likewise.
(btrace_get_frame_function): Likewise.
(record_btrace_frame_unwind_stop_reason): Likewise.
(record_btrace_frame_this_id): Likewise.
(record_btrace_frame_prev_register): Likewise.
(record_btrace_frame_dealloc_cache): Likewise.
* record-full.c (record_full_message_wrapper): Likewise.
(record_full_save_cleanups): Likewise.
* regcache.c (regcache_descr): Likewise.
(do_regcache_xfree): Likewise.
(do_regcache_invalidate): Likewise.
(do_cooked_read): Likewise.
(regcache_transfer_regset): Likewise.
* reggroups.c (reggroup_add): Likewise.
(reggroup_next): Likewise.
(reggroup_prev): Likewise.
* remote-fileio.c (do_remote_fileio_request): Likewise.
* remote-notif.c (remote_async_get_pending_events_handler): Likewise.
(do_notif_event_xfree): Likewise.
* remote.c (get_remote_arch_state): Likewise.
(remote_pspace_data_cleanup): Likewise.
(get_remote_exec_file): Likewise.
(set_pspace_remote_exec_file): Likewise.
(compare_pnums): Likewise.
(clear_threads_listing_context): Likewise.
(remote_newthread_step): Likewise.
(start_thread): Likewise.
(end_thread): Likewise.
(remove_child_of_pending_fork): Likewise.
(remove_stop_reply_for_inferior): Likewise.
(remove_stop_reply_of_remote_state): Likewise.
(remote_notif_remove_once_on_match): Likewise.
(stop_reply_match_ptid_and_ws): Likewise.
(kill_child_of_pending_fork): Likewise.
(register_remote_g_packet_guess): Likewise.
(remote_read_description_p): Likewise.
(remote_read_description): Likewise.
(free_actions_list_cleanup_wrapper): Likewise.
(remote_async_serial_handler): Likewise.
* rl78-tdep.c (rl78_get_opcode_byte): Likewise.
(rl78_analyze_frame_prologue): Likewise.
* rs6000-tdep.c (ppc_supply_gregset): Likewise.
(ppc_supply_fpregset): Likewise.
(ppc_supply_vsxregset): Likewise.
(ppc_supply_vrregset): Likewise.
(ppc_collect_gregset): Likewise.
(ppc_collect_fpregset): Likewise.
(ppc_collect_vsxregset): Likewise.
(ppc_collect_vrregset): Likewise.
(e500_move_ev_register): Likewise.
(do_regcache_raw_write): Likewise.
(rs6000_frame_cache): Likewise.
(rs6000_epilogue_frame_cache): Likewise.
(rs6000_gdbarch_init): Likewise.
* rx-tdep.c (rx_get_opcode_byte): Likewise.
(rx_analyze_frame_prologue): Likewise.
(rx_frame_type): Likewise.
(rx_frame_sniffer_common): Likewise.
* s390-linux-tdep.c (s390_check_for_saved): Likewise.
(s390_frame_unwind_cache): Likewise.
(s390_stub_frame_unwind_cache): Likewise.
(s390_sigtramp_frame_unwind_cache): Likewise.
* score-tdep.c (score_make_prologue_cache): Likewise.
* sentinel-frame.c (sentinel_frame_prev_register): Likewise.
(sentinel_frame_prev_arch): Likewise.
* ser-base.c (fd_event): Likewise.
(push_event): Likewise.
(ser_base_write): Likewise.
* ser-pipe.c (pipe_close): Likewise.
* serial.c (serial_write): Likewise.
* sh-tdep.c (sh_frame_cache): Likewise.
(sh_stub_this_id): Likewise.
* sh64-tdep.c (sh64_frame_cache): Likewise.
* solib-aix.c (get_solib_aix_inferior_data): Likewise.
(library_list_start_library): Likewise.
(library_list_start_list): Likewise.
(solib_aix_free_library_list): Likewise.
* solib-darwin.c (get_darwin_info): Likewise.
* solib-dsbt.c (get_dsbt_info): Likewise.
* solib-spu.c (append_ocl_sos): Likewise.
* solib-svr4.c (svr4_pspace_data_cleanup): Likewise.
(get_svr4_info): Likewise.
(library_list_start_library): Likewise.
(svr4_library_list_start_list): Likewise.
(hash_probe_and_action): Likewise.
(equal_probe_and_action): Likewise.
(svr4_update_solib_event_breakpoint): Likewise.
(set_solib_svr4_fetch_link_map_offsets): Likewise.
(svr4_fetch_link_map_offsets): Likewise.
(svr4_have_link_map_offsets): Likewise.
* solib-target.c (library_list_start_segment): Likewise.
(library_list_start_section): Likewise.
(library_list_start_library): Likewise.
(library_list_end_library): Likewise.
(library_list_start_list): Likewise.
(solib_target_free_library_list): Likewise.
* solib.c (solib_ops): Likewise.
(set_solib_ops): Likewise.
* sparc-sol2-tdep.c (sparc32_sol2_sigtramp_frame_cache): Likewise.
* sparc-tdep.c (sparc_frame_cache): Likewise.
(sparc32_frame_cache): Likewise.
(sparc32_supply_gregset): Likewise.
(sparc32_collect_gregset): Likewise.
(sparc32_supply_fpregset): Likewise.
(sparc32_collect_fpregset): Likewise.
* sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_cache): Likewise.
* sparc64-tdep.c (sparc64_supply_gregset): Likewise.
(sparc64_collect_gregset): Likewise.
(sparc64_supply_fpregset): Likewise.
(sparc64_collect_fpregset): Likewise.
* sparc64fbsd-tdep.c (sparc64fbsd_sigtramp_frame_cache): Likewise.
* sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_frame_cache): Likewise.
* sparc64obsd-tdep.c (sparc64obsd_frame_cache): Likewise.
(sparc64obsd_trapframe_cache): Likewise.
* sparcnbsd-tdep.c (sparc32nbsd_sigcontext_frame_cache): Likewise.
* sparcobsd-tdep.c (sparc32obsd_sigtramp_frame_cache): Likewise.
* spu-multiarch.c (spu_gdbarch): Likewise.
* spu-tdep.c (spu_frame_unwind_cache): Likewise.
(spu2ppu_prev_arch): Likewise.
(spu2ppu_this_id): Likewise.
(spu2ppu_prev_register): Likewise.
(spu2ppu_dealloc_cache): Likewise.
(spu_dis_asm_print_address): Likewise.
(gdb_print_insn_spu): Likewise.
(spu_get_overlay_table): Likewise.
* stabsread.c (rs6000_builtin_type): Likewise.
* stack.c (do_print_variable_and_value): Likewise.
* stap-probe.c (get_stap_base_address_1): Likewise.
* symfile-debug.c (debug_qf_has_symbols): Likewise.
(debug_qf_find_last_source_symtab): Likewise.
(debug_qf_forget_cached_source_info): Likewise.
(debug_qf_map_symtabs_matching_filename): Likewise.
(debug_qf_lookup_symbol): Likewise.
(debug_qf_print_stats): Likewise.
(debug_qf_dump): Likewise.
(debug_qf_relocate): Likewise.
(debug_qf_expand_symtabs_for_function): Likewise.
(debug_qf_expand_all_symtabs): Likewise.
(debug_qf_expand_symtabs_with_fullname): Likewise.
(debug_qf_map_matching_symbols): Likewise.
(debug_qf_expand_symtabs_matching): Likewise.
(debug_qf_find_pc_sect_compunit_symtab): Likewise.
(debug_qf_map_symbol_filenames): Likewise.
(debug_sym_get_probes): Likewise.
(debug_sym_new_init): Likewise.
(debug_sym_init): Likewise.
(debug_sym_read): Likewise.
(debug_sym_read_psymbols): Likewise.
(debug_sym_finish): Likewise.
(debug_sym_offsets): Likewise.
(debug_sym_read_linetable): Likewise.
(debug_sym_relocate): Likewise.
(uninstall_symfile_debug_logging): Likewise.
* symfile-mem.c (symbol_file_add_from_memory_wrapper): Likewise.
* symfile.c (place_section): Likewise.
(add_section_size_callback): Likewise.
(load_progress): Likewise.
(load_section_callback): Likewise.
(clear_memory_write_data): Likewise.
(allocate_symtab): Likewise.
* symmisc.c (maintenance_expand_file_matcher): Likewise.
* symtab.c (lookup_symtab_callback): Likewise.
(hash_demangled_name_entry): Likewise.
(eq_demangled_name_entry): Likewise.
(get_symbol_cache): Likewise.
(symbol_cache_cleanup): Likewise.
(set_symbol_cache_size): Likewise.
(symbol_cache_flush): Likewise.
(maintenance_print_symbol_cache): Likewise.
(maintenance_print_symbol_cache_statistics): Likewise.
(delete_filename_seen_cache): Likewise.
(output_partial_symbol_filename): Likewise.
(search_symbols_file_matches): Likewise.
(search_symbols_name_matches): Likewise.
(do_free_completion_list): Likewise.
(maybe_add_partial_symtab_filename): Likewise.
(get_main_info): Likewise.
(main_info_cleanup): Likewise.
* target-dcache.c (target_dcache_cleanup): Likewise.
(target_dcache_init_p): Likewise.
(target_dcache_invalidate): Likewise.
(target_dcache_get): Likewise.
(target_dcache_get_or_init): Likewise.
* target-descriptions.c (target_find_description): Likewise.
(tdesc_find_type): Likewise.
(tdesc_data_cleanup): Likewise.
(tdesc_find_arch_register): Likewise.
(tdesc_register_name): Likewise.
(tdesc_register_type): Likewise.
(tdesc_register_reggroup_p): Likewise.
(set_tdesc_pseudo_register_name): Likewise.
(set_tdesc_pseudo_register_type): Likewise.
(set_tdesc_pseudo_register_reggroup_p): Likewise.
(tdesc_use_registers): Likewise.
(free_target_description): Likewise.
* target-memory.c (compare_block_starting_address): Likewise.
(cleanup_request_data): Likewise.
(cleanup_write_requests_vector): Likewise.
* target.c (open_target): Likewise.
(cleanup_restore_target_terminal): Likewise.
(free_memory_read_result_vector): Likewise.
* thread.c (disable_thread_stack_temporaries): Likewise.
(finish_thread_state_cleanup): Likewise.
(do_restore_current_thread_cleanup): Likewise.
(restore_current_thread_cleanup_dtor): Likewise.
(set_thread_refcount): Likewise.
(tp_array_compar): Likewise.
(do_captured_thread_select): Likewise.
* tic6x-tdep.c (tic6x_frame_unwind_cache): Likewise.
(tic6x_stub_this_id): Likewise.
* tilegx-tdep.c (tilegx_frame_cache): Likewise.
* top.c (do_restore_instream_cleanup): Likewise.
(gdb_readline_wrapper_cleanup): Likewise.
(kill_or_detach): Likewise.
(print_inferior_quit_action): Likewise.
* tracefile-tfile.c (match_blocktype): Likewise.
(build_traceframe_info): Likewise.
* tracefile.c (trace_file_writer_xfree): Likewise.
* tracepoint.c (memrange_cmp): Likewise.
(do_collect_symbol): Likewise.
(do_clear_collection_list): Likewise.
(do_restore_current_traceframe_cleanup): Likewise.
(restore_current_traceframe_cleanup_dtor): Likewise.
(free_current_marker): Likewise.
(traceframe_info_start_memory): Likewise.
(traceframe_info_start_tvar): Likewise.
(free_result): Likewise.
* tramp-frame.c (tramp_frame_cache): Likewise.
* tui/tui-file.c (tui_file_delete): Likewise.
(tui_fileopen): Likewise.
(tui_sfileopen): Likewise.
(tui_file_isatty): Likewise.
(tui_file_rewind): Likewise.
(tui_file_put): Likewise.
(tui_file_fputs): Likewise.
(tui_file_get_strbuf): Likewise.
(tui_file_adjust_strbuf): Likewise.
(tui_file_flush): Likewise.
* tui/tui-layout.c (make_command_window): Likewise.
(make_data_window): Likewise.
(show_source_disasm_command): Likewise.
(show_data): Likewise.
(make_source_or_disasm_window): Likewise.
(show_source_or_disasm_and_command): Likewise.
* tui/tui-out.c (tui_field_int): Likewise.
(tui_field_string): Likewise.
(tui_field_fmt): Likewise.
(tui_text): Likewise.
* typeprint.c (hash_typedef_field): Likewise.
(eq_typedef_field): Likewise.
(do_free_typedef_hash): Likewise.
(copy_typedef_hash_element): Likewise.
(do_free_global_table): Likewise.
(find_global_typedef): Likewise.
(find_typedef_in_hash): Likewise.
* ui-file.c (ui_file_write_for_put): Likewise.
(do_ui_file_xstrdup): Likewise.
(mem_file_delete): Likewise.
(mem_file_rewind): Likewise.
(mem_file_put): Likewise.
(mem_file_write): Likewise.
(stdio_file_delete): Likewise.
(stdio_file_flush): Likewise.
(stdio_file_read): Likewise.
(stdio_file_write): Likewise.
(stdio_file_write_async_safe): Likewise.
(stdio_file_fputs): Likewise.
(stdio_file_isatty): Likewise.
(stdio_file_fseek): Likewise.
(tee_file_delete): Likewise.
(tee_file_flush): Likewise.
(tee_file_write): Likewise.
(tee_file_fputs): Likewise.
(tee_file_isatty): Likewise.
* ui-out.c (do_cleanup_table_end): Likewise.
(do_cleanup_end): Likewise.
* user-regs.c (user_reg_add): Likewise.
(user_reg_map_name_to_regnum): Likewise.
(usernum_to_user_reg): Likewise.
(maintenance_print_user_registers): Likewise.
* utils.c (do_bfd_close_cleanup): Likewise.
(do_fclose_cleanup): Likewise.
(do_obstack_free): Likewise.
(do_ui_file_delete): Likewise.
(do_ui_out_redirect_pop): Likewise.
(do_free_section_addr_info): Likewise.
(restore_integer): Likewise.
(do_unpush_target): Likewise.
(do_htab_delete_cleanup): Likewise.
(do_restore_ui_file): Likewise.
(do_value_free): Likewise.
(do_free_so): Likewise.
(free_current_contents): Likewise.
(do_regfree_cleanup): Likewise.
(core_addr_hash): Likewise.
(core_addr_eq): Likewise.
(do_free_char_ptr_vec): Likewise.
* v850-tdep.c (v850_frame_cache): Likewise.
* varobj.c (do_free_variable_cleanup): Likewise.
* vax-tdep.c (vax_supply_gregset): Likewise.
(vax_frame_cache): Likewise.
* vaxobsd-tdep.c (vaxobsd_sigtramp_frame_cache): Likewise.
* xml-support.c (gdb_xml_body_text): Likewise.
(gdb_xml_values_cleanup): Likewise.
(gdb_xml_start_element): Likewise.
(gdb_xml_start_element_wrapper): Likewise.
(gdb_xml_end_element): Likewise.
(gdb_xml_end_element_wrapper): Likewise.
(gdb_xml_cleanup): Likewise.
(gdb_xml_fetch_external_entity): Likewise.
(gdb_xml_parse_attr_enum): Likewise.
(xinclude_start_include): Likewise.
(xinclude_end_include): Likewise.
(xml_xinclude_default): Likewise.
(xml_xinclude_start_doctype): Likewise.
(xml_xinclude_end_doctype): Likewise.
(xml_xinclude_cleanup): Likewise.
(xml_fetch_content_from_file): Likewise.
* xml-syscall.c (free_syscalls_info): Likewise.
(syscall_start_syscall): Likewise.
* xml-tdesc.c (tdesc_end_arch): Likewise.
(tdesc_end_osabi): Likewise.
(tdesc_end_compatible): Likewise.
(tdesc_start_target): Likewise.
(tdesc_start_feature): Likewise.
(tdesc_start_reg): Likewise.
(tdesc_start_union): Likewise.
(tdesc_start_struct): Likewise.
(tdesc_start_flags): Likewise.
(tdesc_start_field): Likewise.
(tdesc_start_vector): Likewise.
(fetch_available_features_from_target): Likewise.
* xstormy16-tdep.c (xstormy16_frame_cache): Likewise.
* xtensa-tdep.c (xtensa_supply_gregset): Likewise.
(xtensa_frame_cache): Likewise.
(xtensa_frame_prev_register): Likewise.
(xtensa_extract_return_value): Likewise.
---
gdb/macrocmd.c | 2 +-
gdb/macrotab.c | 5 +-
gdb/main.c | 2 +-
gdb/maint.c | 2 +-
gdb/mdebugread.c | 5 +-
gdb/memattr.c | 4 +-
gdb/memory-map.c | 25 ++++++----
gdb/memrange.c | 4 +-
gdb/mep-tdep.c | 5 +-
gdb/mi/mi-cmd-var.c | 2 +-
gdb/mi/mi-console.c | 14 ++++--
gdb/mi/mi-interp.c | 53 ++++++++++-----------
gdb/mi/mi-main.c | 12 +++--
gdb/mi/mi-out.c | 36 +++++++-------
gdb/mi/mi-parse.c | 2 +-
gdb/microblaze-tdep.c | 2 +-
gdb/minidebug.c | 8 ++--
gdb/mips-linux-tdep.c | 3 +-
gdb/mips-sde-tdep.c | 4 +-
gdb/mips-tdep.c | 29 ++++++------
gdb/mips64obsd-tdep.c | 2 +-
gdb/mipsnbsd-tdep.c | 4 +-
gdb/mn10300-linux-tdep.c | 7 +--
gdb/mn10300-tdep.c | 6 ++-
gdb/moxie-tdep.c | 2 +-
gdb/msp430-tdep.c | 8 ++--
gdb/mt-tdep.c | 2 +-
gdb/nios2-linux-tdep.c | 4 +-
gdb/nios2-tdep.c | 4 +-
gdb/objc-lang.c | 2 +-
gdb/objfiles.c | 16 ++++---
gdb/opencl-lang.c | 2 +-
gdb/osabi.c | 2 +-
gdb/osdata.c | 17 +++----
gdb/parse.c | 4 +-
gdb/ppc-linux-tdep.c | 29 ++++++------
gdb/ppcfbsd-tdep.c | 2 +-
gdb/ppcobsd-tdep.c | 2 +-
gdb/progspace.c | 2 +-
gdb/psymtab.c | 21 +++++----
gdb/python/py-block.c | 5 +-
gdb/python/py-breakpoint.c | 2 +-
gdb/python/py-inferior.c | 6 +--
gdb/python/py-objfile.c | 4 +-
gdb/python/py-prettyprint.c | 2 +-
gdb/python/py-progspace.c | 4 +-
gdb/python/py-symbol.c | 5 +-
gdb/python/py-symtab.c | 15 +++---
gdb/python/py-type.c | 5 +-
gdb/python/py-unwind.c | 6 +--
gdb/python/py-utils.c | 6 +--
gdb/python/py-xmethods.c | 14 ++++--
gdb/python/python.c | 4 +-
gdb/record-btrace.c | 23 ++++-----
gdb/record-full.c | 5 +-
gdb/regcache.c | 13 ++++--
gdb/reggroups.c | 9 ++--
gdb/remote-fileio.c | 2 +-
gdb/remote-notif.c | 4 +-
gdb/remote.c | 72 ++++++++++++++++------------
gdb/rl78-tdep.c | 8 ++--
gdb/rs6000-tdep.c | 111 ++++++++++++++++++++++++--------------------
gdb/rx-tdep.c | 11 +++--
gdb/s390-linux-tdep.c | 8 ++--
gdb/score-tdep.c | 10 ++--
gdb/sentinel-frame.c | 6 ++-
gdb/ser-base.c | 6 +--
gdb/ser-pipe.c | 2 +-
gdb/serial.c | 4 +-
gdb/sh-tdep.c | 4 +-
gdb/sh64-tdep.c | 2 +-
gdb/solib-aix.c | 13 +++---
gdb/solib-darwin.c | 3 +-
gdb/solib-dsbt.c | 3 +-
gdb/solib-spu.c | 3 +-
gdb/solib-svr4.c | 42 ++++++++++-------
gdb/solib-target.c | 21 +++++----
gdb/solib.c | 6 ++-
gdb/sparc-sol2-tdep.c | 2 +-
gdb/sparc-tdep.c | 12 ++---
gdb/sparc64-sol2-tdep.c | 2 +-
gdb/sparc64-tdep.c | 8 ++--
gdb/sparc64fbsd-tdep.c | 2 +-
gdb/sparc64nbsd-tdep.c | 2 +-
gdb/sparc64obsd-tdep.c | 4 +-
gdb/sparcnbsd-tdep.c | 2 +-
gdb/sparcobsd-tdep.c | 2 +-
gdb/spu-multiarch.c | 2 +-
gdb/spu-tdep.c | 20 ++++----
gdb/stabsread.c | 4 +-
gdb/stack.c | 3 +-
gdb/stap-probe.c | 2 +-
gdb/symfile-debug.c | 75 ++++++++++++++++++++----------
gdb/symfile-mem.c | 3 +-
gdb/symfile.c | 16 ++++---
gdb/symmisc.c | 2 +-
gdb/symtab.c | 50 ++++++++++++--------
gdb/target-dcache.c | 22 +++++----
gdb/target-descriptions.c | 31 ++++++++-----
gdb/target-memory.c | 10 ++--
gdb/target.c | 6 +--
gdb/thread.c | 19 ++++----
gdb/tic6x-tdep.c | 4 +-
gdb/tilegx-tdep.c | 2 +-
gdb/top.c | 9 ++--
gdb/tracefile-tfile.c | 4 +-
gdb/tracefile.c | 2 +-
gdb/tracepoint.c | 31 ++++++++-----
gdb/tramp-frame.c | 3 +-
gdb/tui/tui-file.c | 20 ++++----
gdb/tui/tui-layout.c | 110 ++++++++++++++++++++++++-------------------
gdb/tui/tui-out.c | 8 ++--
gdb/typeprint.c | 17 +++----
gdb/ui-file.c | 38 +++++++--------
gdb/ui-out.c | 5 +-
gdb/user-regs.c | 13 ++++--
gdb/utils.c | 38 ++++++++-------
gdb/v850-tdep.c | 2 +-
gdb/varobj.c | 2 +-
gdb/vax-tdep.c | 4 +-
gdb/vaxobsd-tdep.c | 2 +-
gdb/xml-support.c | 50 +++++++++++---------
gdb/xml-syscall.c | 6 +--
gdb/xml-tdesc.c | 46 +++++++++---------
gdb/xstormy16-tdep.c | 2 +-
gdb/xtensa-tdep.c | 10 ++--
126 files changed, 873 insertions(+), 682 deletions(-)
diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c
index 2eb9dff..aca4fdc 100644
--- a/gdb/macrocmd.c
+++ b/gdb/macrocmd.c
@@ -196,7 +196,7 @@ print_macro_callback (const char *name, const struct macro_definition *macro,
struct macro_source_file *source, int line,
void *user_data)
{
- if (! user_data || strcmp (user_data, name) == 0)
+ if (! user_data || strcmp ((const char *) user_data, name) == 0)
print_macro_definition (name, macro, source, line);
}
diff --git a/gdb/macrotab.c b/gdb/macrotab.c
index 587300a..41ccb6e 100644
--- a/gdb/macrotab.c
+++ b/gdb/macrotab.c
@@ -130,7 +130,7 @@ macro_bcache (struct macro_table *t, const void *addr, int len)
static const char *
macro_bcache_str (struct macro_table *t, const char *s)
{
- return macro_bcache (t, s, strlen (s) + 1);
+ return (const char *) macro_bcache (t, s, strlen (s) + 1);
}
@@ -575,7 +575,8 @@ new_macro_definition (struct macro_table *t,
cached_argv[i] = macro_bcache_str (t, argv[i]);
/* Now bcache the array of argument pointers itself. */
- d->argv = macro_bcache (t, cached_argv, cached_argv_size);
+ d->argv = ((const char * const *)
+ macro_bcache (t, cached_argv, cached_argv_size));
}
/* We don't bcache the entire definition structure because it's got
diff --git a/gdb/main.c b/gdb/main.c
index aecd60a..49c9b68 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -437,7 +437,7 @@ DEF_VEC_O (cmdarg_s);
static int
captured_main (void *data)
{
- struct captured_main_args *context = data;
+ struct captured_main_args *context = (struct captured_main_args *) data;
int argc = context->argc;
char **argv = context->argv;
static int quiet = 0;
diff --git a/gdb/maint.c b/gdb/maint.c
index 5d7fca5..c95f645 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -303,7 +303,7 @@ print_bfd_section_info (bfd *abfd,
{
flagword flags = bfd_get_section_flags (abfd, asect);
const char *name = bfd_section_name (abfd, asect);
- const char *arg = datum;
+ const char *arg = (const char *) datum;
if (arg == NULL || *arg == '\0'
|| match_substring (arg, name)
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 97c95a4..9798039 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -359,7 +359,7 @@ mdebug_build_psymtabs (struct objfile *objfile,
info->fdr = (FDR *) obstack_alloc (&objfile->objfile_obstack,
(info->symbolic_header.ifdMax
* sizeof (FDR)));
- fdr_src = info->external_fdr;
+ fdr_src = (char *) info->external_fdr;
fdr_end = (fdr_src
+ info->symbolic_header.ifdMax * swap->external_fdr_size);
fdr_ptr = info->fdr;
@@ -1348,7 +1348,8 @@ static struct type *
basic_type (int bt, struct objfile *objfile)
{
struct gdbarch *gdbarch = get_objfile_arch (objfile);
- struct type **map_bt = objfile_data (objfile, basic_type_data);
+ struct type **map_bt =
+ (struct type **) objfile_data (objfile, basic_type_data);
struct type *tp;
if (bt >= btMax)
diff --git a/gdb/memattr.c b/gdb/memattr.c
index a2aac07..40381c5 100644
--- a/gdb/memattr.c
+++ b/gdb/memattr.c
@@ -98,8 +98,8 @@ mem_region_lessthan (const struct mem_region *lhs,
int
mem_region_cmp (const void *untyped_lhs, const void *untyped_rhs)
{
- const struct mem_region *lhs = untyped_lhs;
- const struct mem_region *rhs = untyped_rhs;
+ const struct mem_region *lhs = (const struct mem_region *) untyped_lhs;
+ const struct mem_region *rhs = (const struct mem_region *) untyped_rhs;
if (lhs->lo < rhs->lo)
return -1;
diff --git a/gdb/memory-map.c b/gdb/memory-map.c
index 77eb93e..4372e6a 100644
--- a/gdb/memory-map.c
+++ b/gdb/memory-map.c
@@ -55,13 +55,17 @@ memory_map_start_memory (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct memory_map_parsing_data *data = user_data;
+ struct memory_map_parsing_data *data =
+ (struct memory_map_parsing_data *) user_data;
struct mem_region *r = VEC_safe_push (mem_region_s, *data->memory_map, NULL);
ULONGEST *start_p, *length_p, *type_p;
- start_p = xml_find_attribute (attributes, "start")->value;
- length_p = xml_find_attribute (attributes, "length")->value;
- type_p = xml_find_attribute (attributes, "type")->value;
+ start_p =
+ (long unsigned int *) xml_find_attribute (attributes, "start")->value;
+ length_p =
+ (long unsigned int *) xml_find_attribute (attributes, "length")->value;
+ type_p =
+ (long unsigned int *) xml_find_attribute (attributes, "type")->value;
mem_region_init (r);
r->lo = *start_p;
@@ -78,7 +82,8 @@ memory_map_end_memory (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct memory_map_parsing_data *data = user_data;
+ struct memory_map_parsing_data *data =
+ (struct memory_map_parsing_data *) user_data;
struct mem_region *r = VEC_last (mem_region_s, *data->memory_map);
if (r->attrib.mode == MEM_FLASH && r->attrib.blocksize == -1)
@@ -93,10 +98,11 @@ memory_map_start_property (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct memory_map_parsing_data *data = user_data;
+ struct memory_map_parsing_data *data =
+ (struct memory_map_parsing_data *) user_data;
char *name;
- name = xml_find_attribute (attributes, "name")->value;
+ name = (char *) xml_find_attribute (attributes, "name")->value;
snprintf (data->property_name, sizeof (data->property_name), "%s", name);
}
@@ -107,7 +113,8 @@ memory_map_end_property (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct memory_map_parsing_data *data = user_data;
+ struct memory_map_parsing_data *data =
+ (struct memory_map_parsing_data *) user_data;
char *name = data->property_name;
if (strcmp (name, "blocksize") == 0)
@@ -125,7 +132,7 @@ memory_map_end_property (struct gdb_xml_parser *parser,
static void
clear_result (void *p)
{
- VEC(mem_region_s) **result = p;
+ VEC(mem_region_s) **result = (VEC(mem_region_s) **) p;
VEC_free (mem_region_s, *result);
*result = NULL;
}
diff --git a/gdb/memrange.c b/gdb/memrange.c
index e4fbb52..04db5da 100644
--- a/gdb/memrange.c
+++ b/gdb/memrange.c
@@ -46,8 +46,8 @@ address_in_mem_range (CORE_ADDR address, const struct mem_range *r)
static int
compare_mem_ranges (const void *ap, const void *bp)
{
- const struct mem_range *r1 = ap;
- const struct mem_range *r2 = bp;
+ const struct mem_range *r1 = (const struct mem_range *) ap;
+ const struct mem_range *r2 = (const struct mem_range *) bp;
if (r1->start > r2->start)
return 1;
diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c
index d602576..b3c1f77 100644
--- a/gdb/mep-tdep.c
+++ b/gdb/mep-tdep.c
@@ -1950,10 +1950,11 @@ mep_analyze_frame_prologue (struct frame_info *this_frame,
stop_addr = func_start;
mep_analyze_prologue (get_frame_arch (this_frame),
- func_start, stop_addr, *this_prologue_cache);
+ func_start, stop_addr,
+ (struct mep_prologue *) *this_prologue_cache);
}
- return *this_prologue_cache;
+ return (struct mep_prologue *) *this_prologue_cache;
}
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index ee0bbc6..e316812 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -649,7 +649,7 @@ struct mi_cmd_var_update
static void
mi_cmd_var_update_iter (struct varobj *var, void *data_pointer)
{
- struct mi_cmd_var_update *data = data_pointer;
+ struct mi_cmd_var_update *data = (struct mi_cmd_var_update *) data_pointer;
int thread_id, thread_stopped;
thread_id = varobj_get_thread_id (var);
diff --git a/gdb/mi/mi-console.c b/gdb/mi/mi-console.c
index 257f452..e9a74bd 100644
--- a/gdb/mi/mi-console.c
+++ b/gdb/mi/mi-console.c
@@ -67,7 +67,8 @@ mi_console_file_new (struct ui_file *raw, const char *prefix, char quote)
static void
mi_console_file_delete (struct ui_file *file)
{
- struct mi_console_file *mi_console = ui_file_data (file);
+ struct mi_console_file *mi_console =
+ (struct mi_console_file *) ui_file_data (file);
if (mi_console->magic != &mi_console_file_magic)
internal_error (__FILE__, __LINE__,
@@ -79,7 +80,8 @@ mi_console_file_delete (struct ui_file *file)
static void
mi_console_file_fputs (const char *buf, struct ui_file *file)
{
- struct mi_console_file *mi_console = ui_file_data (file);
+ struct mi_console_file *mi_console =
+ (struct mi_console_file *) ui_file_data (file);
if (mi_console->magic != &mi_console_file_magic)
internal_error (__FILE__, __LINE__,
@@ -97,7 +99,7 @@ mi_console_file_fputs (const char *buf, struct ui_file *file)
static void
mi_console_raw_packet (void *data, const char *buf, long length_buf)
{
- struct mi_console_file *mi_console = data;
+ struct mi_console_file *mi_console = (struct mi_console_file *) data;
if (mi_console->magic != &mi_console_file_magic)
internal_error (__FILE__, __LINE__,
@@ -126,7 +128,8 @@ mi_console_raw_packet (void *data, const char *buf, long length_buf)
static void
mi_console_file_flush (struct ui_file *file)
{
- struct mi_console_file *mi_console = ui_file_data (file);
+ struct mi_console_file *mi_console =
+ (struct mi_console_file *) ui_file_data (file);
if (mi_console->magic != &mi_console_file_magic)
internal_error (__FILE__, __LINE__,
@@ -144,7 +147,8 @@ mi_console_file_flush (struct ui_file *file)
void
mi_console_set_raw (struct ui_file *file, struct ui_file *raw)
{
- struct mi_console_file *mi_console = ui_file_data (file);
+ struct mi_console_file *mi_console =
+ (struct mi_console_file *) ui_file_data (file);
if (mi_console->magic != &mi_console_file_magic)
internal_error (__FILE__, __LINE__,
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 385b975..e3f184e 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -173,7 +173,7 @@ mi_interpreter_init (struct interp *interp, int top_level)
static int
mi_interpreter_resume (void *data)
{
- struct mi_interp *mi = data;
+ struct mi_interp *mi = (struct mi_interp *) data;
/* As per hack note in mi_interpreter_init, swap in the output
channels... */
@@ -355,7 +355,7 @@ mi_command_loop (void *data)
static void
mi_new_thread (struct thread_info *t)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct inferior *inf = find_inferior_ptid (t->ptid);
gdb_assert (inf);
@@ -378,7 +378,7 @@ mi_thread_exit (struct thread_info *t, int silent)
inf = find_inferior_ptid (t->ptid);
- mi = top_level_interpreter_data ();
+ mi = (struct mi_interp *) top_level_interpreter_data ();
old_chain = make_cleanup_restore_target_terminal ();
target_terminal_ours ();
fprintf_unfiltered (mi->event_channel,
@@ -394,7 +394,7 @@ mi_thread_exit (struct thread_info *t, int silent)
static void
mi_record_changed (struct inferior *inferior, int started)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
fprintf_unfiltered (mi->event_channel, "record-%s,thread-group=\"i%d\"",
started ? "started" : "stopped", inferior->num);
@@ -405,7 +405,7 @@ mi_record_changed (struct inferior *inferior, int started)
static void
mi_inferior_added (struct inferior *inf)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
target_terminal_ours ();
fprintf_unfiltered (mi->event_channel,
@@ -417,7 +417,7 @@ mi_inferior_added (struct inferior *inf)
static void
mi_inferior_appeared (struct inferior *inf)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
target_terminal_ours ();
fprintf_unfiltered (mi->event_channel,
@@ -429,7 +429,7 @@ mi_inferior_appeared (struct inferior *inf)
static void
mi_inferior_exit (struct inferior *inf)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
target_terminal_ours ();
if (inf->has_exit_code)
@@ -446,7 +446,7 @@ mi_inferior_exit (struct inferior *inf)
static void
mi_inferior_removed (struct inferior *inf)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
target_terminal_ours ();
fprintf_unfiltered (mi->event_channel,
@@ -484,7 +484,7 @@ mi_interp_data (void)
struct interp *interp = find_mi_interpreter ();
if (interp != NULL)
- return interp_data (interp);
+ return (struct mi_interp *) interp_data (interp);
return NULL;
}
@@ -611,7 +611,8 @@ mi_on_normal_stop (struct bpstats *bs, int print_frame)
|| (tp->control.command_interp != NULL
&& tp->control.command_interp != top_level_interpreter ()))
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi =
+ (struct mi_interp *) top_level_interpreter_data ();
print_stop_event (mi->cli_uiout);
}
@@ -674,7 +675,7 @@ struct mi_suppress_notification mi_suppress_notification =
static void
mi_traceframe_changed (int tfnum, int tpnum)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
if (mi_suppress_notification.traceframe)
return;
@@ -696,7 +697,7 @@ mi_traceframe_changed (int tfnum, int tpnum)
static void
mi_tsv_created (const struct trace_state_variable *tsv)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
target_terminal_ours ();
@@ -712,7 +713,7 @@ mi_tsv_created (const struct trace_state_variable *tsv)
static void
mi_tsv_deleted (const struct trace_state_variable *tsv)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
target_terminal_ours ();
@@ -730,7 +731,7 @@ mi_tsv_deleted (const struct trace_state_variable *tsv)
static void
mi_tsv_modified (const struct trace_state_variable *tsv)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
target_terminal_ours ();
@@ -756,7 +757,7 @@ mi_tsv_modified (const struct trace_state_variable *tsv)
static void
mi_breakpoint_created (struct breakpoint *b)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
if (mi_suppress_notification.breakpoint)
@@ -795,7 +796,7 @@ mi_breakpoint_created (struct breakpoint *b)
static void
mi_breakpoint_deleted (struct breakpoint *b)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
if (mi_suppress_notification.breakpoint)
return;
@@ -816,7 +817,7 @@ mi_breakpoint_deleted (struct breakpoint *b)
static void
mi_breakpoint_modified (struct breakpoint *b)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
if (mi_suppress_notification.breakpoint)
@@ -853,7 +854,7 @@ mi_breakpoint_modified (struct breakpoint *b)
static int
mi_output_running_pid (struct thread_info *info, void *arg)
{
- ptid_t *ptid = arg;
+ ptid_t *ptid = (ptid_t *) arg;
if (ptid_get_pid (*ptid) == ptid_get_pid (info->ptid))
fprintf_unfiltered (raw_stdout,
@@ -868,7 +869,7 @@ mi_inferior_count (struct inferior *inf, void *arg)
{
if (inf->pid != 0)
{
- int *count_p = arg;
+ int *count_p = (int *) arg;
(*count_p)++;
}
@@ -944,7 +945,7 @@ mi_on_resume (ptid_t ptid)
static void
mi_solib_loaded (struct so_list *solib)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct ui_out *uiout = interp_ui_out (top_level_interpreter ());
target_terminal_ours ();
@@ -970,7 +971,7 @@ mi_solib_loaded (struct so_list *solib)
static void
mi_solib_unloaded (struct so_list *solib)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct ui_out *uiout = interp_ui_out (top_level_interpreter ());
target_terminal_ours ();
@@ -997,7 +998,7 @@ mi_solib_unloaded (struct so_list *solib)
static void
mi_command_param_changed (const char *param, const char *value)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
if (mi_suppress_notification.cmd_param_changed)
@@ -1024,7 +1025,7 @@ static void
mi_memory_changed (struct inferior *inferior, CORE_ADDR memaddr,
ssize_t len, const bfd_byte *myaddr)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
struct obj_section *sec;
@@ -1066,7 +1067,7 @@ report_initial_inferior (struct inferior *inf, void *closure)
mi_inferior_added assumes that inferior is fully initialized
and top_level_interpreter_data is set, we cannot call
it here. */
- struct mi_interp *mi = closure;
+ struct mi_interp *mi = (struct mi_interp *) closure;
target_terminal_ours ();
fprintf_unfiltered (mi->event_channel,
@@ -1079,7 +1080,7 @@ report_initial_inferior (struct inferior *inf, void *closure)
static struct ui_out *
mi_ui_out (struct interp *interp)
{
- struct mi_interp *mi = interp_data (interp);
+ struct mi_interp *mi = (struct mi_interp *) interp_data (interp);
return mi->mi_uiout;
}
@@ -1096,7 +1097,7 @@ static int
mi_set_logging (struct interp *interp, int start_log,
struct ui_file *out, struct ui_file *logfile)
{
- struct mi_interp *mi = interp_data (interp);
+ struct mi_interp *mi = (struct mi_interp *) interp_data (interp);
if (!mi)
return 0;
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 8712a7f..7164f75 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -610,7 +610,7 @@ struct collect_cores_data
static int
collect_cores (struct thread_info *ti, void *xdata)
{
- struct collect_cores_data *data = xdata;
+ struct collect_cores_data *data = (struct collect_cores_data *) xdata;
if (ptid_get_pid (ti->ptid) == data->pid)
{
@@ -643,7 +643,8 @@ struct print_one_inferior_data
static int
print_one_inferior (struct inferior *inferior, void *xdata)
{
- struct print_one_inferior_data *top_data = xdata;
+ struct print_one_inferior_data *top_data =
+ (struct print_one_inferior_data *) xdata;
struct ui_out *uiout = current_uiout;
if (VEC_empty (int, top_data->inferiors)
@@ -728,7 +729,7 @@ output_cores (struct ui_out *uiout, const char *field_name, const char *xcores)
static void
free_vector_of_ints (void *xvector)
{
- VEC (int) **vector = xvector;
+ VEC (int) **vector = (VEC (int) **) xvector;
VEC_free (int, *vector);
}
@@ -759,7 +760,7 @@ splay_tree_int_comparator (splay_tree_key xa, splay_tree_key xb)
static void
free_splay_tree (void *xt)
{
- splay_tree t = xt;
+ splay_tree t = (splay_tree) xt;
splay_tree_delete (t);
}
@@ -2150,7 +2151,8 @@ mi_execute_command (const char *cmd, int from_tty)
=thread-selected is supposed to indicate user's intentions. */
&& strcmp (command->command, "thread-select") != 0)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi =
+ (struct mi_interp *) top_level_interpreter_data ();
int report_change = 0;
if (command->thread == -1)
diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c
index ef0a2df..b234bba 100644
--- a/gdb/mi/mi-out.c
+++ b/gdb/mi/mi-out.c
@@ -120,7 +120,7 @@ mi_table_begin (struct ui_out *uiout,
void
mi_table_body (struct ui_out *uiout)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -134,7 +134,7 @@ mi_table_body (struct ui_out *uiout)
void
mi_table_end (struct ui_out *uiout)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
data->suppress_output = 0;
mi_close (uiout, ui_out_type_list); /* body */
@@ -147,7 +147,7 @@ void
mi_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
const char *col_name, const char *colhdr)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -166,7 +166,7 @@ void
mi_begin (struct ui_out *uiout, enum ui_out_type type, int level,
const char *id)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -179,7 +179,7 @@ mi_begin (struct ui_out *uiout, enum ui_out_type type, int level,
void
mi_end (struct ui_out *uiout, enum ui_out_type type, int level)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -194,7 +194,7 @@ mi_field_int (struct ui_out *uiout, int fldno, int width,
enum ui_align alignment, const char *fldname, int value)
{
char buffer[20]; /* FIXME: how many chars long a %d can become? */
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -218,7 +218,7 @@ void
mi_field_string (struct ui_out *uiout, int fldno, int width,
enum ui_align align, const char *fldname, const char *string)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream;
if (data->suppress_output)
@@ -241,7 +241,7 @@ mi_field_fmt (struct ui_out *uiout, int fldno, int width,
enum ui_align align, const char *fldname,
const char *format, va_list args)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream;
if (data->suppress_output)
@@ -282,7 +282,7 @@ mi_wrap_hint (struct ui_out *uiout, char *identstring)
void
mi_flush (struct ui_out *uiout)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
gdb_flush (stream);
@@ -291,7 +291,7 @@ mi_flush (struct ui_out *uiout)
int
mi_redirect (struct ui_out *uiout, struct ui_file *outstream)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
if (outstream != NULL)
VEC_safe_push (ui_filep, data->streams, outstream);
@@ -308,7 +308,7 @@ mi_redirect (struct ui_out *uiout, struct ui_file *outstream)
static void
field_separator (struct ui_out *uiout)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
if (data->suppress_field_separator)
@@ -320,7 +320,7 @@ field_separator (struct ui_out *uiout)
static void
mi_open (struct ui_out *uiout, const char *name, enum ui_out_type type)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
field_separator (uiout);
@@ -343,7 +343,7 @@ mi_open (struct ui_out *uiout, const char *name, enum ui_out_type type)
static void
mi_close (struct ui_out *uiout, enum ui_out_type type)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
switch (type)
@@ -365,7 +365,7 @@ mi_close (struct ui_out *uiout, enum ui_out_type type)
void
mi_out_buffered (struct ui_out *uiout, char *string)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
fprintf_unfiltered (stream, "%s", string);
@@ -376,7 +376,7 @@ mi_out_buffered (struct ui_out *uiout, char *string)
void
mi_out_rewind (struct ui_out *uiout)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
ui_file_rewind (stream);
@@ -387,7 +387,7 @@ mi_out_rewind (struct ui_out *uiout)
void
mi_out_put (struct ui_out *uiout, struct ui_file *stream)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *outstream = VEC_last (ui_filep, data->streams);
ui_file_put (outstream, ui_file_write_for_put, stream);
@@ -399,7 +399,7 @@ mi_out_put (struct ui_out *uiout, struct ui_file *stream)
int
mi_version (struct ui_out *uiout)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
return data->mi_version;
}
@@ -424,7 +424,7 @@ mi_out_data_ctor (mi_out_data *self, int mi_version, struct ui_file *stream)
static void
mi_out_data_dtor (struct ui_out *ui_out)
{
- mi_out_data *data = ui_out_data (ui_out);
+ mi_out_data *data = (mi_out_data *) ui_out_data (ui_out);
VEC_free (ui_filep, data->streams);
xfree (data);
diff --git a/gdb/mi/mi-parse.c b/gdb/mi/mi-parse.c
index 92efe26..55ac3a5 100644
--- a/gdb/mi/mi-parse.c
+++ b/gdb/mi/mi-parse.c
@@ -229,7 +229,7 @@ mi_parse_free (struct mi_parse *parse)
static void
mi_parse_cleanup (void *arg)
{
- mi_parse_free (arg);
+ mi_parse_free ((struct mi_parse *) arg);
}
struct mi_parse *
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index 8cc1df2..02dfd2d 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -441,7 +441,7 @@ microblaze_frame_cache (struct frame_info *next_frame, void **this_cache)
int rn;
if (*this_cache)
- return *this_cache;
+ return (struct microblaze_frame_cache *) *this_cache;
cache = microblaze_alloc_frame_cache ();
*this_cache = cache;
diff --git a/gdb/minidebug.c b/gdb/minidebug.c
index 8610a15..b5cf45a 100644
--- a/gdb/minidebug.c
+++ b/gdb/minidebug.c
@@ -76,7 +76,7 @@ struct gdb_lzma_stream
static void *
lzma_open (struct bfd *nbfd, void *open_closure)
{
- asection *section = open_closure;
+ asection *section = (asection *) open_closure;
bfd_size_type size, offset;
lzma_stream_flags options;
gdb_byte footer[LZMA_STREAM_HEADER_SIZE];
@@ -133,7 +133,7 @@ static file_ptr
lzma_pread (struct bfd *nbfd, void *stream, void *buf, file_ptr nbytes,
file_ptr offset)
{
- struct gdb_lzma_stream *lstream = stream;
+ struct gdb_lzma_stream *lstream = (struct gdb_lzma_stream *) stream;
bfd_size_type chunk_size;
lzma_index_iter iter;
gdb_byte *compressed, *uncompressed;
@@ -220,7 +220,7 @@ static int
lzma_close (struct bfd *nbfd,
void *stream)
{
- struct gdb_lzma_stream *lstream = stream;
+ struct gdb_lzma_stream *lstream = (struct gdb_lzma_stream *) stream;
lzma_index_end (lstream->index, &gdb_lzma_allocator);
xfree (lstream->data);
@@ -239,7 +239,7 @@ lzma_stat (struct bfd *abfd,
void *stream,
struct stat *sb)
{
- struct gdb_lzma_stream *lstream = stream;
+ struct gdb_lzma_stream *lstream = (struct gdb_lzma_stream *) stream;
memset (sb, 0, sizeof (struct stat));
sb->st_size = lzma_index_uncompressed_size (lstream->index);
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index fe45dcc..812b943 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -1642,7 +1642,8 @@ mips_linux_init_abi (struct gdbarch_info info,
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum mips_abi abi = mips_abi (gdbarch);
- struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info;
+ struct tdesc_arch_data *tdesc_data =
+ (struct tdesc_arch_data *) info.tdep_info;
linux_init_abi (info, gdbarch);
diff --git a/gdb/mips-sde-tdep.c b/gdb/mips-sde-tdep.c
index 0246b27..8e4690e 100644
--- a/gdb/mips-sde-tdep.c
+++ b/gdb/mips-sde-tdep.c
@@ -48,7 +48,7 @@ mips_sde_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache != NULL)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
*this_cache = cache;
@@ -205,7 +205,7 @@ static void
mips_sde_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect,
void *obj)
{
- enum gdb_osabi *os_ident_ptr = obj;
+ enum gdb_osabi *os_ident_ptr = (enum gdb_osabi *) obj;
const char *name;
name = bfd_get_section_name (abfd, sect);
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 584be26..5d0f2ad 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -2818,7 +2818,7 @@ mips_insn16_frame_cache (struct frame_info *this_frame, void **this_cache)
struct mips_frame_cache *cache;
if ((*this_cache) != NULL)
- return (*this_cache);
+ return (struct mips_frame_cache *) (*this_cache);
cache = FRAME_OBSTACK_ZALLOC (struct mips_frame_cache);
(*this_cache) = cache;
cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -2836,7 +2836,8 @@ mips_insn16_frame_cache (struct frame_info *this_frame, void **this_cache)
if (start_addr == 0)
return cache;
- mips16_scan_prologue (gdbarch, start_addr, pc, this_frame, *this_cache);
+ mips16_scan_prologue (gdbarch, start_addr, pc, this_frame,
+ (struct mips_frame_cache *) *this_cache);
}
/* gdbarch_sp_regnum contains the value and not the address. */
@@ -2844,7 +2845,7 @@ mips_insn16_frame_cache (struct frame_info *this_frame, void **this_cache)
gdbarch_num_regs (gdbarch) + MIPS_SP_REGNUM,
cache->base);
- return (*this_cache);
+ return (struct mips_frame_cache *) (*this_cache);
}
static void
@@ -3263,7 +3264,7 @@ mips_micro_frame_cache (struct frame_info *this_frame, void **this_cache)
struct mips_frame_cache *cache;
if ((*this_cache) != NULL)
- return (*this_cache);
+ return (struct mips_frame_cache *) (*this_cache);
cache = FRAME_OBSTACK_ZALLOC (struct mips_frame_cache);
(*this_cache) = cache;
@@ -3282,7 +3283,8 @@ mips_micro_frame_cache (struct frame_info *this_frame, void **this_cache)
if (start_addr == 0)
return cache;
- micromips_scan_prologue (gdbarch, start_addr, pc, this_frame, *this_cache);
+ micromips_scan_prologue (gdbarch, start_addr, pc, this_frame,
+ (struct mips_frame_cache *) *this_cache);
}
/* gdbarch_sp_regnum contains the value and not the address. */
@@ -3290,7 +3292,7 @@ mips_micro_frame_cache (struct frame_info *this_frame, void **this_cache)
gdbarch_num_regs (gdbarch) + MIPS_SP_REGNUM,
cache->base);
- return (*this_cache);
+ return (struct mips_frame_cache *) (*this_cache);
}
static void
@@ -3640,7 +3642,7 @@ mips_insn32_frame_cache (struct frame_info *this_frame, void **this_cache)
struct mips_frame_cache *cache;
if ((*this_cache) != NULL)
- return (*this_cache);
+ return (struct mips_frame_cache *) (*this_cache);
cache = FRAME_OBSTACK_ZALLOC (struct mips_frame_cache);
(*this_cache) = cache;
@@ -3659,7 +3661,8 @@ mips_insn32_frame_cache (struct frame_info *this_frame, void **this_cache)
if (start_addr == 0)
return cache;
- mips32_scan_prologue (gdbarch, start_addr, pc, this_frame, *this_cache);
+ mips32_scan_prologue (gdbarch, start_addr, pc, this_frame,
+ (struct mips_frame_cache *) *this_cache);
}
/* gdbarch_sp_regnum contains the value and not the address. */
@@ -3667,7 +3670,7 @@ mips_insn32_frame_cache (struct frame_info *this_frame, void **this_cache)
gdbarch_num_regs (gdbarch) + MIPS_SP_REGNUM,
cache->base);
- return (*this_cache);
+ return (struct mips_frame_cache *) (*this_cache);
}
static void
@@ -3749,7 +3752,7 @@ mips_stub_frame_cache (struct frame_info *this_frame, void **this_cache)
int num_regs = gdbarch_num_regs (gdbarch);
if ((*this_cache) != NULL)
- return (*this_cache);
+ return (struct trad_frame_cache *) (*this_cache);
this_trad_cache = trad_frame_cache_zalloc (this_frame);
(*this_cache) = this_trad_cache;
@@ -7035,7 +7038,7 @@ reinit_frame_cache_sfunc (char *args, int from_tty,
static int
gdb_print_insn_mips (bfd_vma memaddr, struct disassemble_info *info)
{
- struct gdbarch *gdbarch = info->application_data;
+ struct gdbarch *gdbarch = (struct gdbarch *) info->application_data;
/* FIXME: cagney/2003-06-26: Is this even necessary? The
disassembler needs to be able to locally determine the ISA, and
@@ -8186,7 +8189,7 @@ mips_register_g_packet_guesses (struct gdbarch *gdbarch)
static struct value *
value_of_mips_user_reg (struct frame_info *frame, const void *baton)
{
- const int *reg_p = baton;
+ const int *reg_p = (const int *) baton;
return value_of_register (*reg_p, frame);
}
@@ -8895,7 +8898,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
mips_register_g_packet_guesses (gdbarch);
/* Hook in OS ABI-specific overrides, if they have been registered. */
- info.tdep_info = (void *) tdesc_data;
+ info.tdep_info = (struct gdbarch_tdep_info *) tdesc_data;
gdbarch_init_osabi (info, gdbarch);
/* The hook may have adjusted num_regs, fetch the final value and
diff --git a/gdb/mips64obsd-tdep.c b/gdb/mips64obsd-tdep.c
index 3150155..a3921c1 100644
--- a/gdb/mips64obsd-tdep.c
+++ b/gdb/mips64obsd-tdep.c
@@ -46,7 +46,7 @@ mips64obsd_supply_gregset (const struct regset *regset,
struct regcache *regcache, int regnum,
const void *gregs, size_t len)
{
- const char *regs = gregs;
+ const char *regs = (const char *) gregs;
int i;
for (i = 0; i < MIPS64OBSD_NUM_REGS; i++)
diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c
index 7cb83c0..390c088 100644
--- a/gdb/mipsnbsd-tdep.c
+++ b/gdb/mipsnbsd-tdep.c
@@ -56,7 +56,7 @@ mipsnbsd_supply_fpregset (const struct regset *regset,
int regnum, const void *fpregs, size_t len)
{
size_t regsize = mips_isa_regsize (get_regcache_arch (regcache));
- const char *regs = fpregs;
+ const char *regs = (const char *) fpregs;
int i;
gdb_assert (len >= MIPSNBSD_NUM_FPREGS * regsize);
@@ -79,7 +79,7 @@ mipsnbsd_supply_gregset (const struct regset *regset,
const void *gregs, size_t len)
{
size_t regsize = mips_isa_regsize (get_regcache_arch (regcache));
- const char *regs = gregs;
+ const char *regs = (const char *) gregs;
int i;
gdb_assert (len >= MIPSNBSD_NUM_GREGS * regsize);
diff --git a/gdb/mn10300-linux-tdep.c b/gdb/mn10300-linux-tdep.c
index 9ac6c15..519c44f 100644
--- a/gdb/mn10300-linux-tdep.c
+++ b/gdb/mn10300-linux-tdep.c
@@ -243,7 +243,8 @@ am33_supply_fpregset_method (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
- const mn10300_elf_fpregset_t *fpregset = fpregs;
+ const mn10300_elf_fpregset_t *fpregset =
+ (const mn10300_elf_fpregset_t *) fpregs;
gdb_assert (len >= sizeof (mn10300_elf_fpregset_t));
@@ -275,7 +276,7 @@ am33_collect_gregset_method (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs, size_t len)
{
- mn10300_elf_gregset_t *regp = gregs;
+ mn10300_elf_gregset_t *regp = (gdb_byte (*)[28][4]) gregs;
int i;
gdb_assert (len >= sizeof (mn10300_elf_gregset_t));
@@ -423,7 +424,7 @@ am33_collect_fpregset_method (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *fpregs, size_t len)
{
- mn10300_elf_fpregset_t *fpregset = fpregs;
+ mn10300_elf_fpregset_t *fpregset = (mn10300_elf_fpregset_t *) fpregs;
gdb_assert (len >= sizeof (mn10300_elf_fpregset_t));
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index b5e1fa7..c6d018f 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -1092,10 +1092,12 @@ mn10300_analyze_frame_prologue (struct frame_info *this_frame,
stop_addr = func_start;
mn10300_analyze_prologue (get_frame_arch (this_frame),
- func_start, stop_addr, *this_prologue_cache);
+ func_start, stop_addr,
+ ((struct mn10300_prologue *)
+ *this_prologue_cache));
}
- return *this_prologue_cache;
+ return (struct mn10300_prologue *) *this_prologue_cache;
}
/* Given the next frame and a prologue cache, return this frame's
diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c
index 9496314..3236012 100644
--- a/gdb/moxie-tdep.c
+++ b/gdb/moxie-tdep.c
@@ -570,7 +570,7 @@ moxie_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct moxie_frame_cache *) *this_cache;
cache = moxie_alloc_frame_cache ();
*this_cache = cache;
diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c
index 56276af..dfb5a71 100644
--- a/gdb/msp430-tdep.c
+++ b/gdb/msp430-tdep.c
@@ -306,7 +306,8 @@ struct msp430_get_opcode_byte_handle
static int
msp430_get_opcode_byte (void *handle)
{
- struct msp430_get_opcode_byte_handle *opcdata = handle;
+ struct msp430_get_opcode_byte_handle *opcdata =
+ (struct msp430_get_opcode_byte_handle *) handle;
int status;
gdb_byte byte;
@@ -502,10 +503,11 @@ msp430_analyze_frame_prologue (struct frame_info *this_frame,
stop_addr = func_start;
msp430_analyze_prologue (get_frame_arch (this_frame), func_start,
- stop_addr, *this_prologue_cache);
+ stop_addr,
+ (struct msp430_prologue *) *this_prologue_cache);
}
- return *this_prologue_cache;
+ return (struct msp430_prologue *) *this_prologue_cache;
}
/* Given a frame and a prologue cache, return this frame's base. */
diff --git a/gdb/mt-tdep.c b/gdb/mt-tdep.c
index 21d081d..44983f0 100644
--- a/gdb/mt-tdep.c
+++ b/gdb/mt-tdep.c
@@ -915,7 +915,7 @@ mt_frame_unwind_cache (struct frame_info *this_frame,
ULONGEST sp, fp;
if ((*this_prologue_cache))
- return (*this_prologue_cache);
+ return (struct mt_unwind_cache *) (*this_prologue_cache);
gdbarch = get_frame_arch (this_frame);
info = FRAME_OBSTACK_ZALLOC (struct mt_unwind_cache);
diff --git a/gdb/nios2-linux-tdep.c b/gdb/nios2-linux-tdep.c
index 6b483e8..909fecd 100644
--- a/gdb/nios2-linux-tdep.c
+++ b/gdb/nios2-linux-tdep.c
@@ -61,7 +61,7 @@ nios2_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs_buf, size_t len)
{
- const gdb_byte *gregs = gregs_buf;
+ const gdb_byte *gregs = (const gdb_byte *) gregs_buf;
int regno;
static const gdb_byte zero_buf[4] = {0, 0, 0, 0};
@@ -83,7 +83,7 @@ nios2_collect_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs_buf, size_t len)
{
- gdb_byte *gregs = gregs_buf;
+ gdb_byte *gregs = (gdb_byte *) gregs_buf;
int regno;
for (regno = NIOS2_Z_REGNUM; regno <= NIOS2_MPUACC_REGNUM; regno++)
diff --git a/gdb/nios2-tdep.c b/gdb/nios2-tdep.c
index aa59528..3b66dba 100644
--- a/gdb/nios2-tdep.c
+++ b/gdb/nios2-tdep.c
@@ -1920,7 +1920,7 @@ nios2_frame_unwind_cache (struct frame_info *this_frame,
int i;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct nios2_unwind_cache *) *this_prologue_cache;
cache = FRAME_OBSTACK_ZALLOC (struct nios2_unwind_cache);
*this_prologue_cache = cache;
@@ -2028,7 +2028,7 @@ nios2_stub_frame_cache (struct frame_info *this_frame, void **this_cache)
int num_regs = gdbarch_num_regs (gdbarch);
if (*this_cache != NULL)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
this_trad_cache = trad_frame_cache_zalloc (this_frame);
*this_cache = this_trad_cache;
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 227ecc0..f190673 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -981,7 +981,7 @@ find_methods (char type, const char *theclass, const char *category,
unsigned int objfile_csym = 0;
- objc_csym = objfile_data (objfile, objc_objfile_data);
+ objc_csym = (unsigned int *) objfile_data (objfile, objc_objfile_data);
if (objc_csym != NULL && *objc_csym == 0)
/* There are no ObjC symbols in this objfile. Skip it entirely. */
continue;
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 3c74d7c..951d168 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -83,7 +83,7 @@ static const struct program_space_data *objfiles_pspace_data;
static void
objfiles_pspace_data_cleanup (struct program_space *pspace, void *arg)
{
- struct objfile_pspace_info *info = arg;
+ struct objfile_pspace_info *info = (struct objfile_pspace_info *) arg;
xfree (info->sections);
xfree (info);
@@ -97,7 +97,8 @@ get_objfile_pspace_data (struct program_space *pspace)
{
struct objfile_pspace_info *info;
- info = program_space_data (pspace, objfiles_pspace_data);
+ info = ((struct objfile_pspace_info *)
+ program_space_data (pspace, objfiles_pspace_data));
if (info == NULL)
{
info = XCNEW (struct objfile_pspace_info);
@@ -127,7 +128,8 @@ get_objfile_bfd_data (struct objfile *objfile, struct bfd *abfd)
struct objfile_per_bfd_storage *storage = NULL;
if (abfd != NULL)
- storage = bfd_data (abfd, objfiles_bfd_data);
+ storage = ((struct objfile_per_bfd_storage *)
+ bfd_data (abfd, objfiles_bfd_data));
if (storage == NULL)
{
@@ -176,7 +178,7 @@ free_objfile_per_bfd_storage (struct objfile_per_bfd_storage *storage)
static void
objfile_bfd_data_free (struct bfd *unused, void *d)
{
- free_objfile_per_bfd_storage (d);
+ free_objfile_per_bfd_storage ((struct objfile_per_bfd_storage *) d);
}
/* See objfiles.h. */
@@ -320,7 +322,7 @@ static void
add_to_objfile_sections (struct bfd *abfd, struct bfd_section *asect,
void *objfilep)
{
- add_to_objfile_sections_full (abfd, asect, objfilep, 0);
+ add_to_objfile_sections_full (abfd, asect, (struct objfile *) objfilep, 0);
}
/* Builds a section table for OBJFILE.
@@ -755,7 +757,7 @@ free_objfile (struct objfile *objfile)
static void
do_free_objfile_cleanup (void *obj)
{
- free_objfile (obj);
+ free_objfile ((struct objfile *) obj);
}
struct cleanup *
@@ -1522,7 +1524,7 @@ resume_section_map_updates (struct program_space *pspace)
void
resume_section_map_updates_cleanup (void *arg)
{
- resume_section_map_updates (arg);
+ resume_section_map_updates ((struct program_space *) arg);
}
/* Return 1 if ADDR maps into one of the sections of OBJFILE and 0
diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c
index 6583d15..3d17ce4 100644
--- a/gdb/opencl-lang.c
+++ b/gdb/opencl-lang.c
@@ -69,7 +69,7 @@ static struct gdbarch_data *opencl_type_data;
static struct type **
builtin_opencl_type (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, opencl_type_data);
+ return (struct type **) gdbarch_data (gdbarch, opencl_type_data);
}
/* Returns the corresponding OpenCL vector type from the given type code,
diff --git a/gdb/osabi.c b/gdb/osabi.c
index eb5a750..5836033 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -441,7 +441,7 @@ check_note (bfd *abfd, asection *sect, char *note, unsigned int *sectsize,
void
generic_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect, void *obj)
{
- enum gdb_osabi *osabi = obj;
+ enum gdb_osabi *osabi = (enum gdb_osabi *) obj;
const char *name;
unsigned int sectsize;
char *note;
diff --git a/gdb/osdata.c b/gdb/osdata.c
index d33026c..f4458dc 100644
--- a/gdb/osdata.c
+++ b/gdb/osdata.c
@@ -58,14 +58,14 @@ osdata_start_osdata (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct osdata_parsing_data *data = user_data;
+ struct osdata_parsing_data *data = (struct osdata_parsing_data *) user_data;
char *type;
struct osdata *osdata;
if (data->osdata)
gdb_xml_error (parser, _("Seen more than on osdata element"));
- type = xml_find_attribute (attributes, "type")->value;
+ type = (char *) xml_find_attribute (attributes, "type")->value;
osdata = XCNEW (struct osdata);
osdata->type = xstrdup (type);
data->osdata = osdata;
@@ -78,7 +78,7 @@ osdata_start_item (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct osdata_parsing_data *data = user_data;
+ struct osdata_parsing_data *data = (struct osdata_parsing_data *) user_data;
struct osdata_item item = { NULL };
VEC_safe_push (osdata_item_s, data->osdata->items, &item);
@@ -91,8 +91,9 @@ osdata_start_column (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct osdata_parsing_data *data = user_data;
- const char *name = xml_find_attribute (attributes, "name")->value;
+ struct osdata_parsing_data *data = (struct osdata_parsing_data *) user_data;
+ const char *name =
+ (const char *) xml_find_attribute (attributes, "name")->value;
data->property_name = xstrdup (name);
}
@@ -104,7 +105,7 @@ osdata_end_column (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct osdata_parsing_data *data = user_data;
+ struct osdata_parsing_data *data = (struct osdata_parsing_data *) user_data;
struct osdata *osdata = data->osdata;
struct osdata_item *item = VEC_last (osdata_item_s, osdata->items);
struct osdata_column *col = VEC_safe_push (osdata_column_s,
@@ -121,7 +122,7 @@ osdata_end_column (struct gdb_xml_parser *parser,
static void
clear_parsing_data (void *p)
{
- struct osdata_parsing_data *data = p;
+ struct osdata_parsing_data *data = (struct osdata_parsing_data *) p;
osdata_free (data->osdata);
data->osdata = NULL;
@@ -229,7 +230,7 @@ osdata_free (struct osdata *osdata)
static void
osdata_free_cleanup (void *arg)
{
- struct osdata *osdata = arg;
+ struct osdata *osdata = (struct osdata *) arg;
osdata_free (osdata);
}
diff --git a/gdb/parse.c b/gdb/parse.c
index 9328468..00caab2 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -1623,7 +1623,7 @@ get_type_stack (void)
void
type_stack_cleanup (void *arg)
{
- struct type_stack *stack = arg;
+ struct type_stack *stack = (struct type_stack *) arg;
xfree (stack->elements);
xfree (stack);
@@ -1900,7 +1900,7 @@ exp_iterate (struct expression *exp,
static int
exp_uses_objfile_iter (struct objfile *exp_objfile, void *objfile_voidp)
{
- struct objfile *objfile = objfile_voidp;
+ struct objfile *objfile = (struct objfile *) objfile_voidp;
if (exp_objfile->separate_debug_objfile_backlink)
exp_objfile = exp_objfile->separate_debug_objfile_backlink;
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 610e44f..af38a96 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -373,7 +373,8 @@ ppc_linux_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const struct ppc_reg_offsets *offsets = regset->regmap;
+ const struct ppc_reg_offsets *offsets =
+ (const struct ppc_reg_offsets *) regset->regmap;
ppc_supply_gregset (regset, regcache, regnum, gregs, len);
@@ -381,13 +382,13 @@ ppc_linux_supply_gregset (const struct regset *regset,
{
/* "orig_r3" is stored 2 slots after "pc". */
if (regnum == -1 || regnum == PPC_ORIG_R3_REGNUM)
- ppc_supply_reg (regcache, PPC_ORIG_R3_REGNUM, gregs,
+ ppc_supply_reg (regcache, PPC_ORIG_R3_REGNUM, (const gdb_byte *) gregs,
offsets->pc_offset + 2 * offsets->gpr_size,
offsets->gpr_size);
/* "trap" is stored 8 slots after "pc". */
if (regnum == -1 || regnum == PPC_TRAP_REGNUM)
- ppc_supply_reg (regcache, PPC_TRAP_REGNUM, gregs,
+ ppc_supply_reg (regcache, PPC_TRAP_REGNUM, (const gdb_byte *) gregs,
offsets->pc_offset + 8 * offsets->gpr_size,
offsets->gpr_size);
}
@@ -398,7 +399,8 @@ ppc_linux_collect_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs, size_t len)
{
- const struct ppc_reg_offsets *offsets = regset->regmap;
+ const struct ppc_reg_offsets *offsets =
+ (const struct ppc_reg_offsets *) regset->regmap;
/* Clear areas in the linux gregset not written elsewhere. */
if (regnum == -1)
@@ -410,13 +412,13 @@ ppc_linux_collect_gregset (const struct regset *regset,
{
/* "orig_r3" is stored 2 slots after "pc". */
if (regnum == -1 || regnum == PPC_ORIG_R3_REGNUM)
- ppc_collect_reg (regcache, PPC_ORIG_R3_REGNUM, gregs,
+ ppc_collect_reg (regcache, PPC_ORIG_R3_REGNUM, (gdb_byte *) gregs,
offsets->pc_offset + 2 * offsets->gpr_size,
offsets->gpr_size);
/* "trap" is stored 8 slots after "pc". */
if (regnum == -1 || regnum == PPC_TRAP_REGNUM)
- ppc_collect_reg (regcache, PPC_TRAP_REGNUM, gregs,
+ ppc_collect_reg (regcache, PPC_TRAP_REGNUM, (gdb_byte *) gregs,
offsets->pc_offset + 8 * offsets->gpr_size,
offsets->gpr_size);
}
@@ -1257,7 +1259,7 @@ struct ppu2spu_cache
static struct gdbarch *
ppu2spu_prev_arch (struct frame_info *this_frame, void **this_cache)
{
- struct ppu2spu_cache *cache = *this_cache;
+ struct ppu2spu_cache *cache = (struct ppu2spu_cache *) *this_cache;
return get_regcache_arch (cache->regcache);
}
@@ -1265,7 +1267,7 @@ static void
ppu2spu_this_id (struct frame_info *this_frame,
void **this_cache, struct frame_id *this_id)
{
- struct ppu2spu_cache *cache = *this_cache;
+ struct ppu2spu_cache *cache = (struct ppu2spu_cache *) *this_cache;
*this_id = cache->frame_id;
}
@@ -1273,7 +1275,7 @@ static struct value *
ppu2spu_prev_register (struct frame_info *this_frame,
void **this_cache, int regnum)
{
- struct ppu2spu_cache *cache = *this_cache;
+ struct ppu2spu_cache *cache = (struct ppu2spu_cache *) *this_cache;
struct gdbarch *gdbarch = get_regcache_arch (cache->regcache);
gdb_byte *buf;
@@ -1298,7 +1300,7 @@ struct ppu2spu_data
static enum register_status
ppu2spu_unwind_register (void *src, int regnum, gdb_byte *buf)
{
- struct ppu2spu_data *data = src;
+ struct ppu2spu_data *data = (struct ppu2spu_data *) src;
enum bfd_endian byte_order = gdbarch_byte_order (data->gdbarch);
if (regnum >= 0 && regnum < SPU_NUM_GPRS)
@@ -1350,7 +1352,7 @@ ppu2spu_sniffer (const struct frame_unwind *self,
info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
info.byte_order = BFD_ENDIAN_BIG;
info.osabi = GDB_OSABI_LINUX;
- info.tdep_info = (void *) &data.id;
+ info.tdep_info = (struct gdbarch_tdep_info *) &data.id;
data.gdbarch = gdbarch_find_by_info (info);
if (!data.gdbarch)
return 0;
@@ -1382,7 +1384,7 @@ ppu2spu_sniffer (const struct frame_unwind *self,
static void
ppu2spu_dealloc_cache (struct frame_info *self, void *this_cache)
{
- struct ppu2spu_cache *cache = this_cache;
+ struct ppu2spu_cache *cache = (struct ppu2spu_cache *) this_cache;
regcache_xfree (cache->regcache);
}
@@ -1633,7 +1635,8 @@ ppc_linux_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info;
+ struct tdesc_arch_data *tdesc_data =
+ (struct tdesc_arch_data *) info.tdep_info;
static const char *const stap_integer_prefixes[] = { "i", NULL };
static const char *const stap_register_indirection_prefixes[] = { "(",
NULL };
diff --git a/gdb/ppcfbsd-tdep.c b/gdb/ppcfbsd-tdep.c
index 04fa750..b5f1046 100644
--- a/gdb/ppcfbsd-tdep.c
+++ b/gdb/ppcfbsd-tdep.c
@@ -219,7 +219,7 @@ ppcfbsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
*this_cache = cache;
diff --git a/gdb/ppcobsd-tdep.c b/gdb/ppcobsd-tdep.c
index ffd91dd..75257f4 100644
--- a/gdb/ppcobsd-tdep.c
+++ b/gdb/ppcobsd-tdep.c
@@ -170,7 +170,7 @@ ppcobsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
*this_cache = cache;
diff --git a/gdb/progspace.c b/gdb/progspace.c
index ea2f8ec..3d7e475 100644
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -215,7 +215,7 @@ set_current_program_space (struct program_space *pspace)
static void
restore_program_space (void *arg)
{
- struct program_space *saved_pspace = arg;
+ struct program_space *saved_pspace = (struct program_space *) arg;
set_current_program_space (saved_pspace);
}
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index f9fafc7..8ac0fc5 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -315,7 +315,8 @@ find_pc_sect_psymtab (struct objfile *objfile, CORE_ADDR pc,
if (objfile->psymtabs_addrmap != NULL)
{
- pst = addrmap_find (objfile->psymtabs_addrmap, pc);
+ pst = ((struct partial_symtab *)
+ addrmap_find (objfile->psymtabs_addrmap, pc));
if (pst != NULL)
{
/* FIXME: addrmaps currently do not handle overlayed sections,
@@ -1489,8 +1490,8 @@ const struct quick_symbol_functions psym_functions =
static int
compare_psymbols (const void *s1p, const void *s2p)
{
- struct partial_symbol *const *s1 = s1p;
- struct partial_symbol *const *s2 = s2p;
+ struct partial_symbol *const *s1 = (struct partial_symbol * const*) s1p;
+ struct partial_symbol *const *s2 = (struct partial_symbol * const*) s2p;
return strcmp_iw_ordered (SYMBOL_SEARCH_NAME (*s1),
SYMBOL_SEARCH_NAME (*s2));
@@ -1624,10 +1625,9 @@ psymbol_bcache_full (struct partial_symbol *sym,
struct psymbol_bcache *bcache,
int *added)
{
- return bcache_full (sym,
- sizeof (struct partial_symbol),
- bcache->bcache,
- added);
+ return ((const struct partial_symbol *)
+ bcache_full (sym, sizeof (struct partial_symbol), bcache->bcache,
+ added));
}
/* Helper function, initialises partial symbol structure and stashes
@@ -1784,8 +1784,9 @@ allocate_psymtab (const char *filename, struct objfile *objfile)
sizeof (struct partial_symtab));
memset (psymtab, 0, sizeof (struct partial_symtab));
- psymtab->filename = bcache (filename, strlen (filename) + 1,
- objfile->per_bfd->filename_cache);
+ psymtab->filename =
+ (const char *) bcache (filename, strlen (filename) + 1,
+ objfile->per_bfd->filename_cache);
psymtab->compunit_symtab = NULL;
/* Prepend it to the psymtab list for the objfile it belongs to.
@@ -1861,7 +1862,7 @@ struct psymtab_state
static void
discard_psymtabs_upto (void *arg)
{
- struct psymtab_state *state = arg;
+ struct psymtab_state *state = (struct psymtab_state *) arg;
while (state->objfile->psymtabs != state->save)
discard_psymtab (state->objfile, state->objfile->psymtabs);
diff --git a/gdb/python/py-block.c b/gdb/python/py-block.c
index 6c0f5cb..91a3d8e 100644
--- a/gdb/python/py-block.c
+++ b/gdb/python/py-block.c
@@ -256,7 +256,8 @@ set_block (block_object *obj, const struct block *block,
if (objfile)
{
obj->objfile = objfile;
- obj->next = objfile_data (objfile, blpy_objfile_data_key);
+ obj->next = ((struct blpy_block_object *)
+ objfile_data (objfile, blpy_objfile_data_key));
if (obj->next)
obj->next->prev = obj;
set_objfile_data (objfile, blpy_objfile_data_key, obj);
@@ -411,7 +412,7 @@ gdbpy_block_for_pc (PyObject *self, PyObject *args)
static void
del_objfile_blocks (struct objfile *objfile, void *datum)
{
- block_object *obj = datum;
+ block_object *obj = (block_object *) datum;
while (obj)
{
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index 30619dc..9c0b0e4 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -720,7 +720,7 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs)
static int
build_bp_list (struct breakpoint *b, void *arg)
{
- PyObject *list = arg;
+ PyObject *list = (PyObject *) arg;
PyObject *bp = (PyObject *) b->py_bp_object;
int iserr = 0;
diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c
index 3cfa1d5..dbc197e 100644
--- a/gdb/python/py-inferior.c
+++ b/gdb/python/py-inferior.c
@@ -242,7 +242,7 @@ inferior_to_inferior_object (struct inferior *inferior)
{
inferior_object *inf_obj;
- inf_obj = inferior_data (inferior, infpy_inf_data_key);
+ inf_obj = (inferior_object *) inferior_data (inferior, infpy_inf_data_key);
if (!inf_obj)
{
inf_obj = PyObject_New (inferior_object, &inferior_object_type);
@@ -456,7 +456,7 @@ infpy_get_was_attached (PyObject *self, void *closure)
static int
build_inferior_list (struct inferior *inf, void *arg)
{
- PyObject *list = arg;
+ PyObject *list = (PyObject *) arg;
PyObject *inferior = inferior_to_inferior_object (inf);
int success = 0;
@@ -833,7 +833,7 @@ py_free_inferior (struct inferior *inf, void *datum)
{
struct cleanup *cleanup;
- inferior_object *inf_obj = datum;
+ inferior_object *inf_obj = (inferior_object *) datum;
struct threadlist_entry *th_entry, *th_tmp;
if (!gdb_python_initialized)
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
index 5dc9ae6..ed2fe74 100644
--- a/gdb/python/py-objfile.c
+++ b/gdb/python/py-objfile.c
@@ -615,7 +615,7 @@ static void
py_free_objfile (struct objfile *objfile, void *datum)
{
struct cleanup *cleanup;
- objfile_object *object = datum;
+ objfile_object *object = (objfile_object *) datum;
cleanup = ensure_python_env (get_objfile_arch (objfile), current_language);
object->objfile = NULL;
@@ -633,7 +633,7 @@ objfile_to_objfile_object (struct objfile *objfile)
{
objfile_object *object;
- object = objfile_data (objfile, objfpy_objfile_data_key);
+ object = (objfile_object *) objfile_data (objfile, objfpy_objfile_data_key);
if (!object)
{
object = PyObject_New (objfile_object, &objfile_object_type);
diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c
index 274ac6c..df21ff0 100644
--- a/gdb/python/py-prettyprint.c
+++ b/gdb/python/py-prettyprint.c
@@ -393,7 +393,7 @@ print_string_repr (PyObject *printer, const char *hint,
static void
py_restore_tstate (void *p)
{
- PyFrameObject *frame = p;
+ PyFrameObject *frame = (PyFrameObject *) p;
PyThreadState *tstate = PyThreadState_GET ();
tstate->frame = frame;
diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c
index 17da3d1..cd48cbb 100644
--- a/gdb/python/py-progspace.c
+++ b/gdb/python/py-progspace.c
@@ -323,7 +323,7 @@ static void
py_free_pspace (struct program_space *pspace, void *datum)
{
struct cleanup *cleanup;
- pspace_object *object = datum;
+ pspace_object *object = (pspace_object *) datum;
/* This is a fiction, but we're in a nasty spot: The pspace is in the
process of being deleted, we can't rely on anything in it. Plus
this is one time when the current program space and current inferior
@@ -351,7 +351,7 @@ pspace_to_pspace_object (struct program_space *pspace)
{
pspace_object *object;
- object = program_space_data (pspace, pspy_pspace_data_key);
+ object = (pspace_object *) program_space_data (pspace, pspy_pspace_data_key);
if (!object)
{
object = PyObject_New (pspace_object, &pspace_object_type);
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
index 3d2fa91..c1511b5 100644
--- a/gdb/python/py-symbol.c
+++ b/gdb/python/py-symbol.c
@@ -308,7 +308,8 @@ set_symbol (symbol_object *obj, struct symbol *symbol)
{
struct objfile *objfile = symbol_objfile (symbol);
- obj->next = objfile_data (objfile, sympy_objfile_data_key);
+ obj->next = ((struct sympy_symbol_object *)
+ objfile_data (objfile, sympy_objfile_data_key));
if (obj->next)
obj->next->prev = obj;
set_objfile_data (objfile, sympy_objfile_data_key, obj);
@@ -485,7 +486,7 @@ gdbpy_lookup_global_symbol (PyObject *self, PyObject *args, PyObject *kw)
static void
del_objfile_symbols (struct objfile *objfile, void *datum)
{
- symbol_object *obj = datum;
+ symbol_object *obj = (symbol_object *) datum;
while (obj)
{
symbol_object *next = obj->next;
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c
index f0ae036..282955b 100644
--- a/gdb/python/py-symtab.c
+++ b/gdb/python/py-symtab.c
@@ -380,8 +380,10 @@ set_sal (sal_object *sal_obj, struct symtab_and_line sal)
objfile cleanup observer linked list. */
if (sal_obj->symtab != (symtab_object *)Py_None)
{
- sal_obj->next = objfile_data (SYMTAB_OBJFILE (sal_obj->symtab->symtab),
- salpy_objfile_data_key);
+ sal_obj->next =
+ ((struct salpy_sal_object *)
+ objfile_data (SYMTAB_OBJFILE (sal_obj->symtab->symtab),
+ salpy_objfile_data_key));
if (sal_obj->next)
sal_obj->next->prev = sal_obj;
@@ -406,8 +408,9 @@ set_symtab (symtab_object *obj, struct symtab *symtab)
obj->prev = NULL;
if (symtab)
{
- obj->next = objfile_data (SYMTAB_OBJFILE (symtab),
- stpy_objfile_data_key);
+ obj->next =
+ ((struct stpy_symtab_object *)
+ objfile_data (SYMTAB_OBJFILE (symtab), stpy_objfile_data_key));
if (obj->next)
obj->next->prev = obj;
set_objfile_data (SYMTAB_OBJFILE (symtab), stpy_objfile_data_key, obj);
@@ -478,7 +481,7 @@ symtab_object_to_symtab (PyObject *obj)
static void
del_objfile_symtab (struct objfile *objfile, void *datum)
{
- symtab_object *obj = datum;
+ symtab_object *obj = (symtab_object *) datum;
while (obj)
{
@@ -499,7 +502,7 @@ del_objfile_symtab (struct objfile *objfile, void *datum)
static void
del_objfile_sal (struct objfile *objfile, void *datum)
{
- sal_object *obj = datum;
+ sal_object *obj = (sal_object *) datum;
while (obj)
{
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index e202c83..7b3f8f9 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -1086,7 +1086,7 @@ static const struct objfile_data *typy_objfile_data_key;
static void
save_objfile_types (struct objfile *objfile, void *datum)
{
- type_object *obj = datum;
+ type_object *obj = (type_object *) datum;
htab_t copied_types;
struct cleanup *cleanup;
@@ -1127,7 +1127,8 @@ set_type (type_object *obj, struct type *type)
{
struct objfile *objfile = TYPE_OBJFILE (type);
- obj->next = objfile_data (objfile, typy_objfile_data_key);
+ obj->next = ((struct pyty_type_object *)
+ objfile_data (objfile, typy_objfile_data_key));
if (obj->next)
obj->next->prev = obj;
set_objfile_data (objfile, typy_objfile_data_key, obj);
diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c
index 7e24ed3..71feb71 100644
--- a/gdb/python/py-unwind.c
+++ b/gdb/python/py-unwind.c
@@ -498,7 +498,7 @@ static struct value *
pyuw_prev_register (struct frame_info *this_frame, void **cache_ptr,
int regnum)
{
- cached_frame_info *cached_frame = *cache_ptr;
+ cached_frame_info *cached_frame = (cached_frame_info *) *cache_ptr;
struct reg_info *reg_info = cached_frame->reg;
struct reg_info *reg_info_end = reg_info + cached_frame->reg_count;
@@ -637,7 +637,7 @@ static void
pyuw_on_new_gdbarch (struct gdbarch *newarch)
{
struct pyuw_gdbarch_data_type *data =
- gdbarch_data (newarch, pyuw_gdbarch_data);
+ (struct pyuw_gdbarch_data_type *) gdbarch_data (newarch, pyuw_gdbarch_data);
if (!data->unwinder_registered)
{
@@ -648,7 +648,7 @@ pyuw_on_new_gdbarch (struct gdbarch *newarch)
unwinder->stop_reason = default_frame_unwind_stop_reason;
unwinder->this_id = pyuw_this_id;
unwinder->prev_register = pyuw_prev_register;
- unwinder->unwind_data = (void *) newarch;
+ unwinder->unwind_data = (const struct frame_data *) newarch;
unwinder->sniffer = pyuw_sniffer;
unwinder->dealloc_cache = pyuw_dealloc_cache;
frame_unwind_prepend_unwinder (newarch, unwinder);
diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c
index 2e32f11..9a4d1ed 100644
--- a/gdb/python/py-utils.c
+++ b/gdb/python/py-utils.c
@@ -29,7 +29,7 @@
static void
py_decref (void *p)
{
- PyObject *py = p;
+ PyObject *py = (PyObject *) p;
Py_DECREF (py);
}
@@ -50,7 +50,7 @@ make_cleanup_py_decref (PyObject *py)
static void
py_xdecref (void *p)
{
- PyObject *py = p;
+ PyObject *py = (PyObject *) p;
Py_XDECREF (py);
}
@@ -420,7 +420,7 @@ PyObject *
gdb_py_generic_dict (PyObject *self, void *closure)
{
PyObject *result;
- PyTypeObject *type_obj = closure;
+ PyTypeObject *type_obj = (PyTypeObject *) closure;
char *raw_ptr;
raw_ptr = (char *) self + type_obj->tp_dictoffset;
diff --git a/gdb/python/py-xmethods.c b/gdb/python/py-xmethods.c
index 91e2691..fe8864c 100644
--- a/gdb/python/py-xmethods.c
+++ b/gdb/python/py-xmethods.c
@@ -54,7 +54,7 @@ void
gdbpy_free_xmethod_worker_data (const struct extension_language_defn *extlang,
void *data)
{
- struct gdbpy_worker_data *worker_data = data;
+ struct gdbpy_worker_data *worker_data = (struct gdbpy_worker_data *) data;
struct cleanup *cleanups;
gdb_assert (worker_data->worker != NULL && worker_data->this_type != NULL);
@@ -75,7 +75,8 @@ void *
gdbpy_clone_xmethod_worker_data (const struct extension_language_defn *extlang,
void *data)
{
- struct gdbpy_worker_data *worker_data = data, *new_data;
+ struct gdbpy_worker_data *worker_data =
+ (struct gdbpy_worker_data *) data, *new_data;
struct cleanup *cleanups;
gdb_assert (worker_data->worker != NULL && worker_data->this_type != NULL);
@@ -379,7 +380,8 @@ gdbpy_get_xmethod_arg_types (const struct extension_language_defn *extlang,
struct xmethod_worker *worker,
int *nargs, struct type ***arg_types)
{
- struct gdbpy_worker_data *worker_data = worker->data;
+ struct gdbpy_worker_data *worker_data =
+ (struct gdbpy_worker_data *) worker->data;
PyObject *py_worker = worker_data->worker;
PyObject *get_arg_types_method;
PyObject *py_argtype_list, *list_iter = NULL, *item;
@@ -513,7 +515,8 @@ gdbpy_get_xmethod_result_type (const struct extension_language_defn *extlang,
struct value **args, int nargs,
struct type **result_type_ptr)
{
- struct gdbpy_worker_data *worker_data = worker->data;
+ struct gdbpy_worker_data *worker_data =
+ (struct gdbpy_worker_data *) worker->data;
PyObject *py_worker = worker_data->worker;
PyObject *py_value_obj, *py_arg_tuple, *py_result_type;
PyObject *get_result_type_method;
@@ -616,7 +619,8 @@ gdbpy_invoke_xmethod (const struct extension_language_defn *extlang,
PyObject *py_value_obj, *py_arg_tuple, *py_result;
struct type *obj_type, *this_type;
struct value *res = NULL;
- struct gdbpy_worker_data *worker_data = worker->data;
+ struct gdbpy_worker_data *worker_data =
+ (struct gdbpy_worker_data *) worker->data;
PyObject *xmethod_worker = worker_data->worker;
cleanups = ensure_python_env (get_current_arch (), current_language);
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 2031c0c..1c2d5c6 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1458,7 +1458,7 @@ gdbpy_apply_type_printers (const struct extension_language_defn *extlang,
struct cleanup *cleanups;
PyObject *type_obj, *type_module = NULL, *func = NULL;
PyObject *result_obj = NULL;
- PyObject *printers_obj = ext_printers->py_type_printers;
+ PyObject *printers_obj = (PyObject *) ext_printers->py_type_printers;
char *result = NULL;
if (printers_obj == NULL)
@@ -1524,7 +1524,7 @@ gdbpy_free_type_printers (const struct extension_language_defn *extlang,
struct ext_lang_type_printers *ext_printers)
{
struct cleanup *cleanups;
- PyObject *printers = ext_printers->py_type_printers;
+ PyObject *printers = (PyObject *) ext_printers->py_type_printers;
if (printers == NULL)
return;
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index d14e6cf..ee7bd95 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -160,9 +160,7 @@ record_btrace_enable_warn (struct thread_info *tp)
static void
record_btrace_disable_callback (void *arg)
{
- struct thread_info *tp;
-
- tp = arg;
+ struct thread_info *tp = (struct thread_info *) arg;
btrace_disable (tp);
}
@@ -1370,7 +1368,8 @@ static htab_t bfcache;
static hashval_t
bfcache_hash (const void *arg)
{
- const struct btrace_frame_cache *cache = arg;
+ const struct btrace_frame_cache *cache =
+ (const struct btrace_frame_cache *) arg;
return htab_hash_pointer (cache->frame);
}
@@ -1380,8 +1379,10 @@ bfcache_hash (const void *arg)
static int
bfcache_eq (const void *arg1, const void *arg2)
{
- const struct btrace_frame_cache *cache1 = arg1;
- const struct btrace_frame_cache *cache2 = arg2;
+ const struct btrace_frame_cache *cache1 =
+ (const struct btrace_frame_cache *) arg1;
+ const struct btrace_frame_cache *cache2 =
+ (const struct btrace_frame_cache *) arg2;
return cache1->frame == cache2->frame;
}
@@ -1420,7 +1421,7 @@ btrace_get_frame_function (struct frame_info *frame)
if (slot == NULL)
return NULL;
- cache = *slot;
+ cache = (const struct btrace_frame_cache *) *slot;
return cache->bfun;
}
@@ -1433,7 +1434,7 @@ record_btrace_frame_unwind_stop_reason (struct frame_info *this_frame,
const struct btrace_frame_cache *cache;
const struct btrace_function *bfun;
- cache = *this_cache;
+ cache = (const struct btrace_frame_cache *) *this_cache;
bfun = cache->bfun;
gdb_assert (bfun != NULL);
@@ -1453,7 +1454,7 @@ record_btrace_frame_this_id (struct frame_info *this_frame, void **this_cache,
const struct btrace_function *bfun;
CORE_ADDR code, special;
- cache = *this_cache;
+ cache = (const struct btrace_frame_cache *) *this_cache;
bfun = cache->bfun;
gdb_assert (bfun != NULL);
@@ -1492,7 +1493,7 @@ record_btrace_frame_prev_register (struct frame_info *this_frame,
throw_error (NOT_AVAILABLE_ERROR,
_("Registers are not available in btrace record history"));
- cache = *this_cache;
+ cache = (const struct btrace_frame_cache *) *this_cache;
bfun = cache->bfun;
gdb_assert (bfun != NULL);
@@ -1615,7 +1616,7 @@ record_btrace_frame_dealloc_cache (struct frame_info *self, void *this_cache)
struct btrace_frame_cache *cache;
void **slot;
- cache = this_cache;
+ cache = (struct btrace_frame_cache *) this_cache;
slot = htab_find_slot (bfcache, cache, NO_INSERT);
gdb_assert (slot != NULL);
diff --git a/gdb/record-full.c b/gdb/record-full.c
index e2a36cf..c4c4dbd 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -651,7 +651,8 @@ struct record_full_message_args {
static int
record_full_message_wrapper (void *args)
{
- struct record_full_message_args *record_full_args = args;
+ struct record_full_message_args *record_full_args =
+ (struct record_full_message_args *) args;
return record_full_message (record_full_args->regcache,
record_full_args->signal);
@@ -2521,7 +2522,7 @@ cmd_record_full_restore (char *args, int from_tty)
static void
record_full_save_cleanups (void *data)
{
- bfd *obfd = data;
+ bfd *obfd = (bfd *) data;
char *pathname = xstrdup (bfd_get_filename (obfd));
gdb_bfd_unref (obfd);
diff --git a/gdb/regcache.c b/gdb/regcache.c
index c78c142..41c7aca 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -147,7 +147,8 @@ init_regcache_descr (struct gdbarch *gdbarch)
static struct regcache_descr *
regcache_descr (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, regcache_descr_handle);
+ return (struct regcache_descr *) gdbarch_data (gdbarch,
+ regcache_descr_handle);
}
/* Utility functions returning useful register attributes stored in
@@ -256,7 +257,7 @@ regcache_xfree (struct regcache *regcache)
static void
do_regcache_xfree (void *data)
{
- regcache_xfree (data);
+ regcache_xfree ((struct regcache *) data);
}
struct cleanup *
@@ -276,7 +277,7 @@ struct register_to_invalidate
static void
do_regcache_invalidate (void *data)
{
- struct register_to_invalidate *reg = data;
+ struct register_to_invalidate *reg = (struct register_to_invalidate *) data;
regcache_invalidate (reg->regcache, reg->regnum);
}
@@ -386,7 +387,7 @@ regcache_restore (struct regcache *dst,
static enum register_status
do_cooked_read (void *src, int regnum, gdb_byte *buf)
{
- struct regcache *regcache = src;
+ struct regcache *regcache = (struct regcache *) src;
return regcache_cooked_read (regcache, regnum, buf);
}
@@ -1095,7 +1096,9 @@ regcache_transfer_regset (const struct regset *regset,
const struct regcache_map_entry *map;
int offs = 0, count;
- for (map = regset->regmap; (count = map->count) != 0; map++)
+ for (map = (const struct regcache_map_entry *) regset->regmap;
+ (count = map->count) != 0;
+ map++)
{
int regno = map->regno;
int slot_size = map->size;
diff --git a/gdb/reggroups.c b/gdb/reggroups.c
index 745c5ea..39a84d4 100644
--- a/gdb/reggroups.c
+++ b/gdb/reggroups.c
@@ -102,13 +102,14 @@ add_group (struct reggroups *groups, struct reggroup *group,
void
reggroup_add (struct gdbarch *gdbarch, struct reggroup *group)
{
- struct reggroups *groups = gdbarch_data (gdbarch, reggroups_data);
+ struct reggroups *groups =
+ (struct reggroups *) gdbarch_data (gdbarch, reggroups_data);
if (groups == NULL)
{
/* ULGH, called during architecture initialization. Patch
things up. */
- groups = reggroups_init (gdbarch);
+ groups = (struct reggroups *) reggroups_init (gdbarch);
deprecated_set_gdbarch_data (gdbarch, reggroups_data, groups);
}
add_group (groups, group,
@@ -129,7 +130,7 @@ reggroup_next (struct gdbarch *gdbarch, struct reggroup *last)
/* Don't allow this function to be called during architecture
creation. If there are no groups, use the default groups list. */
- groups = gdbarch_data (gdbarch, reggroups_data);
+ groups = (struct reggroups *) gdbarch_data (gdbarch, reggroups_data);
gdb_assert (groups != NULL);
if (groups->first == NULL)
groups = &default_groups;
@@ -161,7 +162,7 @@ reggroup_prev (struct gdbarch *gdbarch, struct reggroup *curr)
/* Don't allow this function to be called during architecture
creation. If there are no groups, use the default groups list. */
- groups = gdbarch_data (gdbarch, reggroups_data);
+ groups = (struct reggroups *) gdbarch_data (gdbarch, reggroups_data);
gdb_assert (groups != NULL);
if (groups->first == NULL)
groups = &default_groups;
diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c
index d84b3ff..8bad485 100644
--- a/gdb/remote-fileio.c
+++ b/gdb/remote-fileio.c
@@ -1185,7 +1185,7 @@ static struct {
static int
do_remote_fileio_request (struct ui_out *uiout, void *buf_arg)
{
- char *buf = buf_arg;
+ char *buf = (char *) buf_arg;
char *c;
int idx;
diff --git a/gdb/remote-notif.c b/gdb/remote-notif.c
index 3241e78..a8a6285 100644
--- a/gdb/remote-notif.c
+++ b/gdb/remote-notif.c
@@ -117,7 +117,7 @@ static void
remote_async_get_pending_events_handler (gdb_client_data data)
{
gdb_assert (non_stop);
- remote_notif_process (data, NULL);
+ remote_notif_process ((struct remote_notif_state *) data, NULL);
}
/* Remote notification handler. Parse BUF, queue notification and
@@ -230,7 +230,7 @@ notif_event_xfree (struct notif_event *event)
static void
do_notif_event_xfree (void *arg)
{
- notif_event_xfree (arg);
+ notif_event_xfree ((struct notif_event *) arg);
}
/* Return an allocated remote_notif_state. */
diff --git a/gdb/remote.c b/gdb/remote.c
index 11be6bb..095be60 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -616,7 +616,8 @@ static struct remote_arch_state *
get_remote_arch_state (void)
{
gdb_assert (target_gdbarch () != NULL);
- return gdbarch_data (target_gdbarch (), remote_gdbarch_data_handle);
+ return ((struct remote_arch_state *)
+ gdbarch_data (target_gdbarch (), remote_gdbarch_data_handle));
}
/* Fetch the global remote target state. */
@@ -639,7 +640,7 @@ get_remote_state (void)
static void
remote_pspace_data_cleanup (struct program_space *pspace, void *arg)
{
- char *remote_exec_file = arg;
+ char *remote_exec_file = (char *) arg;
xfree (remote_exec_file);
}
@@ -651,8 +652,9 @@ get_remote_exec_file (void)
{
char *remote_exec_file;
- remote_exec_file = program_space_data (current_program_space,
- remote_pspace_data);
+ remote_exec_file =
+ (char *) program_space_data (current_program_space,
+ remote_pspace_data);
if (remote_exec_file == NULL)
return "";
@@ -665,7 +667,7 @@ static void
set_pspace_remote_exec_file (struct program_space *pspace,
char *remote_exec_file)
{
- char *old_file = program_space_data (pspace, remote_pspace_data);
+ char *old_file = (char *) program_space_data (pspace, remote_pspace_data);
xfree (old_file);
set_program_space_data (pspace, remote_pspace_data,
@@ -694,8 +696,10 @@ show_remote_exec_file (struct ui_file *file, int from_tty,
static int
compare_pnums (const void *lhs_, const void *rhs_)
{
- const struct packet_reg * const *lhs = lhs_;
- const struct packet_reg * const *rhs = rhs_;
+ const struct packet_reg * const *lhs =
+ (const struct packet_reg * const *) lhs_;
+ const struct packet_reg * const *rhs =
+ (const struct packet_reg * const *) rhs_;
if ((*lhs)->pnum < (*rhs)->pnum)
return -1;
@@ -2837,7 +2841,8 @@ struct threads_listing_context
static void
clear_threads_listing_context (void *p)
{
- struct threads_listing_context *context = p;
+ struct threads_listing_context *context =
+ (struct threads_listing_context *) p;
int i;
struct thread_item *item;
@@ -2871,7 +2876,8 @@ threads_listing_context_remove (struct target_waitstatus *ws,
static int
remote_newthread_step (threadref *ref, void *data)
{
- struct threads_listing_context *context = data;
+ struct threads_listing_context *context =
+ (struct threads_listing_context *) data;
struct thread_item item;
int pid = ptid_get_pid (inferior_ptid);
@@ -2929,13 +2935,14 @@ start_thread (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct threads_listing_context *data = user_data;
+ struct threads_listing_context *data =
+ (struct threads_listing_context *) user_data;
struct thread_item item;
char *id;
struct gdb_xml_value *attr;
- id = xml_find_attribute (attributes, "id")->value;
+ id = (char *) xml_find_attribute (attributes, "id")->value;
item.ptid = read_ptid (id, NULL);
attr = xml_find_attribute (attributes, "core");
@@ -2954,7 +2961,8 @@ end_thread (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct threads_listing_context *data = user_data;
+ struct threads_listing_context *data =
+ (struct threads_listing_context *) user_data;
if (body_text && *body_text)
VEC_last (thread_item_t, data->items)->extra = xstrdup (body_text);
@@ -5837,8 +5845,9 @@ remove_child_of_pending_fork (QUEUE (stop_reply_p) *q,
stop_reply_p event,
void *data)
{
- struct queue_iter_param *param = data;
- struct threads_listing_context *context = param->input;
+ struct queue_iter_param *param = (struct queue_iter_param *) data;
+ struct threads_listing_context *context =
+ (struct threads_listing_context *) param->input;
if (event->ws.kind == TARGET_WAITKIND_FORKED
|| event->ws.kind == TARGET_WAITKIND_VFORKED)
@@ -5894,8 +5903,8 @@ remove_stop_reply_for_inferior (QUEUE (stop_reply_p) *q,
stop_reply_p event,
void *data)
{
- struct queue_iter_param *param = data;
- struct inferior *inf = param->input;
+ struct queue_iter_param *param = (struct queue_iter_param *) data;
+ struct inferior *inf = (struct inferior *) param->input;
if (ptid_get_pid (event->ptid) == inf->pid)
{
@@ -5948,8 +5957,8 @@ remove_stop_reply_of_remote_state (QUEUE (stop_reply_p) *q,
stop_reply_p event,
void *data)
{
- struct queue_iter_param *param = data;
- struct remote_state *rs = param->input;
+ struct queue_iter_param *param = (struct queue_iter_param *) data;
+ struct remote_state *rs = (struct remote_state *) param->input;
if (event->rs == rs)
{
@@ -5983,8 +5992,8 @@ remote_notif_remove_once_on_match (QUEUE (stop_reply_p) *q,
stop_reply_p event,
void *data)
{
- struct queue_iter_param *param = data;
- ptid_t *ptid = param->input;
+ struct queue_iter_param *param = (struct queue_iter_param *) data;
+ ptid_t *ptid = (ptid_t *) param->input;
if (ptid_match (event->ptid, *ptid))
{
@@ -6059,7 +6068,7 @@ stop_reply_match_ptid_and_ws (QUEUE (stop_reply_p) *q,
struct stop_reply *event,
void *data)
{
- ptid_t *ptid = data;
+ ptid_t *ptid = (ptid_t *) data;
return !(ptid_equal (*ptid, event->ptid)
&& event->ws.kind == TARGET_WAITKIND_STOPPED);
@@ -8504,7 +8513,7 @@ kill_child_of_pending_fork (QUEUE (stop_reply_p) *q,
stop_reply_p event,
void *data)
{
- struct queue_iter_param *param = data;
+ struct queue_iter_param *param = (struct queue_iter_param *) data;
int parent_pid = *(int *) param->input;
if (is_pending_fork_parent (&event->ws, parent_pid, event->ptid))
@@ -10355,8 +10364,9 @@ void
register_remote_g_packet_guess (struct gdbarch *gdbarch, int bytes,
const struct target_desc *tdesc)
{
- struct remote_g_packet_data *data
- = gdbarch_data (gdbarch, remote_g_packet_data_handle);
+ struct remote_g_packet_data *data =
+ ((struct remote_g_packet_data *)
+ gdbarch_data (gdbarch, remote_g_packet_data_handle));
struct remote_g_packet_guess new_guess, *guess;
int ix;
@@ -10381,8 +10391,9 @@ register_remote_g_packet_guess (struct gdbarch *gdbarch, int bytes,
static int
remote_read_description_p (struct target_ops *target)
{
- struct remote_g_packet_data *data
- = gdbarch_data (target_gdbarch (), remote_g_packet_data_handle);
+ struct remote_g_packet_data *data =
+ ((struct remote_g_packet_data *)
+ gdbarch_data (target_gdbarch (), remote_g_packet_data_handle));
if (!VEC_empty (remote_g_packet_guess_s, data->guesses))
return 1;
@@ -10393,8 +10404,9 @@ remote_read_description_p (struct target_ops *target)
static const struct target_desc *
remote_read_description (struct target_ops *target)
{
- struct remote_g_packet_data *data
- = gdbarch_data (target_gdbarch (), remote_g_packet_data_handle);
+ struct remote_g_packet_data *data =
+ ((struct remote_g_packet_data *)
+ gdbarch_data (target_gdbarch (), remote_g_packet_data_handle));
/* Do not try this during initial connection, when we do not know
whether there is a running but stopped thread. */
@@ -11458,7 +11470,7 @@ static void free_actions_list_cleanup_wrapper (void *);
static void
free_actions_list_cleanup_wrapper (void *al)
{
- free_actions_list (al);
+ free_actions_list ((char **) al);
}
static void
@@ -12898,7 +12910,7 @@ static serial_event_ftype remote_async_serial_handler;
static void
remote_async_serial_handler (struct serial *scb, void *context)
{
- struct remote_state *rs = context;
+ struct remote_state *rs = (struct remote_state *) context;
/* Don't propogate error information up to the client. Instead let
the client find out about the error by querying the target. */
diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c
index 0f8790f..fcc9a77 100644
--- a/gdb/rl78-tdep.c
+++ b/gdb/rl78-tdep.c
@@ -851,7 +851,8 @@ opc_reg_to_gdb_regnum (int opcreg)
static int
rl78_get_opcode_byte (void *handle)
{
- struct rl78_get_opcode_byte_handle *opcdata = handle;
+ struct rl78_get_opcode_byte_handle *opcdata =
+ (struct rl78_get_opcode_byte_handle *) handle;
int status;
gdb_byte byte;
@@ -1104,10 +1105,11 @@ rl78_analyze_frame_prologue (struct frame_info *this_frame,
if (!func_start)
stop_addr = func_start;
- rl78_analyze_prologue (func_start, stop_addr, *this_prologue_cache);
+ rl78_analyze_prologue (func_start, stop_addr,
+ (struct rl78_prologue *) *this_prologue_cache);
}
- return *this_prologue_cache;
+ return (struct rl78_prologue *) *this_prologue_cache;
}
/* Given a frame and a prologue cache, return this frame's base. */
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 14f121a..0a387d7 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -507,7 +507,8 @@ ppc_supply_gregset (const struct regset *regset, struct regcache *regcache,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- const struct ppc_reg_offsets *offsets = regset->regmap;
+ const struct ppc_reg_offsets *offsets =
+ (const struct ppc_reg_offsets *) regset->regmap;
size_t offset;
int regsize;
@@ -519,27 +520,31 @@ ppc_supply_gregset (const struct regset *regset, struct regcache *regcache,
for (i = tdep->ppc_gp0_regnum, offset = offsets->r0_offset;
i < tdep->ppc_gp0_regnum + ppc_num_gprs;
i++, offset += gpr_size)
- ppc_supply_reg (regcache, i, gregs, offset, gpr_size);
+ ppc_supply_reg (regcache, i, (const gdb_byte *) gregs, offset,
+ gpr_size);
ppc_supply_reg (regcache, gdbarch_pc_regnum (gdbarch),
- gregs, offsets->pc_offset, gpr_size);
+ (const gdb_byte *) gregs, offsets->pc_offset, gpr_size);
ppc_supply_reg (regcache, tdep->ppc_ps_regnum,
- gregs, offsets->ps_offset, gpr_size);
+ (const gdb_byte *) gregs, offsets->ps_offset, gpr_size);
ppc_supply_reg (regcache, tdep->ppc_lr_regnum,
- gregs, offsets->lr_offset, gpr_size);
+ (const gdb_byte *) gregs, offsets->lr_offset, gpr_size);
ppc_supply_reg (regcache, tdep->ppc_ctr_regnum,
- gregs, offsets->ctr_offset, gpr_size);
+ (const gdb_byte *) gregs, offsets->ctr_offset, gpr_size);
ppc_supply_reg (regcache, tdep->ppc_cr_regnum,
- gregs, offsets->cr_offset, offsets->xr_size);
+ (const gdb_byte *) gregs, offsets->cr_offset,
+ offsets->xr_size);
ppc_supply_reg (regcache, tdep->ppc_xer_regnum,
- gregs, offsets->xer_offset, offsets->xr_size);
+ (const gdb_byte *) gregs, offsets->xer_offset,
+ offsets->xr_size);
ppc_supply_reg (regcache, tdep->ppc_mq_regnum,
- gregs, offsets->mq_offset, offsets->xr_size);
+ (const gdb_byte *) gregs, offsets->mq_offset,
+ offsets->xr_size);
return;
}
offset = ppc_greg_offset (gdbarch, tdep, offsets, regnum, ®size);
- ppc_supply_reg (regcache, regnum, gregs, offset, regsize);
+ ppc_supply_reg (regcache, regnum, (const gdb_byte *) gregs, offset, regsize);
}
/* Supply register REGNUM in the floating-point register set REGSET
@@ -559,7 +564,7 @@ ppc_supply_fpregset (const struct regset *regset, struct regcache *regcache,
return;
tdep = gdbarch_tdep (gdbarch);
- offsets = regset->regmap;
+ offsets = (const struct ppc_reg_offsets *) regset->regmap;
if (regnum == -1)
{
int i;
@@ -567,15 +572,16 @@ ppc_supply_fpregset (const struct regset *regset, struct regcache *regcache,
for (i = tdep->ppc_fp0_regnum, offset = offsets->f0_offset;
i < tdep->ppc_fp0_regnum + ppc_num_fprs;
i++, offset += 8)
- ppc_supply_reg (regcache, i, fpregs, offset, 8);
+ ppc_supply_reg (regcache, i, (const gdb_byte *) fpregs, offset, 8);
ppc_supply_reg (regcache, tdep->ppc_fpscr_regnum,
- fpregs, offsets->fpscr_offset, offsets->fpscr_size);
+ (const gdb_byte *) fpregs, offsets->fpscr_offset,
+ offsets->fpscr_size);
return;
}
offset = ppc_fpreg_offset (tdep, offsets, regnum);
- ppc_supply_reg (regcache, regnum, fpregs, offset,
+ ppc_supply_reg (regcache, regnum, (const gdb_byte *) fpregs, offset,
regnum == tdep->ppc_fpscr_regnum ? offsets->fpscr_size : 8);
}
@@ -602,12 +608,12 @@ ppc_supply_vsxregset (const struct regset *regset, struct regcache *regcache,
for (i = tdep->ppc_vsr0_upper_regnum;
i < tdep->ppc_vsr0_upper_regnum + 32;
i++)
- ppc_supply_reg (regcache, i, vsxregs, 0, 8);
+ ppc_supply_reg (regcache, i, (const gdb_byte *) vsxregs, 0, 8);
return;
}
else
- ppc_supply_reg (regcache, regnum, vsxregs, 0, 8);
+ ppc_supply_reg (regcache, regnum, (const gdb_byte *) vsxregs, 0, 8);
}
/* Supply register REGNUM in the Altivec register set REGSET
@@ -627,7 +633,7 @@ ppc_supply_vrregset (const struct regset *regset, struct regcache *regcache,
return;
tdep = gdbarch_tdep (gdbarch);
- offsets = regset->regmap;
+ offsets = (const struct ppc_reg_offsets *) regset->regmap;
if (regnum == -1)
{
int i;
@@ -635,23 +641,23 @@ ppc_supply_vrregset (const struct regset *regset, struct regcache *regcache,
for (i = tdep->ppc_vr0_regnum, offset = offsets->vr0_offset;
i < tdep->ppc_vr0_regnum + ppc_num_vrs;
i++, offset += 16)
- ppc_supply_reg (regcache, i, vrregs, offset, 16);
+ ppc_supply_reg (regcache, i, (const gdb_byte *) vrregs, offset, 16);
ppc_supply_reg (regcache, (tdep->ppc_vrsave_regnum - 1),
- vrregs, offsets->vscr_offset, 4);
+ (const gdb_byte *) vrregs, offsets->vscr_offset, 4);
ppc_supply_reg (regcache, tdep->ppc_vrsave_regnum,
- vrregs, offsets->vrsave_offset, 4);
+ (const gdb_byte *) vrregs, offsets->vrsave_offset, 4);
return;
}
offset = ppc_vrreg_offset (tdep, offsets, regnum);
if (regnum != tdep->ppc_vrsave_regnum
&& regnum != tdep->ppc_vrsave_regnum - 1)
- ppc_supply_reg (regcache, regnum, vrregs, offset, 16);
+ ppc_supply_reg (regcache, regnum, (const gdb_byte *) vrregs, offset, 16);
else
ppc_supply_reg (regcache, regnum,
- vrregs, offset, 4);
+ (const gdb_byte *) vrregs, offset, 4);
}
/* Collect register REGNUM in the general-purpose register set
@@ -666,7 +672,8 @@ ppc_collect_gregset (const struct regset *regset,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- const struct ppc_reg_offsets *offsets = regset->regmap;
+ const struct ppc_reg_offsets *offsets =
+ (const struct ppc_reg_offsets *) regset->regmap;
size_t offset;
int regsize;
@@ -678,27 +685,30 @@ ppc_collect_gregset (const struct regset *regset,
for (i = tdep->ppc_gp0_regnum, offset = offsets->r0_offset;
i < tdep->ppc_gp0_regnum + ppc_num_gprs;
i++, offset += gpr_size)
- ppc_collect_reg (regcache, i, gregs, offset, gpr_size);
+ ppc_collect_reg (regcache, i, (gdb_byte *) gregs, offset, gpr_size);
ppc_collect_reg (regcache, gdbarch_pc_regnum (gdbarch),
- gregs, offsets->pc_offset, gpr_size);
+ (gdb_byte *) gregs, offsets->pc_offset, gpr_size);
ppc_collect_reg (regcache, tdep->ppc_ps_regnum,
- gregs, offsets->ps_offset, gpr_size);
+ (gdb_byte *) gregs, offsets->ps_offset, gpr_size);
ppc_collect_reg (regcache, tdep->ppc_lr_regnum,
- gregs, offsets->lr_offset, gpr_size);
+ (gdb_byte *) gregs, offsets->lr_offset, gpr_size);
ppc_collect_reg (regcache, tdep->ppc_ctr_regnum,
- gregs, offsets->ctr_offset, gpr_size);
+ (gdb_byte *) gregs, offsets->ctr_offset, gpr_size);
ppc_collect_reg (regcache, tdep->ppc_cr_regnum,
- gregs, offsets->cr_offset, offsets->xr_size);
+ (gdb_byte *) gregs, offsets->cr_offset,
+ offsets->xr_size);
ppc_collect_reg (regcache, tdep->ppc_xer_regnum,
- gregs, offsets->xer_offset, offsets->xr_size);
+ (gdb_byte *) gregs, offsets->xer_offset,
+ offsets->xr_size);
ppc_collect_reg (regcache, tdep->ppc_mq_regnum,
- gregs, offsets->mq_offset, offsets->xr_size);
+ (gdb_byte *) gregs, offsets->mq_offset,
+ offsets->xr_size);
return;
}
offset = ppc_greg_offset (gdbarch, tdep, offsets, regnum, ®size);
- ppc_collect_reg (regcache, regnum, gregs, offset, regsize);
+ ppc_collect_reg (regcache, regnum, (gdb_byte *) gregs, offset, regsize);
}
/* Collect register REGNUM in the floating-point register set
@@ -720,7 +730,7 @@ ppc_collect_fpregset (const struct regset *regset,
return;
tdep = gdbarch_tdep (gdbarch);
- offsets = regset->regmap;
+ offsets = (const struct ppc_reg_offsets *) regset->regmap;
if (regnum == -1)
{
int i;
@@ -728,15 +738,16 @@ ppc_collect_fpregset (const struct regset *regset,
for (i = tdep->ppc_fp0_regnum, offset = offsets->f0_offset;
i < tdep->ppc_fp0_regnum + ppc_num_fprs;
i++, offset += 8)
- ppc_collect_reg (regcache, i, fpregs, offset, 8);
+ ppc_collect_reg (regcache, i, (gdb_byte *) fpregs, offset, 8);
ppc_collect_reg (regcache, tdep->ppc_fpscr_regnum,
- fpregs, offsets->fpscr_offset, offsets->fpscr_size);
+ (gdb_byte *) fpregs, offsets->fpscr_offset,
+ offsets->fpscr_size);
return;
}
offset = ppc_fpreg_offset (tdep, offsets, regnum);
- ppc_collect_reg (regcache, regnum, fpregs, offset,
+ ppc_collect_reg (regcache, regnum, (gdb_byte *) fpregs, offset,
regnum == tdep->ppc_fpscr_regnum ? offsets->fpscr_size : 8);
}
@@ -765,12 +776,12 @@ ppc_collect_vsxregset (const struct regset *regset,
for (i = tdep->ppc_vsr0_upper_regnum;
i < tdep->ppc_vsr0_upper_regnum + 32;
i++)
- ppc_collect_reg (regcache, i, vsxregs, 0, 8);
+ ppc_collect_reg (regcache, i, (gdb_byte *) vsxregs, 0, 8);
return;
}
else
- ppc_collect_reg (regcache, regnum, vsxregs, 0, 8);
+ ppc_collect_reg (regcache, regnum, (gdb_byte *) vsxregs, 0, 8);
}
@@ -793,7 +804,7 @@ ppc_collect_vrregset (const struct regset *regset,
return;
tdep = gdbarch_tdep (gdbarch);
- offsets = regset->regmap;
+ offsets = (const struct ppc_reg_offsets *) regset->regmap;
if (regnum == -1)
{
int i;
@@ -801,23 +812,23 @@ ppc_collect_vrregset (const struct regset *regset,
for (i = tdep->ppc_vr0_regnum, offset = offsets->vr0_offset;
i < tdep->ppc_vr0_regnum + ppc_num_vrs;
i++, offset += 16)
- ppc_collect_reg (regcache, i, vrregs, offset, 16);
+ ppc_collect_reg (regcache, i, (gdb_byte *) vrregs, offset, 16);
ppc_collect_reg (regcache, (tdep->ppc_vrsave_regnum - 1),
- vrregs, offsets->vscr_offset, 4);
+ (gdb_byte *) vrregs, offsets->vscr_offset, 4);
ppc_collect_reg (regcache, tdep->ppc_vrsave_regnum,
- vrregs, offsets->vrsave_offset, 4);
+ (gdb_byte *) vrregs, offsets->vrsave_offset, 4);
return;
}
offset = ppc_vrreg_offset (tdep, offsets, regnum);
if (regnum != tdep->ppc_vrsave_regnum
&& regnum != tdep->ppc_vrsave_regnum - 1)
- ppc_collect_reg (regcache, regnum, vrregs, offset, 16);
+ ppc_collect_reg (regcache, regnum, (gdb_byte *) vrregs, offset, 16);
else
ppc_collect_reg (regcache, regnum,
- vrregs, offset, 4);
+ (gdb_byte *) vrregs, offset, 4);
}
\f
@@ -2652,7 +2663,7 @@ e500_move_ev_register (move_ev_register_func move,
struct gdbarch *arch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (arch);
int reg_index;
- gdb_byte *byte_buffer = buffer;
+ gdb_byte *byte_buffer = (gdb_byte *) buffer;
enum register_status status;
gdb_assert (IS_SPE_PSEUDOREG (tdep, ev_reg));
@@ -2681,13 +2692,13 @@ e500_move_ev_register (move_ev_register_func move,
static enum register_status
do_regcache_raw_read (struct regcache *regcache, int regnum, void *buffer)
{
- return regcache_raw_read (regcache, regnum, buffer);
+ return regcache_raw_read (regcache, regnum, (gdb_byte *) buffer);
}
static enum register_status
do_regcache_raw_write (struct regcache *regcache, int regnum, void *buffer)
{
- regcache_raw_write (regcache, regnum, buffer);
+ regcache_raw_write (regcache, regnum, (const gdb_byte *) buffer);
return REG_VALID;
}
@@ -3194,7 +3205,7 @@ rs6000_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR func, pc;
if ((*this_cache) != NULL)
- return (*this_cache);
+ return (struct rs6000_frame_cache *) (*this_cache);
cache = FRAME_OBSTACK_ZALLOC (struct rs6000_frame_cache);
(*this_cache) = cache;
cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -3406,7 +3417,7 @@ rs6000_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache)
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (*this_cache)
- return *this_cache;
+ return (struct rs6000_frame_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct rs6000_frame_cache);
(*this_cache) = cache;
@@ -5982,7 +5993,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Hook in ABI-specific overrides, if they have been registered. */
info.target_desc = tdesc;
- info.tdep_info = (void *) tdesc_data;
+ info.tdep_info = (struct gdbarch_tdep_info *) tdesc_data;
gdbarch_init_osabi (info, gdbarch);
switch (info.osabi)
diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c
index abafa8d..79e326d 100644
--- a/gdb/rx-tdep.c
+++ b/gdb/rx-tdep.c
@@ -200,7 +200,8 @@ struct rx_get_opcode_byte_handle
static int
rx_get_opcode_byte (void *handle)
{
- struct rx_get_opcode_byte_handle *opcdata = handle;
+ struct rx_get_opcode_byte_handle *opcdata =
+ (struct rx_get_opcode_byte_handle *) handle;
int status;
gdb_byte byte;
@@ -445,10 +446,10 @@ rx_analyze_frame_prologue (struct frame_info *this_frame,
stop_addr = func_start;
rx_analyze_prologue (func_start, stop_addr, frame_type,
- *this_prologue_cache);
+ (struct rx_prologue *) *this_prologue_cache);
}
- return *this_prologue_cache;
+ return (struct rx_prologue *) *this_prologue_cache;
}
/* Determine type of frame by scanning the function for a return
@@ -469,7 +470,7 @@ rx_frame_type (struct frame_info *this_frame, void **this_cache)
if (*this_cache != NULL)
{
- struct rx_prologue *p = *this_cache;
+ struct rx_prologue *p = (struct rx_prologue *) *this_cache;
return p->frame_type;
}
@@ -643,7 +644,7 @@ rx_frame_sniffer_common (const struct frame_unwind *self,
}
else
{
- struct rx_prologue *p = *this_cache;
+ struct rx_prologue *p = (struct rx_prologue *) *this_cache;
return sniff_p (p->frame_type);
}
diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c
index 8d277ac..fcf93d7 100644
--- a/gdb/s390-linux-tdep.c
+++ b/gdb/s390-linux-tdep.c
@@ -1168,7 +1168,7 @@ static void
s390_check_for_saved (void *data_untyped, pv_t addr,
CORE_ADDR size, pv_t value)
{
- struct s390_prologue_data *data = data_untyped;
+ struct s390_prologue_data *data = (struct s390_prologue_data *) data_untyped;
int i, offset;
if (!pv_is_register (addr, S390_SP_REGNUM))
@@ -2081,7 +2081,7 @@ s390_frame_unwind_cache (struct frame_info *this_frame,
struct s390_unwind_cache *info;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct s390_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct s390_unwind_cache);
*this_prologue_cache = info;
@@ -2162,7 +2162,7 @@ s390_stub_frame_unwind_cache (struct frame_info *this_frame,
ULONGEST reg;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct s390_stub_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct s390_stub_unwind_cache);
*this_prologue_cache = info;
@@ -2246,7 +2246,7 @@ s390_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
int i;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct s390_sigtramp_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct s390_sigtramp_unwind_cache);
*this_prologue_cache = info;
diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c
index 09df712..7e56391 100644
--- a/gdb/score-tdep.c
+++ b/gdb/score-tdep.c
@@ -1322,7 +1322,7 @@ score_make_prologue_cache (struct frame_info *this_frame, void **this_cache)
struct score_frame_cache *cache;
if ((*this_cache) != NULL)
- return (*this_cache);
+ return (struct score_frame_cache *) (*this_cache);
cache = FRAME_OBSTACK_ZALLOC (struct score_frame_cache);
(*this_cache) = cache;
@@ -1338,15 +1338,17 @@ score_make_prologue_cache (struct frame_info *this_frame, void **this_cache)
return cache;
if (target_mach == bfd_mach_score3)
- score3_analyze_prologue (start_addr, pc, this_frame, *this_cache);
+ score3_analyze_prologue (start_addr, pc, this_frame,
+ (struct score_frame_cache *) *this_cache);
else
- score7_analyze_prologue (start_addr, pc, this_frame, *this_cache);
+ score7_analyze_prologue (start_addr, pc, this_frame,
+ (struct score_frame_cache *) *this_cache);
}
/* Save SP. */
trad_frame_set_value (cache->saved_regs, SCORE_SP_REGNUM, cache->base);
- return (*this_cache);
+ return (struct score_frame_cache *) (*this_cache);
}
static void
diff --git a/gdb/sentinel-frame.c b/gdb/sentinel-frame.c
index 1bb62f4..75716b4 100644
--- a/gdb/sentinel-frame.c
+++ b/gdb/sentinel-frame.c
@@ -46,7 +46,8 @@ sentinel_frame_prev_register (struct frame_info *this_frame,
void **this_prologue_cache,
int regnum)
{
- struct frame_unwind_cache *cache = *this_prologue_cache;
+ struct frame_unwind_cache *cache =
+ (struct frame_unwind_cache *) *this_prologue_cache;
struct value *value;
value = regcache_cooked_read_value (cache->regcache, regnum);
@@ -70,7 +71,8 @@ static struct gdbarch *
sentinel_frame_prev_arch (struct frame_info *this_frame,
void **this_prologue_cache)
{
- struct frame_unwind_cache *cache = *this_prologue_cache;
+ struct frame_unwind_cache *cache =
+ (struct frame_unwind_cache *) *this_prologue_cache;
return get_regcache_arch (cache->regcache);
}
diff --git a/gdb/ser-base.c b/gdb/ser-base.c
index 2f12125..a09fbde 100644
--- a/gdb/ser-base.c
+++ b/gdb/ser-base.c
@@ -153,7 +153,7 @@ run_async_handler_and_reschedule (struct serial *scb)
static void
fd_event (int error, void *context)
{
- struct serial *scb = context;
+ struct serial *scb = (struct serial *) context;
if (error != 0)
{
scb->bufcnt = SERIAL_ERROR;
@@ -190,7 +190,7 @@ fd_event (int error, void *context)
static void
push_event (void *context)
{
- struct serial *scb = context;
+ struct serial *scb = (struct serial *) context;
scb->async_state = NOTHING_SCHEDULED; /* Timers are one-off */
run_async_handler_and_reschedule (scb);
@@ -440,7 +440,7 @@ ser_base_readchar (struct serial *scb, int timeout)
int
ser_base_write (struct serial *scb, const void *buf, size_t count)
{
- const char *str = buf;
+ const char *str = (const char *) buf;
int cc;
while (count > 0)
diff --git a/gdb/ser-pipe.c b/gdb/ser-pipe.c
index 1e777b7..1696eb8 100644
--- a/gdb/ser-pipe.c
+++ b/gdb/ser-pipe.c
@@ -148,7 +148,7 @@ pipe_open (struct serial *scb, const char *name)
static void
pipe_close (struct serial *scb)
{
- struct pipe_state *state = scb->state;
+ struct pipe_state *state = (struct pipe_state *) scb->state;
close (scb->fd);
scb->fd = -1;
diff --git a/gdb/serial.c b/gdb/serial.c
index 74567db..abc050e 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -404,7 +404,7 @@ serial_write (struct serial *scb, const void *buf, size_t count)
{
if (serial_logfp != NULL)
{
- const char *str = buf;
+ const char *str = (const char *) buf;
size_t c;
for (c = 0; c < count; c++)
@@ -416,7 +416,7 @@ serial_write (struct serial *scb, const void *buf, size_t count)
}
if (serial_debug_p (scb))
{
- const char *str = buf;
+ const char *str = (const char *) buf;
size_t c;
for (c = 0; c < count; c++)
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 6f66f0e..46a1609 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -1857,7 +1857,7 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct sh_frame_cache *) *this_cache;
cache = sh_alloc_frame_cache ();
*this_cache = cache;
@@ -2021,7 +2021,7 @@ sh_stub_this_id (struct frame_info *this_frame, void **this_cache,
if (*this_cache == NULL)
*this_cache = sh_make_stub_cache (this_frame);
- cache = *this_cache;
+ cache = (struct sh_frame_cache *) *this_cache;
*this_id = frame_id_build (cache->saved_sp, get_frame_pc (this_frame));
}
diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c
index cb18a35..f76c845 100644
--- a/gdb/sh64-tdep.c
+++ b/gdb/sh64-tdep.c
@@ -2210,7 +2210,7 @@ sh64_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct sh64_frame_cache *) *this_cache;
gdbarch = get_frame_arch (this_frame);
cache = sh64_alloc_frame_cache ();
diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c
index a1e6b8e..0310e66 100644
--- a/gdb/solib-aix.c
+++ b/gdb/solib-aix.c
@@ -112,7 +112,8 @@ get_solib_aix_inferior_data (struct inferior *inf)
{
struct solib_aix_inferior_data *data;
- data = inferior_data (inf, solib_aix_inferior_data_handle);
+ data = ((struct solib_aix_inferior_data *)
+ inferior_data (inf, solib_aix_inferior_data_handle));
if (data == NULL)
{
data = XCNEW (struct solib_aix_inferior_data);
@@ -160,16 +161,16 @@ library_list_start_library (struct gdb_xml_parser *parser,
void *user_data,
VEC (gdb_xml_value_s) *attributes)
{
- VEC (lm_info_p) **list = user_data;
+ VEC (lm_info_p) **list = (VEC (lm_info_p) **) user_data;
struct lm_info *item = XCNEW (struct lm_info);
struct gdb_xml_value *attr;
attr = xml_find_attribute (attributes, "name");
- item->filename = xstrdup (attr->value);
+ item->filename = xstrdup ((const char *) attr->value);
attr = xml_find_attribute (attributes, "member");
if (attr != NULL)
- item->member_name = xstrdup (attr->value);
+ item->member_name = xstrdup ((const char *) attr->value);
attr = xml_find_attribute (attributes, "text_addr");
item->text_addr = * (ULONGEST *) attr->value;
@@ -193,7 +194,7 @@ library_list_start_list (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC (gdb_xml_value_s) *attributes)
{
- char *version = xml_find_attribute (attributes, "version")->value;
+ char *version = (char *) xml_find_attribute (attributes, "version")->value;
if (strcmp (version, "1.0") != 0)
gdb_xml_error (parser,
@@ -206,7 +207,7 @@ library_list_start_list (struct gdb_xml_parser *parser,
static void
solib_aix_free_library_list (void *p)
{
- VEC (lm_info_p) **result = p;
+ VEC (lm_info_p) **result = (VEC (lm_info_p) **) p;
struct lm_info *info;
int ix;
diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c
index 2a33cd7..876ca8c 100644
--- a/gdb/solib-darwin.c
+++ b/gdb/solib-darwin.c
@@ -96,7 +96,8 @@ get_darwin_info (void)
{
struct darwin_info *info;
- info = program_space_data (current_program_space, solib_darwin_pspace_data);
+ info = (struct darwin_info *) program_space_data (current_program_space,
+ solib_darwin_pspace_data);
if (info != NULL)
return info;
diff --git a/gdb/solib-dsbt.c b/gdb/solib-dsbt.c
index 102b41a..3218bbe 100644
--- a/gdb/solib-dsbt.c
+++ b/gdb/solib-dsbt.c
@@ -175,7 +175,8 @@ get_dsbt_info (void)
{
struct dsbt_info *info;
- info = program_space_data (current_program_space, solib_dsbt_pspace_data);
+ info = (struct dsbt_info *) program_space_data (current_program_space,
+ solib_dsbt_pspace_data);
if (info != NULL)
return info;
diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c
index 688c920..e439250 100644
--- a/gdb/solib-spu.c
+++ b/gdb/solib-spu.c
@@ -105,7 +105,8 @@ append_ocl_sos (struct so_list **link_ptr)
ALL_OBJFILES (objfile)
{
- ocl_program_addr_base = objfile_data (objfile, ocl_program_data_key);
+ ocl_program_addr_base =
+ (CORE_ADDR *) objfile_data (objfile, ocl_program_data_key);
if (ocl_program_addr_base != NULL)
{
enum bfd_endian byte_order = bfd_big_endian (objfile->obfd)?
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 04d797b..ac0f69d 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -405,7 +405,7 @@ free_solib_list (struct svr4_info *info)
static void
svr4_pspace_data_cleanup (struct program_space *pspace, void *arg)
{
- struct svr4_info *info = arg;
+ struct svr4_info *info = (struct svr4_info *) arg;
free_probes_table (info);
free_solib_list (info);
@@ -421,7 +421,8 @@ get_svr4_info (void)
{
struct svr4_info *info;
- info = program_space_data (current_program_space, solib_svr4_pspace_data);
+ info = (struct svr4_info *) program_space_data (current_program_space,
+ solib_svr4_pspace_data);
if (info != NULL)
return info;
@@ -1161,11 +1162,15 @@ library_list_start_library (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct svr4_library_list *list = user_data;
- const char *name = xml_find_attribute (attributes, "name")->value;
- ULONGEST *lmp = xml_find_attribute (attributes, "lm")->value;
- ULONGEST *l_addrp = xml_find_attribute (attributes, "l_addr")->value;
- ULONGEST *l_ldp = xml_find_attribute (attributes, "l_ld")->value;
+ struct svr4_library_list *list = (struct svr4_library_list *) user_data;
+ const char *name =
+ (const char *) xml_find_attribute (attributes, "name")->value;
+ ULONGEST *lmp =
+ (long unsigned int *) xml_find_attribute (attributes, "lm")->value;
+ ULONGEST *l_addrp =
+ (long unsigned int *) xml_find_attribute (attributes, "l_addr")->value;
+ ULONGEST *l_ldp =
+ (long unsigned int *) xml_find_attribute (attributes, "l_ld")->value;
struct so_list *new_elem;
new_elem = XCNEW (struct so_list);
@@ -1189,8 +1194,9 @@ svr4_library_list_start_list (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct svr4_library_list *list = user_data;
- const char *version = xml_find_attribute (attributes, "version")->value;
+ struct svr4_library_list *list = (struct svr4_library_list *) user_data;
+ const char *version =
+ (const char *) xml_find_attribute (attributes, "version")->value;
struct gdb_xml_value *main_lm = xml_find_attribute (attributes, "main-lm");
if (strcmp (version, "1.0") != 0)
@@ -1699,7 +1705,7 @@ struct probe_and_action
static hashval_t
hash_probe_and_action (const void *p)
{
- const struct probe_and_action *pa = p;
+ const struct probe_and_action *pa = (const struct probe_and_action *) p;
return (hashval_t) pa->address;
}
@@ -1710,8 +1716,8 @@ hash_probe_and_action (const void *p)
static int
equal_probe_and_action (const void *p1, const void *p2)
{
- const struct probe_and_action *pa1 = p1;
- const struct probe_and_action *pa2 = p2;
+ const struct probe_and_action *pa1 = (const struct probe_and_action *) p1;
+ const struct probe_and_action *pa2 = (const struct probe_and_action *) p2;
return pa1->address == pa2->address;
}
@@ -2055,7 +2061,8 @@ svr4_update_solib_event_breakpoint (struct breakpoint *b, void *arg)
struct svr4_info *info;
struct probe_and_action *pa;
- info = program_space_data (loc->pspace, solib_svr4_pspace_data);
+ info = ((struct svr4_info *)
+ program_space_data (loc->pspace, solib_svr4_pspace_data));
if (info == NULL || info->probes_table == NULL)
continue;
@@ -3176,7 +3183,8 @@ void
set_solib_svr4_fetch_link_map_offsets (struct gdbarch *gdbarch,
struct link_map_offsets *(*flmo) (void))
{
- struct solib_svr4_ops *ops = gdbarch_data (gdbarch, solib_svr4_data);
+ struct solib_svr4_ops *ops =
+ (struct solib_svr4_ops *) gdbarch_data (gdbarch, solib_svr4_data);
ops->fetch_link_map_offsets = flmo;
@@ -3189,7 +3197,8 @@ set_solib_svr4_fetch_link_map_offsets (struct gdbarch *gdbarch,
static struct link_map_offsets *
svr4_fetch_link_map_offsets (void)
{
- struct solib_svr4_ops *ops = gdbarch_data (target_gdbarch (), solib_svr4_data);
+ struct solib_svr4_ops *ops =
+ (struct solib_svr4_ops *) gdbarch_data (target_gdbarch (), solib_svr4_data);
gdb_assert (ops->fetch_link_map_offsets);
return ops->fetch_link_map_offsets ();
@@ -3200,7 +3209,8 @@ svr4_fetch_link_map_offsets (void)
static int
svr4_have_link_map_offsets (void)
{
- struct solib_svr4_ops *ops = gdbarch_data (target_gdbarch (), solib_svr4_data);
+ struct solib_svr4_ops *ops =
+ (struct solib_svr4_ops *) gdbarch_data (target_gdbarch (), solib_svr4_data);
return (ops->fetch_link_map_offsets != NULL);
}
diff --git a/gdb/solib-target.c b/gdb/solib-target.c
index 57f6551..c10ad61 100644
--- a/gdb/solib-target.c
+++ b/gdb/solib-target.c
@@ -80,9 +80,10 @@ library_list_start_segment (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- VEC(lm_info_p) **list = user_data;
+ VEC(lm_info_p) **list = (VEC(lm_info_p) **) user_data;
struct lm_info *last = VEC_last (lm_info_p, *list);
- ULONGEST *address_p = xml_find_attribute (attributes, "address")->value;
+ ULONGEST *address_p =
+ (long unsigned int *) xml_find_attribute (attributes, "address")->value;
CORE_ADDR address = (CORE_ADDR) *address_p;
if (last->section_bases != NULL)
@@ -97,9 +98,10 @@ library_list_start_section (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- VEC(lm_info_p) **list = user_data;
+ VEC(lm_info_p) **list = (VEC(lm_info_p) **) user_data;
struct lm_info *last = VEC_last (lm_info_p, *list);
- ULONGEST *address_p = xml_find_attribute (attributes, "address")->value;
+ ULONGEST *address_p =
+ (long unsigned int *) xml_find_attribute (attributes, "address")->value;
CORE_ADDR address = (CORE_ADDR) *address_p;
if (last->segment_bases != NULL)
@@ -116,9 +118,10 @@ library_list_start_library (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- VEC(lm_info_p) **list = user_data;
+ VEC(lm_info_p) **list = (VEC(lm_info_p) **) user_data;
struct lm_info *item = XCNEW (struct lm_info);
- const char *name = xml_find_attribute (attributes, "name")->value;
+ const char *name =
+ (const char *) xml_find_attribute (attributes, "name")->value;
item->name = xstrdup (name);
VEC_safe_push (lm_info_p, *list, item);
@@ -129,7 +132,7 @@ library_list_end_library (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- VEC(lm_info_p) **list = user_data;
+ VEC(lm_info_p) **list = (VEC(lm_info_p) **) user_data;
struct lm_info *lm_info = VEC_last (lm_info_p, *list);
if (lm_info->segment_bases == NULL
@@ -151,7 +154,7 @@ library_list_start_list (struct gdb_xml_parser *parser,
/* #FIXED attribute may be omitted, Expat returns NULL in such case. */
if (version != NULL)
{
- const char *string = version->value;
+ const char *string = (const char *) version->value;
if (strcmp (string, "1.0") != 0)
gdb_xml_error (parser,
@@ -165,7 +168,7 @@ library_list_start_list (struct gdb_xml_parser *parser,
static void
solib_target_free_library_list (void *p)
{
- VEC(lm_info_p) **result = p;
+ VEC(lm_info_p) **result = (VEC(lm_info_p) **) p;
struct lm_info *info;
int ix;
diff --git a/gdb/solib.c b/gdb/solib.c
index 4f3167a..91bc87c 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -65,7 +65,8 @@ solib_init (struct obstack *obstack)
static const struct target_so_ops *
solib_ops (struct gdbarch *gdbarch)
{
- const struct target_so_ops **ops = gdbarch_data (gdbarch, solib_data);
+ const struct target_so_ops **ops =
+ (const struct target_so_ops **) gdbarch_data (gdbarch, solib_data);
return *ops;
}
@@ -75,7 +76,8 @@ solib_ops (struct gdbarch *gdbarch)
void
set_solib_ops (struct gdbarch *gdbarch, const struct target_so_ops *new_ops)
{
- const struct target_so_ops **ops = gdbarch_data (gdbarch, solib_data);
+ const struct target_so_ops **ops =
+ (const struct target_so_ops **) gdbarch_data (gdbarch, solib_data);
*ops = new_ops;
}
diff --git a/gdb/sparc-sol2-tdep.c b/gdb/sparc-sol2-tdep.c
index 5afe308..03bd53a 100644
--- a/gdb/sparc-sol2-tdep.c
+++ b/gdb/sparc-sol2-tdep.c
@@ -132,7 +132,7 @@ sparc32_sol2_sigtramp_frame_cache (struct frame_info *this_frame,
int regnum;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 5c77784..b2bba26 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -1100,7 +1100,7 @@ sparc_frame_cache (struct frame_info *this_frame, void **this_cache)
struct sparc_frame_cache *cache;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_alloc_frame_cache ();
*this_cache = cache;
@@ -1158,7 +1158,7 @@ sparc32_frame_cache (struct frame_info *this_frame, void **this_cache)
struct symbol *sym;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
@@ -1895,7 +1895,7 @@ sparc32_supply_gregset (const struct sparc_gregmap *gregmap,
struct regcache *regcache,
int regnum, const void *gregs)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
gdb_byte zero[4] = { 0 };
int i;
@@ -1960,7 +1960,7 @@ sparc32_collect_gregset (const struct sparc_gregmap *gregmap,
const struct regcache *regcache,
int regnum, void *gregs)
{
- gdb_byte *regs = gregs;
+ gdb_byte *regs = (gdb_byte *) gregs;
int i;
if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
@@ -2015,7 +2015,7 @@ sparc32_supply_fpregset (const struct sparc_fpregmap *fpregmap,
struct regcache *regcache,
int regnum, const void *fpregs)
{
- const gdb_byte *regs = fpregs;
+ const gdb_byte *regs = (const gdb_byte *) fpregs;
int i;
for (i = 0; i < 32; i++)
@@ -2035,7 +2035,7 @@ sparc32_collect_fpregset (const struct sparc_fpregmap *fpregmap,
const struct regcache *regcache,
int regnum, void *fpregs)
{
- gdb_byte *regs = fpregs;
+ gdb_byte *regs = (gdb_byte *) fpregs;
int i;
for (i = 0; i < 32; i++)
diff --git a/gdb/sparc64-sol2-tdep.c b/gdb/sparc64-sol2-tdep.c
index 4e2baa6..a381e53 100644
--- a/gdb/sparc64-sol2-tdep.c
+++ b/gdb/sparc64-sol2-tdep.c
@@ -107,7 +107,7 @@ sparc64_sol2_sigtramp_frame_cache (struct frame_info *this_frame,
int regnum;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c
index 4978863..4c05277 100644
--- a/gdb/sparc64-tdep.c
+++ b/gdb/sparc64-tdep.c
@@ -1244,7 +1244,7 @@ sparc64_supply_gregset (const struct sparc_gregmap *gregmap,
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int sparc32 = (gdbarch_ptr_bit (gdbarch) == 32);
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
gdb_byte zero[8] = { 0 };
int i;
@@ -1361,7 +1361,7 @@ sparc64_collect_gregset (const struct sparc_gregmap *gregmap,
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int sparc32 = (gdbarch_ptr_bit (gdbarch) == 32);
- gdb_byte *regs = gregs;
+ gdb_byte *regs = (gdb_byte *) gregs;
int i;
if (sparc32)
@@ -1469,7 +1469,7 @@ sparc64_supply_fpregset (const struct sparc_fpregmap *fpregmap,
int regnum, const void *fpregs)
{
int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
- const gdb_byte *regs = fpregs;
+ const gdb_byte *regs = (const gdb_byte *) fpregs;
int i;
for (i = 0; i < 32; i++)
@@ -1507,7 +1507,7 @@ sparc64_collect_fpregset (const struct sparc_fpregmap *fpregmap,
int regnum, void *fpregs)
{
int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
- gdb_byte *regs = fpregs;
+ gdb_byte *regs = (gdb_byte *) fpregs;
int i;
for (i = 0; i < 32; i++)
diff --git a/gdb/sparc64fbsd-tdep.c b/gdb/sparc64fbsd-tdep.c
index c9f9041..ef84316 100644
--- a/gdb/sparc64fbsd-tdep.c
+++ b/gdb/sparc64fbsd-tdep.c
@@ -97,7 +97,7 @@ sparc64fbsd_sigtramp_frame_cache (struct frame_info *this_frame,
int regnum;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
diff --git a/gdb/sparc64nbsd-tdep.c b/gdb/sparc64nbsd-tdep.c
index 32da6ac..adde2a5 100644
--- a/gdb/sparc64nbsd-tdep.c
+++ b/gdb/sparc64nbsd-tdep.c
@@ -156,7 +156,7 @@ sparc64nbsd_sigcontext_frame_cache (struct frame_info *this_frame,
CORE_ADDR addr;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
diff --git a/gdb/sparc64obsd-tdep.c b/gdb/sparc64obsd-tdep.c
index 9d3bedc..aa9651e 100644
--- a/gdb/sparc64obsd-tdep.c
+++ b/gdb/sparc64obsd-tdep.c
@@ -155,7 +155,7 @@ sparc64obsd_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR addr;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
@@ -239,7 +239,7 @@ sparc64obsd_trapframe_cache (struct frame_info *this_frame, void **this_cache)
int regnum;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c
index c145919..29c699d 100644
--- a/gdb/sparcnbsd-tdep.c
+++ b/gdb/sparcnbsd-tdep.c
@@ -186,7 +186,7 @@ sparc32nbsd_sigcontext_frame_cache (struct frame_info *this_frame,
CORE_ADDR addr;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
diff --git a/gdb/sparcobsd-tdep.c b/gdb/sparcobsd-tdep.c
index 0796f99..792da7b 100644
--- a/gdb/sparcobsd-tdep.c
+++ b/gdb/sparcobsd-tdep.c
@@ -74,7 +74,7 @@ sparc32obsd_sigtramp_frame_cache (struct frame_info *this_frame,
CORE_ADDR addr;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
diff --git a/gdb/spu-multiarch.c b/gdb/spu-multiarch.c
index b07c4ff..c61b271 100644
--- a/gdb/spu-multiarch.c
+++ b/gdb/spu-multiarch.c
@@ -107,7 +107,7 @@ spu_gdbarch (int spufs_fd)
info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
info.byte_order = BFD_ENDIAN_BIG;
info.osabi = GDB_OSABI_LINUX;
- info.tdep_info = (void *) &spufs_fd;
+ info.tdep_info = (struct gdbarch_tdep_info *) &spufs_fd;
return gdbarch_find_by_info (info);
}
diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c
index 6e754a4..94edbe8 100644
--- a/gdb/spu-tdep.c
+++ b/gdb/spu-tdep.c
@@ -1000,7 +1000,7 @@ spu_frame_unwind_cache (struct frame_info *this_frame,
gdb_byte buf[16];
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct spu_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct spu_unwind_cache);
*this_prologue_cache = info;
@@ -1208,7 +1208,7 @@ struct spu2ppu_cache
static struct gdbarch *
spu2ppu_prev_arch (struct frame_info *this_frame, void **this_cache)
{
- struct spu2ppu_cache *cache = *this_cache;
+ struct spu2ppu_cache *cache = (struct spu2ppu_cache *) *this_cache;
return get_regcache_arch (cache->regcache);
}
@@ -1216,7 +1216,7 @@ static void
spu2ppu_this_id (struct frame_info *this_frame,
void **this_cache, struct frame_id *this_id)
{
- struct spu2ppu_cache *cache = *this_cache;
+ struct spu2ppu_cache *cache = (struct spu2ppu_cache *) *this_cache;
*this_id = cache->frame_id;
}
@@ -1224,7 +1224,7 @@ static struct value *
spu2ppu_prev_register (struct frame_info *this_frame,
void **this_cache, int regnum)
{
- struct spu2ppu_cache *cache = *this_cache;
+ struct spu2ppu_cache *cache = (struct spu2ppu_cache *) *this_cache;
struct gdbarch *gdbarch = get_regcache_arch (cache->regcache);
gdb_byte *buf;
@@ -1286,7 +1286,7 @@ spu2ppu_sniffer (const struct frame_unwind *self,
static void
spu2ppu_dealloc_cache (struct frame_info *self, void *this_cache)
{
- struct spu2ppu_cache *cache = this_cache;
+ struct spu2ppu_cache *cache = (struct spu2ppu_cache *) this_cache;
regcache_xfree (cache->regcache);
}
@@ -1725,8 +1725,10 @@ struct spu_dis_asm_data
static void
spu_dis_asm_print_address (bfd_vma addr, struct disassemble_info *info)
{
- struct spu_dis_asm_data *data = info->application_data;
- print_address (data->gdbarch, SPUADDR (data->id, addr), info->stream);
+ struct spu_dis_asm_data *data =
+ (struct spu_dis_asm_data *) info->application_data;
+ print_address (data->gdbarch, SPUADDR (data->id, addr),
+ (struct ui_file *) info->stream);
}
static int
@@ -1737,7 +1739,7 @@ gdb_print_insn_spu (bfd_vma memaddr, struct disassemble_info *info)
call print_address. */
struct disassemble_info spu_info = *info;
struct spu_dis_asm_data data;
- data.gdbarch = info->application_data;
+ data.gdbarch = (struct gdbarch *) info->application_data;
data.id = SPUADDR_SPU (memaddr);
spu_info.application_data = &data;
@@ -1808,7 +1810,7 @@ spu_get_overlay_table (struct objfile *objfile)
gdb_byte *ovly_table;
int i;
- tbl = objfile_data (objfile, spu_overlay_data);
+ tbl = (struct spu_overlay_table *) objfile_data (objfile, spu_overlay_data);
if (tbl)
return tbl;
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 177ecc9..815eab8 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -2057,8 +2057,8 @@ static const struct objfile_data *rs6000_builtin_type_data;
static struct type *
rs6000_builtin_type (int typenum, struct objfile *objfile)
{
- struct type **negative_types = objfile_data (objfile,
- rs6000_builtin_type_data);
+ struct type **negative_types =
+ (struct type **) objfile_data (objfile, rs6000_builtin_type_data);
/* We recognize types numbered from -NUMBER_RECOGNIZED to -1. */
#define NUMBER_RECOGNIZED 34
diff --git a/gdb/stack.c b/gdb/stack.c
index 2b7cc92..b856fb5 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -2059,7 +2059,8 @@ do_print_variable_and_value (const char *print_name,
struct symbol *sym,
void *cb_data)
{
- struct print_variable_and_value_data *p = cb_data;
+ struct print_variable_and_value_data *p =
+ (struct print_variable_and_value_data *) cb_data;
struct frame_info *frame;
frame = frame_find_by_id (p->frame_id);
diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index 691877f..d88c470 100644
--- a/gdb/stap-probe.c
+++ b/gdb/stap-probe.c
@@ -1550,7 +1550,7 @@ handle_stap_probe (struct objfile *objfile, struct sdt_note *el,
static void
get_stap_base_address_1 (bfd *abfd, asection *sect, void *obj)
{
- asection **ret = obj;
+ asection **ret = (asection **) obj;
if ((sect->flags & (SEC_DATA | SEC_ALLOC | SEC_HAS_CONTENTS))
&& sect->name && !strcmp (sect->name, STAP_BASE_SECTION_NAME))
diff --git a/gdb/symfile-debug.c b/gdb/symfile-debug.c
index 6a3351a..391df40 100644
--- a/gdb/symfile-debug.c
+++ b/gdb/symfile-debug.c
@@ -73,7 +73,8 @@ static int
debug_qf_has_symbols (struct objfile *objfile)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
int retval;
retval = debug_data->real_sf->qf->has_symbols (objfile);
@@ -88,7 +89,8 @@ static struct symtab *
debug_qf_find_last_source_symtab (struct objfile *objfile)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
struct symtab *retval;
fprintf_filtered (gdb_stdlog, "qf->find_last_source_symtab (%s)\n",
@@ -106,7 +108,8 @@ static void
debug_qf_forget_cached_source_info (struct objfile *objfile)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "qf->forget_cached_source_info (%s)\n",
objfile_debug_name (objfile));
@@ -123,7 +126,8 @@ debug_qf_map_symtabs_matching_filename (struct objfile *objfile,
void *data)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
int retval;
fprintf_filtered (gdb_stdlog,
@@ -148,7 +152,8 @@ debug_qf_lookup_symbol (struct objfile *objfile, int kind, const char *name,
domain_enum domain)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
struct compunit_symtab *retval;
fprintf_filtered (gdb_stdlog,
@@ -171,7 +176,8 @@ static void
debug_qf_print_stats (struct objfile *objfile)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "qf->print_stats (%s)\n",
objfile_debug_name (objfile));
@@ -183,7 +189,8 @@ static void
debug_qf_dump (struct objfile *objfile)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "qf->dump (%s)\n",
objfile_debug_name (objfile));
@@ -197,7 +204,8 @@ debug_qf_relocate (struct objfile *objfile,
const struct section_offsets *delta)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "qf->relocate (%s, %s, %s)\n",
objfile_debug_name (objfile),
@@ -212,7 +220,8 @@ debug_qf_expand_symtabs_for_function (struct objfile *objfile,
const char *func_name)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog,
"qf->expand_symtabs_for_function (%s, \"%s\")\n",
@@ -225,7 +234,8 @@ static void
debug_qf_expand_all_symtabs (struct objfile *objfile)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "qf->expand_all_symtabs (%s)\n",
objfile_debug_name (objfile));
@@ -238,7 +248,8 @@ debug_qf_expand_symtabs_with_fullname (struct objfile *objfile,
const char *fullname)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog,
"qf->expand_symtabs_with_fullname (%s, \"%s\")\n",
@@ -258,7 +269,8 @@ debug_qf_map_matching_symbols (struct objfile *objfile,
symbol_compare_ftype *ordered_compare)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog,
"qf->map_matching_symbols (%s, \"%s\", %s, %d, %s, %s, %s, %s)\n",
@@ -285,7 +297,8 @@ debug_qf_expand_symtabs_matching
enum search_domain kind, void *data)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog,
"qf->expand_symtabs_matching (%s, %s, %s, %s, %s, %s)\n",
@@ -311,7 +324,8 @@ debug_qf_find_pc_sect_compunit_symtab (struct objfile *objfile,
int warn_if_readin)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
struct compunit_symtab *retval;
fprintf_filtered (gdb_stdlog,
@@ -342,7 +356,8 @@ debug_qf_map_symbol_filenames (struct objfile *objfile,
int need_fullname)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog,
"qf->map_symbol_filenames (%s, %s, %s, %d)\n",
objfile_debug_name (objfile),
@@ -379,7 +394,8 @@ static VEC (probe_p) *
debug_sym_get_probes (struct objfile *objfile)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
VEC (probe_p) *retval;
retval = debug_data->real_sf->sym_probe_fns->sym_get_probes (objfile);
@@ -403,7 +419,8 @@ static void
debug_sym_new_init (struct objfile *objfile)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "sf->sym_new_init (%s)\n",
objfile_debug_name (objfile));
@@ -415,7 +432,8 @@ static void
debug_sym_init (struct objfile *objfile)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "sf->sym_init (%s)\n",
objfile_debug_name (objfile));
@@ -427,7 +445,8 @@ static void
debug_sym_read (struct objfile *objfile, int symfile_flags)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "sf->sym_read (%s, 0x%x)\n",
objfile_debug_name (objfile), symfile_flags);
@@ -439,7 +458,8 @@ static void
debug_sym_read_psymbols (struct objfile *objfile)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "sf->sym_read_psymbols (%s)\n",
objfile_debug_name (objfile));
@@ -451,7 +471,8 @@ static void
debug_sym_finish (struct objfile *objfile)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "sf->sym_finish (%s)\n",
objfile_debug_name (objfile));
@@ -464,7 +485,8 @@ debug_sym_offsets (struct objfile *objfile,
const struct section_addr_info *info)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "sf->sym_offsets (%s, %s)\n",
objfile_debug_name (objfile),
@@ -486,7 +508,8 @@ static void
debug_sym_read_linetable (struct objfile *objfile)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "sf->sym_read_linetable (%s)\n",
objfile_debug_name (objfile));
@@ -498,7 +521,8 @@ static bfd_byte *
debug_sym_relocate (struct objfile *objfile, asection *sectp, bfd_byte *buf)
{
const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
bfd_byte *retval;
retval = debug_data->real_sf->sym_relocate (objfile, sectp, buf);
@@ -597,7 +621,8 @@ uninstall_symfile_debug_logging (struct objfile *objfile)
/* The debug versions should be currently installed. */
gdb_assert (symfile_debug_installed (objfile));
- debug_data = objfile_data (objfile, symfile_debug_objfile_data_key);
+ debug_data = ((struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
objfile->sf = debug_data->real_sf;
xfree (debug_data);
diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c
index 72fb1d0..a2aa1d6 100644
--- a/gdb/symfile-mem.c
+++ b/gdb/symfile-mem.c
@@ -180,7 +180,8 @@ struct symbol_file_add_from_memory_args
static int
symbol_file_add_from_memory_wrapper (struct ui_out *uiout, void *data)
{
- struct symbol_file_add_from_memory_args *args = data;
+ struct symbol_file_add_from_memory_args *args =
+ (struct symbol_file_add_from_memory_args *) data;
symbol_file_add_from_memory (args->bfd, args->sysinfo_ehdr, args->size,
args->name, args->from_tty);
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 205c31b..985ecff 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -424,7 +424,7 @@ struct place_section_arg
static void
place_section (bfd *abfd, asection *sect, void *obj)
{
- struct place_section_arg *arg = obj;
+ struct place_section_arg *arg = (struct place_section_arg *) obj;
CORE_ADDR *offsets = arg->offsets->offsets, start_addr;
int done;
ULONGEST align = ((ULONGEST) 1) << bfd_get_section_alignment (abfd, sect);
@@ -1907,7 +1907,7 @@ static int validate_download = 0;
static void
add_section_size_callback (bfd *abfd, asection *asec, void *data)
{
- bfd_size_type *sum = data;
+ bfd_size_type *sum = (bfd_size_type *) data;
*sum += bfd_get_section_size (asec);
}
@@ -1944,7 +1944,8 @@ struct load_progress_section_data {
static void
load_progress (ULONGEST bytes, void *untyped_arg)
{
- struct load_progress_section_data *args = untyped_arg;
+ struct load_progress_section_data *args =
+ (struct load_progress_section_data *) untyped_arg;
struct load_progress_data *totals;
if (args == NULL)
@@ -2009,7 +2010,7 @@ static void
load_section_callback (bfd *abfd, asection *asec, void *data)
{
struct memory_write_request *new_request;
- struct load_section_data *args = data;
+ struct load_section_data *args = (struct load_section_data *) data;
struct load_progress_section_data *section_data;
bfd_size_type size = bfd_get_section_size (asec);
gdb_byte *buffer;
@@ -2048,7 +2049,7 @@ load_section_callback (bfd *abfd, asection *asec, void *data)
static void
clear_memory_write_data (void *arg)
{
- VEC(memory_write_request_s) **vec_p = arg;
+ VEC(memory_write_request_s) **vec_p = (VEC(memory_write_request_s) **) arg;
VEC(memory_write_request_s) *vec = *vec_p;
int i;
struct memory_write_request *mr;
@@ -2901,8 +2902,9 @@ allocate_symtab (struct compunit_symtab *cust, const char *filename)
struct symtab *symtab
= OBSTACK_ZALLOC (&objfile->objfile_obstack, struct symtab);
- symtab->filename = bcache (filename, strlen (filename) + 1,
- objfile->per_bfd->filename_cache);
+ symtab->filename =
+ (const char *) bcache (filename, strlen (filename) + 1,
+ objfile->per_bfd->filename_cache);
symtab->fullname = NULL;
symtab->language = deduce_language_from_filename (filename);
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index bee07ac..53d8c03 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -876,7 +876,7 @@ static int
maintenance_expand_file_matcher (const char *filename, void *data,
int basenames)
{
- const char *regexp = data;
+ const char *regexp = (const char *) data;
QUIT;
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 5e33eb4..88df8b3 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -473,7 +473,7 @@ iterate_over_symtabs (const char *name,
static int
lookup_symtab_callback (struct symtab *symtab, void *data)
{
- struct symtab **result_ptr = data;
+ struct symtab **result_ptr = (struct symtab **) data;
*result_ptr = symtab;
return 1;
@@ -663,7 +663,8 @@ struct demangled_name_entry
static hashval_t
hash_demangled_name_entry (const void *data)
{
- const struct demangled_name_entry *e = data;
+ const struct demangled_name_entry *e =
+ (const struct demangled_name_entry *) data;
return htab_hash_string (e->mangled);
}
@@ -673,8 +674,10 @@ hash_demangled_name_entry (const void *data)
static int
eq_demangled_name_entry (const void *a, const void *b)
{
- const struct demangled_name_entry *da = a;
- const struct demangled_name_entry *db = b;
+ const struct demangled_name_entry *da =
+ (const struct demangled_name_entry *) a;
+ const struct demangled_name_entry *db =
+ (const struct demangled_name_entry *) b;
return strcmp (da->mangled, db->mangled) == 0;
}
@@ -1331,7 +1334,8 @@ free_symbol_cache (struct symbol_cache *cache)
static struct symbol_cache *
get_symbol_cache (struct program_space *pspace)
{
- struct symbol_cache *cache = program_space_data (pspace, symbol_cache_key);
+ struct symbol_cache *cache =
+ (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
if (cache == NULL)
{
@@ -1348,7 +1352,7 @@ get_symbol_cache (struct program_space *pspace)
static void
symbol_cache_cleanup (struct program_space *pspace, void *data)
{
- struct symbol_cache *cache = data;
+ struct symbol_cache *cache = (struct symbol_cache *) data;
free_symbol_cache (cache);
}
@@ -1362,8 +1366,8 @@ set_symbol_cache_size (unsigned int new_size)
ALL_PSPACES (pspace)
{
- struct symbol_cache *cache
- = program_space_data (pspace, symbol_cache_key);
+ struct symbol_cache *cache =
+ (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
/* The pspace could have been created but not have a cache yet. */
if (cache != NULL)
@@ -1519,7 +1523,8 @@ symbol_cache_mark_not_found (struct block_symbol_cache *bsc,
static void
symbol_cache_flush (struct program_space *pspace)
{
- struct symbol_cache *cache = program_space_data (pspace, symbol_cache_key);
+ struct symbol_cache *cache =
+ (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
int pass;
size_t total_size;
@@ -1634,7 +1639,8 @@ maintenance_print_symbol_cache (char *args, int from_tty)
: "(no object file)");
/* If the cache hasn't been created yet, avoid creating one. */
- cache = program_space_data (pspace, symbol_cache_key);
+ cache =
+ (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
if (cache == NULL)
printf_filtered (" <empty>\n");
else
@@ -1705,7 +1711,8 @@ maintenance_print_symbol_cache_statistics (char *args, int from_tty)
: "(no object file)");
/* If the cache hasn't been created yet, avoid creating one. */
- cache = program_space_data (pspace, symbol_cache_key);
+ cache =
+ (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
if (cache == NULL)
printf_filtered (" empty, no stats available\n");
else
@@ -4167,7 +4174,7 @@ clear_filename_seen_cache (struct filename_seen_cache *cache)
static void
delete_filename_seen_cache (void *ptr)
{
- struct filename_seen_cache *cache = ptr;
+ struct filename_seen_cache *cache = (struct filename_seen_cache *) ptr;
htab_delete (cache->tab);
xfree (cache);
@@ -4247,7 +4254,8 @@ static void
output_partial_symbol_filename (const char *filename, const char *fullname,
void *data)
{
- output_source_filename (fullname ? fullname : filename, data);
+ output_source_filename (fullname ? fullname : filename,
+ (struct output_source_filename_data *) data);
}
static void
@@ -4434,7 +4442,7 @@ static int
search_symbols_file_matches (const char *filename, void *user_data,
int basenames)
{
- struct search_symbols_data *data = user_data;
+ struct search_symbols_data *data = (struct search_symbols_data *) user_data;
return file_matches (filename, data->files, data->nfiles, basenames);
}
@@ -4444,7 +4452,7 @@ search_symbols_file_matches (const char *filename, void *user_data,
static int
search_symbols_name_matches (const char *symname, void *user_data)
{
- struct search_symbols_data *data = user_data;
+ struct search_symbols_data *data = (struct search_symbols_data *) user_data;
return !data->preg_p || regexec (&data->preg, symname, 0, NULL, 0) == 0;
}
@@ -5035,7 +5043,7 @@ free_completion_list (VEC (char_ptr) **list_ptr)
static void
do_free_completion_list (void *list)
{
- free_completion_list (list);
+ free_completion_list ((VEC (char_ptr) **) list);
}
/* Helper routine for make_symbol_completion_list. */
@@ -5801,7 +5809,8 @@ static void
maybe_add_partial_symtab_filename (const char *filename, const char *fullname,
void *user_data)
{
- struct add_partial_filename_data *data = user_data;
+ struct add_partial_filename_data *data =
+ (struct add_partial_filename_data *) user_data;
if (not_interesting_fname (filename))
return;
@@ -5898,8 +5907,9 @@ make_source_files_completion_list (const char *text, const char *word)
static struct main_info *
get_main_info (void)
{
- struct main_info *info = program_space_data (current_program_space,
- main_progspace_key);
+ struct main_info *info =
+ (struct main_info *) program_space_data (current_program_space,
+ main_progspace_key);
if (info == NULL)
{
@@ -5924,7 +5934,7 @@ get_main_info (void)
static void
main_info_cleanup (struct program_space *pspace, void *data)
{
- struct main_info *info = data;
+ struct main_info *info = (struct main_info *) data;
if (info != NULL)
xfree (info->name_of_main);
diff --git a/gdb/target-dcache.c b/gdb/target-dcache.c
index 4d55397..f8d7de5 100644
--- a/gdb/target-dcache.c
+++ b/gdb/target-dcache.c
@@ -31,7 +31,7 @@ static const struct address_space_data *target_dcache_aspace_key;
static void
target_dcache_cleanup (struct address_space *aspace, void *arg)
{
- dcache_free (arg);
+ dcache_free ((DCACHE *) arg);
}
/* Target dcache is initialized or not. */
@@ -39,8 +39,9 @@ target_dcache_cleanup (struct address_space *aspace, void *arg)
int
target_dcache_init_p (void)
{
- DCACHE *dcache = address_space_data (current_program_space->aspace,
- target_dcache_aspace_key);
+ DCACHE *dcache =
+ (DCACHE *) address_space_data (current_program_space->aspace,
+ target_dcache_aspace_key);
return (dcache != NULL);
}
@@ -50,8 +51,9 @@ target_dcache_init_p (void)
void
target_dcache_invalidate (void)
{
- DCACHE *dcache = address_space_data (current_program_space->aspace,
- target_dcache_aspace_key);
+ DCACHE *dcache =
+ (DCACHE *) address_space_data (current_program_space->aspace,
+ target_dcache_aspace_key);
if (dcache != NULL)
dcache_invalidate (dcache);
@@ -63,8 +65,9 @@ target_dcache_invalidate (void)
DCACHE *
target_dcache_get (void)
{
- DCACHE *dcache = address_space_data (current_program_space->aspace,
- target_dcache_aspace_key);
+ DCACHE *dcache =
+ (DCACHE *) address_space_data (current_program_space->aspace,
+ target_dcache_aspace_key);
return dcache;
}
@@ -75,8 +78,9 @@ target_dcache_get (void)
DCACHE *
target_dcache_get_or_init (void)
{
- DCACHE *dcache = address_space_data (current_program_space->aspace,
- target_dcache_aspace_key);
+ DCACHE *dcache =
+ (DCACHE *) address_space_data (current_program_space->aspace,
+ target_dcache_aspace_key);
if (dcache == NULL)
{
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 9ef811b..9d23872 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -368,7 +368,8 @@ target_find_description (void)
{
struct tdesc_arch_data *data;
- data = gdbarch_data (target_gdbarch (), tdesc_data);
+ data = ((struct tdesc_arch_data *)
+ gdbarch_data (target_gdbarch (), tdesc_data));
if (tdesc_has_registers (current_target_desc)
&& data->arch_regs == NULL)
warning (_("Target-supplied registers are not supported "
@@ -575,7 +576,7 @@ tdesc_find_type (struct gdbarch *gdbarch, const char *id)
struct tdesc_arch_data *data;
int i, num_regs;
- data = gdbarch_data (gdbarch, tdesc_data);
+ data = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
num_regs = VEC_length (tdesc_arch_reg, data->arch_regs);
for (i = 0; i < num_regs; i++)
{
@@ -815,7 +816,7 @@ tdesc_data_alloc (void)
void
tdesc_data_cleanup (void *data_untyped)
{
- struct tdesc_arch_data *data = data_untyped;
+ struct tdesc_arch_data *data = (struct tdesc_arch_data *) data_untyped;
VEC_free (tdesc_arch_reg, data->arch_regs);
xfree (data);
@@ -913,7 +914,7 @@ tdesc_find_arch_register (struct gdbarch *gdbarch, int regno)
{
struct tdesc_arch_data *data;
- data = gdbarch_data (gdbarch, tdesc_data);
+ data = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
if (regno < VEC_length (tdesc_arch_reg, data->arch_regs))
return VEC_index (tdesc_arch_reg, data->arch_regs, regno);
else
@@ -943,7 +944,8 @@ tdesc_register_name (struct gdbarch *gdbarch, int regno)
if (regno >= num_regs && regno < num_regs + num_pseudo_regs)
{
- struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+ struct tdesc_arch_data *data =
+ (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
gdb_assert (data->pseudo_register_name != NULL);
return data->pseudo_register_name (gdbarch, regno);
@@ -962,7 +964,8 @@ tdesc_register_type (struct gdbarch *gdbarch, int regno)
if (reg == NULL && regno >= num_regs && regno < num_regs + num_pseudo_regs)
{
- struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+ struct tdesc_arch_data *data =
+ (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
gdb_assert (data->pseudo_register_type != NULL);
return data->pseudo_register_type (gdbarch, regno);
@@ -1100,7 +1103,8 @@ tdesc_register_reggroup_p (struct gdbarch *gdbarch, int regno,
if (regno >= num_regs && regno < num_regs + num_pseudo_regs)
{
- struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+ struct tdesc_arch_data *data =
+ (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
if (data->pseudo_register_reggroup_p != NULL)
return data->pseudo_register_reggroup_p (gdbarch, regno, reggroup);
@@ -1121,7 +1125,8 @@ void
set_tdesc_pseudo_register_name (struct gdbarch *gdbarch,
gdbarch_register_name_ftype *pseudo_name)
{
- struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+ struct tdesc_arch_data *data =
+ (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
data->pseudo_register_name = pseudo_name;
}
@@ -1130,7 +1135,8 @@ void
set_tdesc_pseudo_register_type (struct gdbarch *gdbarch,
gdbarch_register_type_ftype *pseudo_type)
{
- struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+ struct tdesc_arch_data *data =
+ (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
data->pseudo_register_type = pseudo_type;
}
@@ -1140,7 +1146,8 @@ set_tdesc_pseudo_register_reggroup_p
(struct gdbarch *gdbarch,
gdbarch_register_reggroup_p_ftype *pseudo_reggroup_p)
{
- struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+ struct tdesc_arch_data *data =
+ (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
data->pseudo_register_reggroup_p = pseudo_reggroup_p;
}
@@ -1166,7 +1173,7 @@ tdesc_use_registers (struct gdbarch *gdbarch,
included. */
gdb_assert (tdesc_has_registers (target_desc));
- data = gdbarch_data (gdbarch, tdesc_data);
+ data = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
data->arch_regs = early_data->arch_regs;
xfree (early_data);
@@ -1454,7 +1461,7 @@ allocate_target_description (void)
static void
free_target_description (void *arg)
{
- struct target_desc *target_desc = arg;
+ struct target_desc *target_desc = (struct target_desc *) arg;
struct tdesc_feature *feature;
struct property *prop;
int ix;
diff --git a/gdb/target-memory.c b/gdb/target-memory.c
index 93772aa..9f75034 100644
--- a/gdb/target-memory.c
+++ b/gdb/target-memory.c
@@ -28,8 +28,10 @@
static int
compare_block_starting_address (const void *a, const void *b)
{
- const struct memory_write_request *a_req = a;
- const struct memory_write_request *b_req = b;
+ const struct memory_write_request *a_req =
+ (const struct memory_write_request *) a;
+ const struct memory_write_request *b_req =
+ (const struct memory_write_request *) b;
if (a_req->begin < b_req->begin)
return -1;
@@ -288,7 +290,7 @@ compute_garbled_blocks (VEC(memory_write_request_s) *erased_blocks,
static void
cleanup_request_data (void *p)
{
- VEC(memory_write_request_s) **v = p;
+ VEC(memory_write_request_s) **v = (VEC(memory_write_request_s) **) p;
struct memory_write_request *r;
int i;
@@ -299,7 +301,7 @@ cleanup_request_data (void *p)
static void
cleanup_write_requests_vector (void *p)
{
- VEC(memory_write_request_s) **v = p;
+ VEC(memory_write_request_s) **v = (VEC(memory_write_request_s) **) p;
VEC_free (memory_write_request_s, *v);
}
diff --git a/gdb/target.c b/gdb/target.c
index 14cec56..b8b1e9b 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -347,7 +347,7 @@ complete_target_initialization (struct target_ops *t)
static void
open_target (char *args, int from_tty, struct cmd_list_element *command)
{
- struct target_ops *ops = get_cmd_context (command);
+ struct target_ops *ops = (struct target_ops *) get_cmd_context (command);
if (targetdebug)
fprintf_unfiltered (gdb_stdlog, "-> %s->to_open (...)\n",
@@ -531,7 +531,7 @@ target_supports_terminal_ours (void)
static void
cleanup_restore_target_terminal (void *arg)
{
- enum terminal_state *previous_state = arg;
+ enum terminal_state *previous_state = (enum terminal_state *) arg;
switch (*previous_state)
{
@@ -1768,7 +1768,7 @@ read_whatever_is_readable (struct target_ops *ops,
void
free_memory_read_result_vector (void *x)
{
- VEC(memory_read_result_s) *v = x;
+ VEC(memory_read_result_s) *v = (VEC(memory_read_result_s) *) x;
memory_read_result_s *current;
int ix;
diff --git a/gdb/thread.c b/gdb/thread.c
index 0f8eded..f37556c 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -749,7 +749,7 @@ delete_exited_threads (void)
static void
disable_thread_stack_temporaries (void *data)
{
- ptid_t *pd = data;
+ ptid_t *pd = (ptid_t *) data;
struct thread_info *tp = find_thread_ptid (*pd);
if (tp != NULL)
@@ -1082,7 +1082,7 @@ finish_thread_state (ptid_t ptid)
void
finish_thread_state_cleanup (void *arg)
{
- ptid_t *ptid_p = arg;
+ ptid_t *ptid_p = (ptid_t *) arg;
gdb_assert (arg);
@@ -1457,7 +1457,7 @@ static void
do_restore_current_thread_cleanup (void *arg)
{
struct thread_info *tp;
- struct current_thread_cleanup *old = arg;
+ struct current_thread_cleanup *old = (struct current_thread_cleanup *) arg;
tp = find_thread_ptid (old->inferior_ptid);
@@ -1489,7 +1489,7 @@ do_restore_current_thread_cleanup (void *arg)
static void
restore_current_thread_cleanup_dtor (void *arg)
{
- struct current_thread_cleanup *old = arg;
+ struct current_thread_cleanup *old = (struct current_thread_cleanup *) arg;
struct thread_info *tp;
struct inferior *inf;
@@ -1510,7 +1510,8 @@ static void
set_thread_refcount (void *data)
{
int k;
- struct thread_array_cleanup *ta_cleanup = data;
+ struct thread_array_cleanup *ta_cleanup =
+ (struct thread_array_cleanup *) data;
for (k = 0; k != ta_cleanup->count; k++)
ta_cleanup->tp_array[k]->refcount--;
@@ -1573,8 +1574,10 @@ static int tp_array_compar_ascending;
static int
tp_array_compar (const void *ap_voidp, const void *bp_voidp)
{
- const struct thread_info *const *ap = ap_voidp;
- const struct thread_info *const *bp = bp_voidp;
+ const struct thread_info *const *ap =
+ (const struct thread_info * const*) ap_voidp;
+ const struct thread_info *const *bp =
+ (const struct thread_info * const*) bp_voidp;
return ((((*ap)->num > (*bp)->num) - ((*ap)->num < (*bp)->num))
* (tp_array_compar_ascending ? +1 : -1));
@@ -1834,7 +1837,7 @@ do_captured_thread_select (struct ui_out *uiout, void *tidstr)
int num;
struct thread_info *tp;
- num = value_as_long (parse_and_eval (tidstr));
+ num = value_as_long (parse_and_eval ((const char *) tidstr));
tp = find_thread_id (num);
diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c
index 2cc38c5..015dbe6 100644
--- a/gdb/tic6x-tdep.c
+++ b/gdb/tic6x-tdep.c
@@ -405,7 +405,7 @@ tic6x_frame_unwind_cache (struct frame_info *this_frame,
struct tic6x_unwind_cache *cache;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct tic6x_unwind_cache *) *this_prologue_cache;
cache = FRAME_OBSTACK_ZALLOC (struct tic6x_unwind_cache);
(*this_prologue_cache) = cache;
@@ -516,7 +516,7 @@ tic6x_stub_this_id (struct frame_info *this_frame, void **this_cache,
if (*this_cache == NULL)
*this_cache = tic6x_make_stub_cache (this_frame);
- cache = *this_cache;
+ cache = (struct tic6x_unwind_cache *) *this_cache;
*this_id = frame_id_build (cache->cfa, get_frame_pc (this_frame));
}
diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c
index 65f0729..c2b0036 100644
--- a/gdb/tilegx-tdep.c
+++ b/gdb/tilegx-tdep.c
@@ -869,7 +869,7 @@ tilegx_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct tilegx_frame_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct tilegx_frame_cache);
*this_cache = cache;
diff --git a/gdb/top.c b/gdb/top.c
index 8f97ad4..65c6b50 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -278,7 +278,7 @@ void
do_restore_instream_cleanup (void *stream)
{
/* Restore the previous input stream. */
- instream = stream;
+ instream = (FILE *) stream;
}
/* Read commands from STREAM. */
@@ -813,7 +813,8 @@ struct gdb_readline_wrapper_cleanup
static void
gdb_readline_wrapper_cleanup (void *arg)
{
- struct gdb_readline_wrapper_cleanup *cleanup = arg;
+ struct gdb_readline_wrapper_cleanup *cleanup =
+ (struct gdb_readline_wrapper_cleanup *) arg;
rl_already_prompted = cleanup->already_prompted_orig;
@@ -1439,7 +1440,7 @@ struct qt_args
static int
kill_or_detach (struct inferior *inf, void *args)
{
- struct qt_args *qt = args;
+ struct qt_args *qt = (struct qt_args *) args;
struct thread_info *thread;
if (inf->pid == 0)
@@ -1470,7 +1471,7 @@ kill_or_detach (struct inferior *inf, void *args)
static int
print_inferior_quit_action (struct inferior *inf, void *arg)
{
- struct ui_file *stb = arg;
+ struct ui_file *stb = (struct ui_file *) arg;
if (inf->pid == 0)
return 0;
diff --git a/gdb/tracefile-tfile.c b/gdb/tracefile-tfile.c
index 68ff5b1..3ccd281 100644
--- a/gdb/tracefile-tfile.c
+++ b/gdb/tracefile-tfile.c
@@ -713,7 +713,7 @@ typedef int (*walk_blocks_callback_func) (char blocktype, void *data);
static int
match_blocktype (char blocktype, void *data)
{
- char *wantedp = data;
+ char *wantedp = (char *) data;
if (*wantedp == blocktype)
return 1;
@@ -966,7 +966,7 @@ tfile_get_trace_state_variable_value (struct target_ops *self,
static int
build_traceframe_info (char blocktype, void *data)
{
- struct traceframe_info *info = data;
+ struct traceframe_info *info = (struct traceframe_info *) data;
switch (blocktype)
{
diff --git a/gdb/tracefile.c b/gdb/tracefile.c
index 21bf25f..c26d8db 100644
--- a/gdb/tracefile.c
+++ b/gdb/tracefile.c
@@ -41,7 +41,7 @@
static void
trace_file_writer_xfree (void *arg)
{
- struct trace_file_writer *writer = arg;
+ struct trace_file_writer *writer = (struct trace_file_writer *) arg;
writer->ops->dtor (writer);
xfree (writer);
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 2ed24e9..e302d1c 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -860,7 +860,8 @@ static int memrange_cmp (const void *, const void *);
static int
memrange_cmp (const void *va, const void *vb)
{
- const struct memrange *a = va, *b = vb;
+ const struct memrange *a = (const struct memrange *) va;
+ const struct memrange *b = (const struct memrange *) vb;
if (a->type < b->type)
return -1;
@@ -1137,7 +1138,7 @@ do_collect_symbol (const char *print_name,
struct symbol *sym,
void *cb_data)
{
- struct add_local_symbols_data *p = cb_data;
+ struct add_local_symbols_data *p = (struct add_local_symbols_data *) cb_data;
collect_symbol (p->collect, sym, p->gdbarch, p->frame_regno,
p->frame_offset, p->pc, p->trace_string);
@@ -1231,7 +1232,7 @@ clear_collection_list (struct collection_list *list)
static void
do_clear_collection_list (void *list)
{
- struct collection_list *l = list;
+ struct collection_list *l = (struct collection_list *) list;
clear_collection_list (l);
}
@@ -3234,7 +3235,8 @@ struct current_traceframe_cleanup
static void
do_restore_current_traceframe_cleanup (void *arg)
{
- struct current_traceframe_cleanup *old = arg;
+ struct current_traceframe_cleanup *old =
+ (struct current_traceframe_cleanup *) arg;
set_current_traceframe (old->traceframe_number);
}
@@ -3242,7 +3244,8 @@ do_restore_current_traceframe_cleanup (void *arg)
static void
restore_current_traceframe_cleanup_dtor (void *arg)
{
- struct current_traceframe_cleanup *old = arg;
+ struct current_traceframe_cleanup *old =
+ (struct current_traceframe_cleanup *) arg;
xfree (old);
}
@@ -3892,7 +3895,8 @@ parse_tsv_definition (char *line, struct uploaded_tsv **utsvp)
void
free_current_marker (void *arg)
{
- struct static_tracepoint_marker **marker_p = arg;
+ struct static_tracepoint_marker **marker_p =
+ (struct static_tracepoint_marker **) arg;
if (*marker_p != NULL)
{
@@ -4185,12 +4189,14 @@ traceframe_info_start_memory (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct traceframe_info *info = user_data;
+ struct traceframe_info *info = (struct traceframe_info *) user_data;
struct mem_range *r = VEC_safe_push (mem_range_s, info->memory, NULL);
ULONGEST *start_p, *length_p;
- start_p = xml_find_attribute (attributes, "start")->value;
- length_p = xml_find_attribute (attributes, "length")->value;
+ start_p =
+ (long unsigned int *) xml_find_attribute (attributes, "start")->value;
+ length_p =
+ (long unsigned int *) xml_find_attribute (attributes, "length")->value;
r->start = *start_p;
r->length = *length_p;
@@ -4204,8 +4210,9 @@ traceframe_info_start_tvar (struct gdb_xml_parser *parser,
void *user_data,
VEC(gdb_xml_value_s) *attributes)
{
- struct traceframe_info *info = user_data;
- const char *id_attrib = xml_find_attribute (attributes, "id")->value;
+ struct traceframe_info *info = (struct traceframe_info *) user_data;
+ const char *id_attrib =
+ (const char *) xml_find_attribute (attributes, "id")->value;
int id = gdb_xml_parse_ulongest (parser, id_attrib);
VEC_safe_push (int, info->tvars, id);
@@ -4216,7 +4223,7 @@ traceframe_info_start_tvar (struct gdb_xml_parser *parser,
static void
free_result (void *p)
{
- struct traceframe_info *result = p;
+ struct traceframe_info *result = (struct traceframe_info *) p;
free_traceframe_info (result);
}
diff --git a/gdb/tramp-frame.c b/gdb/tramp-frame.c
index 7d288b6..f9c5045 100644
--- a/gdb/tramp-frame.c
+++ b/gdb/tramp-frame.c
@@ -43,7 +43,8 @@ static struct trad_frame_cache *
tramp_frame_cache (struct frame_info *this_frame,
void **this_cache)
{
- struct tramp_frame_cache *tramp_cache = (*this_cache);
+ struct tramp_frame_cache *tramp_cache =
+ (struct tramp_frame_cache *) (*this_cache);
if (tramp_cache->trad_cache == NULL)
{
diff --git a/gdb/tui/tui-file.c b/gdb/tui/tui-file.c
index 729cb2a..8066578 100644
--- a/gdb/tui/tui-file.c
+++ b/gdb/tui/tui-file.c
@@ -71,7 +71,7 @@ tui_file_new (void)
static void
tui_file_delete (struct ui_file *file)
{
- struct tui_stream *tmpstream = ui_file_data (file);
+ struct tui_stream *tmpstream = (struct tui_stream *) ui_file_data (file);
if (tmpstream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
@@ -88,7 +88,7 @@ struct ui_file *
tui_fileopen (FILE *stream)
{
struct ui_file *file = tui_file_new ();
- struct tui_stream *tmpstream = ui_file_data (file);
+ struct tui_stream *tmpstream = (struct tui_stream *) ui_file_data (file);
tmpstream->ts_streamtype = afile;
tmpstream->ts_filestream = stream;
@@ -101,7 +101,7 @@ struct ui_file *
tui_sfileopen (int n)
{
struct ui_file *file = tui_file_new ();
- struct tui_stream *tmpstream = ui_file_data (file);
+ struct tui_stream *tmpstream = (struct tui_stream *) ui_file_data (file);
tmpstream->ts_streamtype = astring;
tmpstream->ts_filestream = NULL;
@@ -121,7 +121,7 @@ tui_sfileopen (int n)
static int
tui_file_isatty (struct ui_file *file)
{
- struct tui_stream *stream = ui_file_data (file);
+ struct tui_stream *stream = (struct tui_stream *) ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
@@ -135,7 +135,7 @@ tui_file_isatty (struct ui_file *file)
static void
tui_file_rewind (struct ui_file *file)
{
- struct tui_stream *stream = ui_file_data (file);
+ struct tui_stream *stream = (struct tui_stream *) ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
@@ -148,7 +148,7 @@ tui_file_put (struct ui_file *file,
ui_file_put_method_ftype *write,
void *dest)
{
- struct tui_stream *stream = ui_file_data (file);
+ struct tui_stream *stream = (struct tui_stream *) ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
@@ -169,7 +169,7 @@ tui_file_put (struct ui_file *file,
void
tui_file_fputs (const char *linebuffer, struct ui_file *file)
{
- struct tui_stream *stream = ui_file_data (file);
+ struct tui_stream *stream = (struct tui_stream *) ui_file_data (file);
if (stream->ts_streamtype == astring)
{
@@ -189,7 +189,7 @@ tui_file_fputs (const char *linebuffer, struct ui_file *file)
char *
tui_file_get_strbuf (struct ui_file *file)
{
- struct tui_stream *stream = ui_file_data (file);
+ struct tui_stream *stream = (struct tui_stream *) ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
@@ -203,7 +203,7 @@ tui_file_get_strbuf (struct ui_file *file)
void
tui_file_adjust_strbuf (int n, struct ui_file *file)
{
- struct tui_stream *stream = ui_file_data (file);
+ struct tui_stream *stream = (struct tui_stream *) ui_file_data (file);
int non_null_chars;
if (stream->ts_magic != &tui_file_magic)
@@ -233,7 +233,7 @@ tui_file_adjust_strbuf (int n, struct ui_file *file)
static void
tui_file_flush (struct ui_file *file)
{
- struct tui_stream *stream = ui_file_data (file);
+ struct tui_stream *stream = (struct tui_stream *) ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index 2528296..99a0c00 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -550,13 +550,14 @@ static void
make_command_window (struct tui_win_info **win_info_ptr,
int height, int origin_y)
{
- *win_info_ptr = init_and_make_win (*win_info_ptr,
- CMD_WIN,
- height,
- tui_term_width (),
- 0,
- origin_y,
- DONT_BOX_WINDOW);
+ *win_info_ptr =
+ (struct tui_win_info *) init_and_make_win (*win_info_ptr,
+ CMD_WIN,
+ height,
+ tui_term_width (),
+ 0,
+ origin_y,
+ DONT_BOX_WINDOW);
(*win_info_ptr)->can_highlight = FALSE;
}
@@ -590,13 +591,14 @@ static void
make_data_window (struct tui_win_info **win_info_ptr,
int height, int origin_y)
{
- *win_info_ptr = init_and_make_win (*win_info_ptr,
- DATA_WIN,
- height,
- tui_term_width (),
- 0,
- origin_y,
- BOX_WINDOW);
+ *win_info_ptr =
+ (struct tui_win_info *) init_and_make_win (*win_info_ptr,
+ DATA_WIN,
+ height,
+ tui_term_width (),
+ 0,
+ origin_y,
+ BOX_WINDOW);
}
@@ -662,13 +664,15 @@ show_source_disasm_command (void)
if (TUI_DISASM_WIN == NULL)
{
make_disasm_window (&TUI_DISASM_WIN, asm_height, src_height - 1);
- locator = init_and_make_win (locator,
- LOCATOR_WIN,
- 2 /* 1 */ ,
- tui_term_width (),
- 0,
- (src_height + asm_height) - 1,
- DONT_BOX_WINDOW);
+ locator =
+ ((struct tui_gen_win_info *)
+ init_and_make_win (locator,
+ LOCATOR_WIN,
+ 2 /* 1 */ ,
+ tui_term_width (),
+ 0,
+ (src_height + asm_height) - 1,
+ DONT_BOX_WINDOW));
}
else
{
@@ -754,13 +758,15 @@ show_data (enum tui_layout_type new_layout)
make_source_window (&tui_win_list[win_type], src_height, data_height - 1);
else
make_disasm_window (&tui_win_list[win_type], src_height, data_height - 1);
- locator = init_and_make_win (locator,
- LOCATOR_WIN,
- 2 /* 1 */ ,
- tui_term_width (),
- 0,
- total_height - 1,
- DONT_BOX_WINDOW);
+ locator =
+ ((struct tui_gen_win_info *)
+ init_and_make_win (locator,
+ LOCATOR_WIN,
+ 2 /* 1 */ ,
+ tui_term_width (),
+ 0,
+ total_height - 1,
+ DONT_BOX_WINDOW));
}
else
{
@@ -870,22 +876,26 @@ make_source_or_disasm_window (struct tui_win_info **win_info_ptr,
execution_info = tui_source_exec_info_win_ptr ();
else
execution_info = tui_disassem_exec_info_win_ptr ();
- execution_info = init_and_make_win (execution_info,
- EXEC_INFO_WIN,
- height,
- 3,
- 0,
- origin_y,
- DONT_BOX_WINDOW);
+ execution_info =
+ ((struct tui_gen_win_info *)
+ init_and_make_win (execution_info,
+ EXEC_INFO_WIN,
+ height,
+ 3,
+ 0,
+ origin_y,
+ DONT_BOX_WINDOW));
/* Now create the source window. */
- *win_info_ptr = init_and_make_win (*win_info_ptr,
- type,
- height,
- tui_term_width () - execution_info->width,
- execution_info->width,
- origin_y,
- BOX_WINDOW);
+ *win_info_ptr =
+ ((struct tui_win_info *)
+ init_and_make_win (*win_info_ptr,
+ type,
+ height,
+ tui_term_width () - execution_info->width,
+ execution_info->width,
+ origin_y,
+ BOX_WINDOW));
(*win_info_ptr)->detail.source_info.execution_info = execution_info;
}
@@ -918,13 +928,15 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
make_source_window (win_info_ptr, src_height - 1, 0);
else
make_disasm_window (win_info_ptr, src_height - 1, 0);
- locator = init_and_make_win (locator,
- LOCATOR_WIN,
- 2 /* 1 */ ,
- tui_term_width (),
- 0,
- src_height - 1,
- DONT_BOX_WINDOW);
+ locator =
+ ((struct tui_gen_win_info *)
+ init_and_make_win (locator,
+ LOCATOR_WIN,
+ 2 /* 1 */ ,
+ tui_term_width (),
+ 0,
+ src_height - 1,
+ DONT_BOX_WINDOW));
}
else
{
diff --git a/gdb/tui/tui-out.c b/gdb/tui/tui-out.c
index 41ea349..d415a60 100644
--- a/gdb/tui/tui-out.c
+++ b/gdb/tui/tui-out.c
@@ -48,7 +48,7 @@ tui_field_int (struct ui_out *uiout,
const char *fldname,
int value)
{
- tui_out_data *data = ui_out_data (uiout);
+ tui_out_data *data = (tui_out_data *) ui_out_data (uiout);
if (data->base.suppress_output)
return;
@@ -76,7 +76,7 @@ tui_field_string (struct ui_out *uiout,
const char *fldname,
const char *string)
{
- tui_out_data *data = ui_out_data (uiout);
+ tui_out_data *data = (tui_out_data *) ui_out_data (uiout);
if (data->base.suppress_output)
return;
@@ -107,7 +107,7 @@ tui_field_fmt (struct ui_out *uiout, int fldno,
const char *format,
va_list args)
{
- tui_out_data *data = ui_out_data (uiout);
+ tui_out_data *data = (tui_out_data *) ui_out_data (uiout);
if (data->base.suppress_output)
return;
@@ -122,7 +122,7 @@ tui_field_fmt (struct ui_out *uiout, int fldno,
static void
tui_text (struct ui_out *uiout, const char *string)
{
- tui_out_data *data = ui_out_data (uiout);
+ tui_out_data *data = (tui_out_data *) ui_out_data (uiout);
if (data->base.suppress_output)
return;
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index c67477a..c188fed 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -87,7 +87,7 @@ struct typedef_hash_table
static hashval_t
hash_typedef_field (const void *p)
{
- const struct typedef_field *tf = p;
+ const struct typedef_field *tf = (const struct typedef_field *) p;
struct type *t = check_typedef (tf->type);
return htab_hash_string (TYPE_SAFE_NAME (t));
@@ -98,8 +98,8 @@ hash_typedef_field (const void *p)
static int
eq_typedef_field (const void *a, const void *b)
{
- const struct typedef_field *tfa = a;
- const struct typedef_field *tfb = b;
+ const struct typedef_field *tfa = (const struct typedef_field *) a;
+ const struct typedef_field *tfb = (const struct typedef_field *) b;
return types_equal (tfa->type, tfb->type);
}
@@ -195,7 +195,7 @@ free_typedef_hash (struct typedef_hash_table *table)
static void
do_free_typedef_hash (void *arg)
{
- free_typedef_hash (arg);
+ free_typedef_hash ((struct typedef_hash_table *) arg);
}
/* Return a new cleanup that frees TABLE. */
@@ -211,7 +211,7 @@ make_cleanup_free_typedef_hash (struct typedef_hash_table *table)
static int
copy_typedef_hash_element (void **slot, void *nt)
{
- htab_t new_table = nt;
+ htab_t new_table = (htab_t) nt;
void **new_slot;
new_slot = htab_find_slot (new_table, *slot, INSERT);
@@ -242,7 +242,7 @@ copy_typedef_hash (struct typedef_hash_table *table)
static void
do_free_global_table (void *arg)
{
- struct type_print_options *flags = arg;
+ struct type_print_options *flags = (struct type_print_options *) arg;
free_typedef_hash (flags->global_typedefs);
free_ext_lang_type_printers (flags->global_printers);
@@ -281,7 +281,7 @@ find_global_typedef (const struct type_print_options *flags,
slot = htab_find_slot (flags->global_typedefs->table, &tf, INSERT);
if (*slot != NULL)
{
- new_tf = *slot;
+ new_tf = (struct typedef_field *) *slot;
return new_tf->name;
}
@@ -320,7 +320,8 @@ find_typedef_in_hash (const struct type_print_options *flags, struct type *t)
tf.name = NULL;
tf.type = t;
- found = htab_find (flags->local_typedefs->table, &tf);
+ found =
+ (struct typedef_field *) htab_find (flags->local_typedefs->table, &tf);
if (found != NULL)
return found->name;
diff --git a/gdb/ui-file.c b/gdb/ui-file.c
index d1928c4..2671804 100644
--- a/gdb/ui-file.c
+++ b/gdb/ui-file.c
@@ -225,7 +225,7 @@ ui_file_write (struct ui_file *file,
void
ui_file_write_for_put (void *data, const char *buffer, long length_buffer)
{
- ui_file_write (data, buffer, length_buffer);
+ ui_file_write ((struct ui_file *) data, buffer, length_buffer);
}
void
@@ -330,7 +330,7 @@ struct accumulated_ui_file
static void
do_ui_file_xstrdup (void *context, const char *buffer, long length)
{
- struct accumulated_ui_file *acc = context;
+ struct accumulated_ui_file *acc = (struct accumulated_ui_file *) context;
if (acc->buffer == NULL)
acc->buffer = (char *) xmalloc (length + 1);
@@ -413,7 +413,7 @@ mem_file_new (void)
static void
mem_file_delete (struct ui_file *file)
{
- struct mem_file *stream = ui_file_data (file);
+ struct mem_file *stream = (struct mem_file *) ui_file_data (file);
if (stream->magic != &mem_file_magic)
internal_error (__FILE__, __LINE__,
@@ -432,7 +432,7 @@ mem_fileopen (void)
static void
mem_file_rewind (struct ui_file *file)
{
- struct mem_file *stream = ui_file_data (file);
+ struct mem_file *stream = (struct mem_file *) ui_file_data (file);
if (stream->magic != &mem_file_magic)
internal_error (__FILE__, __LINE__,
@@ -445,7 +445,7 @@ mem_file_put (struct ui_file *file,
ui_file_put_method_ftype *write,
void *dest)
{
- struct mem_file *stream = ui_file_data (file);
+ struct mem_file *stream = (struct mem_file *) ui_file_data (file);
if (stream->magic != &mem_file_magic)
internal_error (__FILE__, __LINE__,
@@ -459,7 +459,7 @@ mem_file_write (struct ui_file *file,
const char *buffer,
long length_buffer)
{
- struct mem_file *stream = ui_file_data (file);
+ struct mem_file *stream = (struct mem_file *) ui_file_data (file);
if (stream->magic != &mem_file_magic)
internal_error (__FILE__, __LINE__,
@@ -535,7 +535,7 @@ stdio_file_new (FILE *file, int close_p)
static void
stdio_file_delete (struct ui_file *file)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
@@ -550,7 +550,7 @@ stdio_file_delete (struct ui_file *file)
static void
stdio_file_flush (struct ui_file *file)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
@@ -561,7 +561,7 @@ stdio_file_flush (struct ui_file *file)
static long
stdio_file_read (struct ui_file *file, char *buf, long length_buf)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
@@ -584,7 +584,7 @@ stdio_file_read (struct ui_file *file, char *buf, long length_buf)
static void
stdio_file_write (struct ui_file *file, const char *buf, long length_buf)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
@@ -600,7 +600,7 @@ static void
stdio_file_write_async_safe (struct ui_file *file,
const char *buf, long length_buf)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
{
@@ -623,7 +623,7 @@ stdio_file_write_async_safe (struct ui_file *file,
static void
stdio_file_fputs (const char *linebuffer, struct ui_file *file)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
@@ -638,7 +638,7 @@ stdio_file_fputs (const char *linebuffer, struct ui_file *file)
static int
stdio_file_isatty (struct ui_file *file)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
@@ -649,7 +649,7 @@ stdio_file_isatty (struct ui_file *file)
static int
stdio_file_fseek (struct ui_file *file, long offset, int whence)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
@@ -770,7 +770,7 @@ tee_file_new (struct ui_file *one, int close_one,
static void
tee_file_delete (struct ui_file *file)
{
- struct tee_file *tee = ui_file_data (file);
+ struct tee_file *tee = (struct tee_file *) ui_file_data (file);
if (tee->magic != &tee_file_magic)
internal_error (__FILE__, __LINE__,
@@ -786,7 +786,7 @@ tee_file_delete (struct ui_file *file)
static void
tee_file_flush (struct ui_file *file)
{
- struct tee_file *tee = ui_file_data (file);
+ struct tee_file *tee = (struct tee_file *) ui_file_data (file);
if (tee->magic != &tee_file_magic)
internal_error (__FILE__, __LINE__,
@@ -798,7 +798,7 @@ tee_file_flush (struct ui_file *file)
static void
tee_file_write (struct ui_file *file, const char *buf, long length_buf)
{
- struct tee_file *tee = ui_file_data (file);
+ struct tee_file *tee = (struct tee_file *) ui_file_data (file);
if (tee->magic != &tee_file_magic)
internal_error (__FILE__, __LINE__,
@@ -810,7 +810,7 @@ tee_file_write (struct ui_file *file, const char *buf, long length_buf)
static void
tee_file_fputs (const char *linebuffer, struct ui_file *file)
{
- struct tee_file *tee = ui_file_data (file);
+ struct tee_file *tee = (struct tee_file *) ui_file_data (file);
if (tee->magic != &tee_file_magic)
internal_error (__FILE__, __LINE__,
@@ -822,7 +822,7 @@ tee_file_fputs (const char *linebuffer, struct ui_file *file)
static int
tee_file_isatty (struct ui_file *file)
{
- struct tee_file *tee = ui_file_data (file);
+ struct tee_file *tee = (struct tee_file *) ui_file_data (file);
if (tee->magic != &tee_file_magic)
internal_error (__FILE__, __LINE__,
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index a87c1d3..ed092a5 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -360,7 +360,7 @@ and before table_body."));
static void
do_cleanup_table_end (void *data)
{
- struct ui_out *ui_out = data;
+ struct ui_out *ui_out = (struct ui_out *) data;
ui_out_table_end (ui_out);
}
@@ -429,7 +429,8 @@ struct ui_out_end_cleanup_data
static void
do_cleanup_end (void *data)
{
- struct ui_out_end_cleanup_data *end_cleanup_data = data;
+ struct ui_out_end_cleanup_data *end_cleanup_data =
+ (struct ui_out_end_cleanup_data *) data;
ui_out_end (end_cleanup_data->uiout, end_cleanup_data->type);
xfree (end_cleanup_data);
diff --git a/gdb/user-regs.c b/gdb/user-regs.c
index 526814b..a0e6311 100644
--- a/gdb/user-regs.c
+++ b/gdb/user-regs.c
@@ -112,13 +112,14 @@ void
user_reg_add (struct gdbarch *gdbarch, const char *name,
user_reg_read_ftype *read, const void *baton)
{
- struct gdb_user_regs *regs = gdbarch_data (gdbarch, user_regs_data);
+ struct gdb_user_regs *regs =
+ (struct gdb_user_regs *) gdbarch_data (gdbarch, user_regs_data);
if (regs == NULL)
{
/* ULGH, called during architecture initialization. Patch
things up. */
- regs = user_regs_init (gdbarch);
+ regs = (struct gdb_user_regs *) user_regs_init (gdbarch);
deprecated_set_gdbarch_data (gdbarch, user_regs_data, regs);
}
append_user_reg (regs, name, read, baton,
@@ -154,7 +155,8 @@ user_reg_map_name_to_regnum (struct gdbarch *gdbarch, const char *name,
/* Search the user name space. */
{
- struct gdb_user_regs *regs = gdbarch_data (gdbarch, user_regs_data);
+ struct gdb_user_regs *regs =
+ (struct gdb_user_regs *) gdbarch_data (gdbarch, user_regs_data);
struct user_reg *reg;
int nr;
@@ -174,7 +176,8 @@ user_reg_map_name_to_regnum (struct gdbarch *gdbarch, const char *name,
static struct user_reg *
usernum_to_user_reg (struct gdbarch *gdbarch, int usernum)
{
- struct gdb_user_regs *regs = gdbarch_data (gdbarch, user_regs_data);
+ struct gdb_user_regs *regs =
+ (struct gdb_user_regs *) gdbarch_data (gdbarch, user_regs_data);
struct user_reg *reg;
for (reg = regs->first; reg != NULL; reg = reg->next)
@@ -226,7 +229,7 @@ maintenance_print_user_registers (char *args, int from_tty)
struct user_reg *reg;
int regnum;
- regs = gdbarch_data (gdbarch, user_regs_data);
+ regs = (struct gdb_user_regs *) gdbarch_data (gdbarch, user_regs_data);
regnum = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
fprintf_unfiltered (gdb_stdout, " %-11s %3s\n", "Name", "Nr");
diff --git a/gdb/utils.c b/gdb/utils.c
index 28d6b2d..d865589 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -182,7 +182,7 @@ make_cleanup_dyn_string_delete (dyn_string_t arg)
static void
do_bfd_close_cleanup (void *arg)
{
- gdb_bfd_unref (arg);
+ gdb_bfd_unref ((bfd *) arg);
}
struct cleanup *
@@ -196,7 +196,7 @@ make_cleanup_bfd_unref (bfd *abfd)
static void
do_fclose_cleanup (void *arg)
{
- FILE *file = arg;
+ FILE *file = (FILE *) arg;
fclose (file);
}
@@ -214,7 +214,7 @@ make_cleanup_fclose (FILE *file)
static void
do_obstack_free (void *arg)
{
- struct obstack *ob = arg;
+ struct obstack *ob = (struct obstack *) arg;
obstack_free (ob, NULL);
}
@@ -230,7 +230,7 @@ make_cleanup_obstack_free (struct obstack *obstack)
static void
do_ui_file_delete (void *arg)
{
- ui_file_delete (arg);
+ ui_file_delete ((struct ui_file *) arg);
}
struct cleanup *
@@ -244,7 +244,7 @@ make_cleanup_ui_file_delete (struct ui_file *arg)
static void
do_ui_out_redirect_pop (void *arg)
{
- struct ui_out *uiout = arg;
+ struct ui_out *uiout = (struct ui_out *) arg;
if (ui_out_redirect (uiout, NULL) < 0)
warning (_("Cannot restore redirection of the current output protocol"));
@@ -262,7 +262,7 @@ make_cleanup_ui_out_redirect_pop (struct ui_out *uiout)
static void
do_free_section_addr_info (void *arg)
{
- free_section_addr_info (arg);
+ free_section_addr_info ((struct section_addr_info *) arg);
}
struct cleanup *
@@ -280,7 +280,8 @@ struct restore_integer_closure
static void
restore_integer (void *p)
{
- struct restore_integer_closure *closure = p;
+ struct restore_integer_closure *closure =
+ (struct restore_integer_closure *) p;
*(closure->variable) = closure->value;
}
@@ -313,7 +314,7 @@ make_cleanup_restore_uinteger (unsigned int *variable)
static void
do_unpush_target (void *arg)
{
- struct target_ops *ops = arg;
+ struct target_ops *ops = (struct target_ops *) arg;
unpush_target (ops);
}
@@ -331,7 +332,7 @@ make_cleanup_unpush_target (struct target_ops *ops)
static void
do_htab_delete_cleanup (void *htab_voidp)
{
- htab_t htab = htab_voidp;
+ htab_t htab = (htab_t) htab_voidp;
htab_delete (htab);
}
@@ -353,7 +354,8 @@ struct restore_ui_file_closure
static void
do_restore_ui_file (void *p)
{
- struct restore_ui_file_closure *closure = p;
+ struct restore_ui_file_closure *closure =
+ (struct restore_ui_file_closure *) p;
*(closure->variable) = closure->value;
}
@@ -394,7 +396,7 @@ make_cleanup_value_free_to_mark (struct value *mark)
static void
do_value_free (void *value)
{
- value_free (value);
+ value_free ((struct value *) value);
}
/* Free VALUE. */
@@ -410,7 +412,7 @@ make_cleanup_value_free (struct value *value)
static void
do_free_so (void *arg)
{
- struct so_list *so = arg;
+ struct so_list *so = (struct so_list *) arg;
free_so (so);
}
@@ -474,7 +476,7 @@ make_cleanup_clear_parser_state (struct parser_state **p)
void
free_current_contents (void *ptr)
{
- void **location = ptr;
+ void **location = (void **) ptr;
if (location == NULL)
internal_error (__FILE__, __LINE__,
@@ -1130,7 +1132,7 @@ make_hex_string (const gdb_byte *data, size_t length)
static void
do_regfree_cleanup (void *r)
{
- regfree (r);
+ regfree ((regex_t *) r);
}
/* Create a new cleanup that frees the compiled regular expression R. */
@@ -2781,7 +2783,7 @@ print_core_address (struct gdbarch *gdbarch, CORE_ADDR address)
hashval_t
core_addr_hash (const void *ap)
{
- const CORE_ADDR *addrp = ap;
+ const CORE_ADDR *addrp = (const CORE_ADDR *) ap;
return *addrp;
}
@@ -2791,8 +2793,8 @@ core_addr_hash (const void *ap)
int
core_addr_eq (const void *ap, const void *bp)
{
- const CORE_ADDR *addr_ap = ap;
- const CORE_ADDR *addr_bp = bp;
+ const CORE_ADDR *addr_ap = (const CORE_ADDR *) ap;
+ const CORE_ADDR *addr_bp = (const CORE_ADDR *) bp;
return *addr_ap == *addr_bp;
}
@@ -3198,7 +3200,7 @@ producer_is_gcc (const char *producer, int *major, int *minor)
static void
do_free_char_ptr_vec (void *arg)
{
- VEC (char_ptr) *char_ptr_vec = arg;
+ VEC (char_ptr) *char_ptr_vec = (VEC (char_ptr) *) arg;
free_char_ptr_vec (char_ptr_vec);
}
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 401c359..6c03dbd 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -1220,7 +1220,7 @@ v850_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct v850_frame_cache *) *this_cache;
cache = v850_alloc_frame_cache (this_frame);
*this_cache = cache;
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 74a06d9..92b0f33 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -2196,7 +2196,7 @@ free_variable (struct varobj *var)
static void
do_free_variable_cleanup (void *var)
{
- free_variable (var);
+ free_variable ((struct varobj *) var);
}
static struct cleanup *
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index db57bee..cf77ed9 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -71,7 +71,7 @@ static void
vax_supply_gregset (const struct regset *regset, struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
for (i = 0; i < VAX_NUM_REGS; i++)
@@ -318,7 +318,7 @@ vax_frame_cache (struct frame_info *this_frame, void **this_cache)
int regnum;
if (*this_cache)
- return *this_cache;
+ return (struct vax_frame_cache *) *this_cache;
/* Allocate a new cache. */
cache = FRAME_OBSTACK_ZALLOC (struct vax_frame_cache);
diff --git a/gdb/vaxobsd-tdep.c b/gdb/vaxobsd-tdep.c
index 4e2701f..af3c7fa 100644
--- a/gdb/vaxobsd-tdep.c
+++ b/gdb/vaxobsd-tdep.c
@@ -87,7 +87,7 @@ vaxobsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR addr, base, func;
if (*this_cache)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
*this_cache = cache;
diff --git a/gdb/xml-support.c b/gdb/xml-support.c
index 211f745..23fd73f 100644
--- a/gdb/xml-support.c
+++ b/gdb/xml-support.c
@@ -83,7 +83,7 @@ struct gdb_xml_parser
static void
gdb_xml_body_text (void *data, const XML_Char *text, int length)
{
- struct gdb_xml_parser *parser = data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data;
struct scope_level *scope = VEC_last (scope_level_s, parser->scopes);
if (parser->error.reason < 0)
@@ -156,7 +156,7 @@ xml_find_attribute (VEC(gdb_xml_value_s) *attributes, const char *name)
static void
gdb_xml_values_cleanup (void *data)
{
- VEC(gdb_xml_value_s) **values = data;
+ VEC(gdb_xml_value_s) **values = (VEC(gdb_xml_value_s) **) data;
struct gdb_xml_value *value;
int ix;
@@ -173,7 +173,7 @@ static void
gdb_xml_start_element (void *data, const XML_Char *name,
const XML_Char **attrs)
{
- struct gdb_xml_parser *parser = data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data;
struct scope_level *scope;
struct scope_level new_scope;
const struct gdb_xml_element *element;
@@ -312,7 +312,7 @@ static void
gdb_xml_start_element_wrapper (void *data, const XML_Char *name,
const XML_Char **attrs)
{
- struct gdb_xml_parser *parser = data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data;
if (parser->error.reason < 0)
return;
@@ -337,7 +337,7 @@ gdb_xml_start_element_wrapper (void *data, const XML_Char *name,
static void
gdb_xml_end_element (void *data, const XML_Char *name)
{
- struct gdb_xml_parser *parser = data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data;
struct scope_level *scope = VEC_last (scope_level_s, parser->scopes);
const struct gdb_xml_element *element;
unsigned int seen;
@@ -395,7 +395,7 @@ gdb_xml_end_element (void *data, const XML_Char *name)
static void
gdb_xml_end_element_wrapper (void *data, const XML_Char *name)
{
- struct gdb_xml_parser *parser = data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data;
if (parser->error.reason < 0)
return;
@@ -419,7 +419,7 @@ gdb_xml_end_element_wrapper (void *data, const XML_Char *name)
static void
gdb_xml_cleanup (void *arg)
{
- struct gdb_xml_parser *parser = arg;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) arg;
struct scope_level *scope;
int ix;
@@ -489,7 +489,8 @@ gdb_xml_fetch_external_entity (XML_Parser expat_parser,
const XML_Char *systemId,
const XML_Char *publicId)
{
- struct gdb_xml_parser *parser = XML_GetUserData (expat_parser);
+ struct gdb_xml_parser *parser =
+ (struct gdb_xml_parser *) XML_GetUserData (expat_parser);
XML_Parser entity_parser;
const char *text;
enum XML_Status status;
@@ -689,10 +690,12 @@ gdb_xml_parse_attr_enum (struct gdb_xml_parser *parser,
const struct gdb_xml_attribute *attribute,
const char *value)
{
- const struct gdb_xml_enum *enums = attribute->handler_data;
+ const struct gdb_xml_enum *enums =
+ (const struct gdb_xml_enum *) attribute->handler_data;
void *ret;
- for (enums = attribute->handler_data; enums->name != NULL; enums++)
+ for (enums = (const struct gdb_xml_enum *) attribute->handler_data;
+ enums->name != NULL; enums++)
if (strcasecmp (enums->name, value) == 0)
break;
@@ -754,8 +757,9 @@ xinclude_start_include (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct xinclude_parsing_data *data = user_data;
- char *href = xml_find_attribute (attributes, "href")->value;
+ struct xinclude_parsing_data *data =
+ (struct xinclude_parsing_data *) user_data;
+ char *href = (char *) xml_find_attribute (attributes, "href")->value;
struct cleanup *back_to;
char *text, *output;
@@ -789,7 +793,8 @@ xinclude_end_include (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct xinclude_parsing_data *data = user_data;
+ struct xinclude_parsing_data *data =
+ (struct xinclude_parsing_data *) user_data;
data->skip_depth--;
}
@@ -797,8 +802,9 @@ xinclude_end_include (struct gdb_xml_parser *parser,
static void XMLCALL
xml_xinclude_default (void *data_, const XML_Char *s, int len)
{
- struct gdb_xml_parser *parser = data_;
- struct xinclude_parsing_data *data = parser->user_data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data_;
+ struct xinclude_parsing_data *data =
+ (struct xinclude_parsing_data *) parser->user_data;
/* If we are inside of e.g. xi:include or the DTD, don't save this
string. */
@@ -815,8 +821,9 @@ xml_xinclude_start_doctype (void *data_, const XML_Char *doctypeName,
const XML_Char *sysid, const XML_Char *pubid,
int has_internal_subset)
{
- struct gdb_xml_parser *parser = data_;
- struct xinclude_parsing_data *data = parser->user_data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data_;
+ struct xinclude_parsing_data *data =
+ (struct xinclude_parsing_data *) parser->user_data;
/* Don't print out the doctype, or the contents of the DTD internal
subset, if any. */
@@ -826,8 +833,9 @@ xml_xinclude_start_doctype (void *data_, const XML_Char *doctypeName,
static void XMLCALL
xml_xinclude_end_doctype (void *data_)
{
- struct gdb_xml_parser *parser = data_;
- struct xinclude_parsing_data *data = parser->user_data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data_;
+ struct xinclude_parsing_data *data =
+ (struct xinclude_parsing_data *) parser->user_data;
data->skip_depth--;
}
@@ -844,7 +852,7 @@ xml_xinclude_xml_decl (void *data_, const XML_Char *version,
static void
xml_xinclude_cleanup (void *data_)
{
- struct xinclude_parsing_data *data = data_;
+ struct xinclude_parsing_data *data = (struct xinclude_parsing_data *) data_;
obstack_free (&data->obstack, NULL);
xfree (data);
@@ -1015,7 +1023,7 @@ obstack_xml_printf (struct obstack *obstack, const char *format, ...)
char *
xml_fetch_content_from_file (const char *filename, void *baton)
{
- const char *dirname = baton;
+ const char *dirname = (const char *) baton;
FILE *file;
struct cleanup *back_to;
char *text;
diff --git a/gdb/xml-syscall.c b/gdb/xml-syscall.c
index 255d816..31a80a5 100644
--- a/gdb/xml-syscall.c
+++ b/gdb/xml-syscall.c
@@ -129,7 +129,7 @@ syscalls_info_free_syscalls_desc (struct syscall_desc *sd)
static void
free_syscalls_info (void *arg)
{
- struct syscalls_info *syscalls_info = arg;
+ struct syscalls_info *syscalls_info = (struct syscalls_info *) arg;
struct syscall_desc *sysdesc;
int i;
@@ -171,7 +171,7 @@ syscall_start_syscall (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct syscall_parsing_data *data = user_data;
+ struct syscall_parsing_data *data = (struct syscall_parsing_data *) user_data;
struct gdb_xml_value *attrs = VEC_address (gdb_xml_value_s, attributes);
int len, i;
/* syscall info. */
@@ -183,7 +183,7 @@ syscall_start_syscall (struct gdb_xml_parser *parser,
for (i = 0; i < len; i++)
{
if (strcmp (attrs[i].name, "name") == 0)
- name = attrs[i].value;
+ name = (char *) attrs[i].value;
else if (strcmp (attrs[i].name, "number") == 0)
number = * (ULONGEST *) attrs[i].value;
else
diff --git a/gdb/xml-tdesc.c b/gdb/xml-tdesc.c
index 65744ff..10c0d9e 100644
--- a/gdb/xml-tdesc.c
+++ b/gdb/xml-tdesc.c
@@ -101,7 +101,7 @@ tdesc_end_arch (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
const struct bfd_arch_info *arch;
arch = bfd_scan_arch (body_text);
@@ -118,7 +118,7 @@ tdesc_end_osabi (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
enum gdb_osabi osabi;
osabi = osabi_from_tdesc_string (body_text);
@@ -136,7 +136,7 @@ tdesc_end_compatible (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
const struct bfd_arch_info *arch;
arch = bfd_scan_arch (body_text);
@@ -150,7 +150,7 @@ tdesc_start_target (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- char *version = xml_find_attribute (attributes, "version")->value;
+ char *version = (char *) xml_find_attribute (attributes, "version")->value;
if (strcmp (version, "1.0") != 0)
gdb_xml_error (parser,
@@ -165,8 +165,8 @@ tdesc_start_feature (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
- char *name = xml_find_attribute (attributes, "name")->value;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+ char *name = (char *) xml_find_attribute (attributes, "name")->value;
data->current_feature = tdesc_create_feature (data->tdesc, name);
}
@@ -179,7 +179,7 @@ tdesc_start_reg (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
struct gdb_xml_value *attrs = VEC_address (gdb_xml_value_s, attributes);
int ix = 0, length;
char *name, *group, *type;
@@ -187,7 +187,7 @@ tdesc_start_reg (struct gdb_xml_parser *parser,
length = VEC_length (gdb_xml_value_s, attributes);
- name = attrs[ix++].value;
+ name = (char *) attrs[ix++].value;
bitsize = * (ULONGEST *) attrs[ix++].value;
if (ix < length && strcmp (attrs[ix].name, "regnum") == 0)
@@ -196,12 +196,12 @@ tdesc_start_reg (struct gdb_xml_parser *parser,
regnum = data->next_regnum;
if (ix < length && strcmp (attrs[ix].name, "type") == 0)
- type = attrs[ix++].value;
+ type = (char *) attrs[ix++].value;
else
type = "int";
if (ix < length && strcmp (attrs[ix].name, "group") == 0)
- group = attrs[ix++].value;
+ group = (char *) attrs[ix++].value;
else
group = NULL;
@@ -230,8 +230,8 @@ tdesc_start_union (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
- char *id = xml_find_attribute (attributes, "id")->value;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+ char *id = (char *) xml_find_attribute (attributes, "id")->value;
data->current_type = tdesc_create_union (data->current_feature, id);
data->current_type_size = 0;
@@ -246,8 +246,8 @@ tdesc_start_struct (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
- char *id = xml_find_attribute (attributes, "id")->value;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+ char *id = (char *) xml_find_attribute (attributes, "id")->value;
struct tdesc_type *type;
struct gdb_xml_value *attr;
@@ -271,8 +271,8 @@ tdesc_start_flags (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
- char *id = xml_find_attribute (attributes, "id")->value;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+ char *id = (char *) xml_find_attribute (attributes, "id")->value;
int length = (int) * (ULONGEST *)
xml_find_attribute (attributes, "size")->value;
struct tdesc_type *type;
@@ -292,17 +292,17 @@ tdesc_start_field (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
struct gdb_xml_value *attr;
struct tdesc_type *field_type;
char *field_name, *field_type_id;
int start, end;
- field_name = xml_find_attribute (attributes, "name")->value;
+ field_name = (char *) xml_find_attribute (attributes, "name")->value;
attr = xml_find_attribute (attributes, "type");
if (attr != NULL)
- field_type_id = attr->value;
+ field_type_id = (char *) attr->value;
else
field_type_id = NULL;
@@ -385,14 +385,14 @@ tdesc_start_vector (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
struct gdb_xml_value *attrs = VEC_address (gdb_xml_value_s, attributes);
struct tdesc_type *field_type;
char *id, *field_type_id;
int count;
- id = attrs[0].value;
- field_type_id = attrs[1].value;
+ id = (char *) attrs[0].value;
+ field_type_id = (char *) attrs[1].value;
count = * (ULONGEST *) attrs[2].value;
field_type = tdesc_named_type (data->current_feature, field_type_id);
@@ -598,7 +598,7 @@ file_read_description_xml (const char *filename)
static char *
fetch_available_features_from_target (const char *name, void *baton_)
{
- struct target_ops *ops = baton_;
+ struct target_ops *ops = (struct target_ops *) baton_;
/* Read this object as a string. This ensures that a NUL
terminator is added. */
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 92e3b37..ee28e42 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -678,7 +678,7 @@ xstormy16_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct xstormy16_frame_cache *) *this_cache;
cache = xstormy16_alloc_frame_cache ();
*this_cache = cache;
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index c3b22e0..a24fb25 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -851,7 +851,7 @@ xtensa_supply_gregset (const struct regset *regset,
const void *gregs,
size_t len)
{
- const xtensa_elf_gregset_t *regs = gregs;
+ const xtensa_elf_gregset_t *regs = (const xtensa_elf_gregset_t *) gregs;
struct gdbarch *gdbarch = get_regcache_arch (rc);
int i;
@@ -1272,7 +1272,7 @@ xtensa_frame_cache (struct frame_info *this_frame, void **this_cache)
int windowed, ps_regnum;
if (*this_cache)
- return *this_cache;
+ return (struct xtensa_frame_cache *) *this_cache;
pc = get_frame_register_unsigned (this_frame, gdbarch_pc_regnum (gdbarch));
ps_regnum = gdbarch_ps_regnum (gdbarch);
@@ -1452,7 +1452,7 @@ xtensa_frame_prev_register (struct frame_info *this_frame,
if (*this_cache == NULL)
*this_cache = xtensa_frame_cache (this_frame, this_cache);
- cache = *this_cache;
+ cache = (struct xtensa_frame_cache *) *this_cache;
if (regnum ==gdbarch_pc_regnum (gdbarch))
saved_reg = cache->ra;
@@ -1566,7 +1566,7 @@ xtensa_extract_return_value (struct type *type,
void *dst)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- bfd_byte *valbuf = dst;
+ bfd_byte *valbuf = (bfd_byte *) dst;
int len = TYPE_LENGTH (type);
ULONGEST pc, wb;
int callsize, areg;
@@ -1622,7 +1622,7 @@ xtensa_store_return_value (struct type *type,
const void *dst)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- const bfd_byte *valbuf = dst;
+ const bfd_byte *valbuf = (const bfd_byte *) dst;
unsigned int areg;
ULONGEST pc, wb;
int callsize;
--
2.5.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] Add some more casts (1/2)
2015-09-23 19:31 [PATCH 2/2] Add some more casts (1/2) Simon Marchi
2015-09-23 19:31 ` [PATCH 3/2] Add some more casts (2/2) Simon Marchi
@ 2015-09-25 13:17 ` Yao Qi
2015-09-25 13:29 ` Simon Marchi
2015-09-25 18:18 ` Simon Marchi
1 sibling, 2 replies; 12+ messages in thread
From: Yao Qi @ 2015-09-25 13:17 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb-patches
Simon Marchi <simon.marchi@ericsson.com> writes:
> - const struct signal_catchpoint *c = (void *) bl->owner;
> + const struct signal_catchpoint *c =
> + (const struct signal_catchpoint *) bl->owner;
Nit here: "=" should be put the beginning of next line, like
const struct signal_catchpoint *c
= (const struct signal_catchpoint *) bl->owner;
GNU Coding Standards says "When you split an expression into multiple
lines, split it before an operator, not after one." There are multiple
instances of this problem.
OK with them fixed.
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/2] Add some more casts (2/2)
2015-09-23 19:31 ` [PATCH 3/2] Add some more casts (2/2) Simon Marchi
@ 2015-09-25 13:20 ` Yao Qi
2015-09-25 18:19 ` Simon Marchi
0 siblings, 1 reply; 12+ messages in thread
From: Yao Qi @ 2015-09-25 13:20 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb-patches
Simon Marchi <simon.marchi@ericsson.com> writes:
> - const struct ppc_reg_offsets *offsets = regset->regmap;
> + const struct ppc_reg_offsets *offsets =
> + (const struct ppc_reg_offsets *) regset->regmap;
The same nit I pointed out in patch 2/2, here and elsewhere.
Patch is OK otherwise.
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] Add some more casts (1/2)
2015-09-25 13:17 ` [PATCH 2/2] Add some more casts (1/2) Yao Qi
@ 2015-09-25 13:29 ` Simon Marchi
2015-09-25 18:18 ` Simon Marchi
1 sibling, 0 replies; 12+ messages in thread
From: Simon Marchi @ 2015-09-25 13:29 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
On 15-09-25 09:17 AM, Yao Qi wrote:
> Simon Marchi <simon.marchi@ericsson.com> writes:
>
>> - const struct signal_catchpoint *c = (void *) bl->owner;
>> + const struct signal_catchpoint *c =
>> + (const struct signal_catchpoint *) bl->owner;
>
> Nit here: "=" should be put the beginning of next line, like
>
> const struct signal_catchpoint *c
> = (const struct signal_catchpoint *) bl->owner;
>
> GNU Coding Standards says "When you split an expression into multiple
> lines, split it before an operator, not after one." There are multiple
> instances of this problem.
>
> OK with them fixed.
I saw that, but didn't know that it applied to the assignment operator
as well. IMO, moving the = to the second line does not improve readability
and potentially causes even more line wrapping. Anyhow, I'll fix those to
conform to GNU Coding Standards.
Thanks!
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] Add some more casts (1/2)
2015-09-25 13:17 ` [PATCH 2/2] Add some more casts (1/2) Yao Qi
2015-09-25 13:29 ` Simon Marchi
@ 2015-09-25 18:18 ` Simon Marchi
1 sibling, 0 replies; 12+ messages in thread
From: Simon Marchi @ 2015-09-25 18:18 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
On 15-09-25 09:17 AM, Yao Qi wrote:
> Simon Marchi <simon.marchi@ericsson.com> writes:
>
>> - const struct signal_catchpoint *c = (void *) bl->owner;
>> + const struct signal_catchpoint *c =
>> + (const struct signal_catchpoint *) bl->owner;
>
> Nit here: "=" should be put the beginning of next line, like
>
> const struct signal_catchpoint *c
> = (const struct signal_catchpoint *) bl->owner;
>
> GNU Coding Standards says "When you split an expression into multiple
> lines, split it before an operator, not after one." There are multiple
> instances of this problem.
>
> OK with them fixed.
Pushed with formatting fixed, thanks.
From 9a3c826307ae6ad4dd6fbd72431e7d9d4947f1dd Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@ericsson.com>
Date: Fri, 25 Sep 2015 14:08:07 -0400
Subject: [PATCH 2/2] Add some more casts (1/2)
Note: I needed to split this patch in two, otherwise it's too big for
the mailing list.
This patch adds explicit casts to situations where a void pointer is
assigned to a pointer to the "real" type. Building in C++ mode requires
those assignments to use an explicit cast. This includes, for example:
- callback arguments (cleanups, comparison functions, ...)
- data attached to some object (objfile, program space, etc) in the form
of a void pointer
- "user data" passed to some function
This patch comes from the commit "(mostly) auto-generated patch to insert
casts needed for C++", taken from Pedro's C++ branch.
Only files built on x86 with --enable-targets=all are modified, so the
native files for other arches will need to be dealt with separately.
I built-tested this with --enable-targets=all and reg-tested. To my
surprise, a test case (selftest.exp) had to be adjusted.
Here's the ChangeLog entry. Again, this was relatively quick to make
despite the length, thanks to David Malcom's script, although I don't
believe it's very useful information in that particular case...
gdb/ChangeLog:
* aarch64-tdep.c (aarch64_make_prologue_cache): Add cast(s).
(aarch64_make_stub_cache): Likewise.
(value_of_aarch64_user_reg): Likewise.
* ada-lang.c (ada_inferior_data_cleanup): Likewise.
(get_ada_inferior_data): Likewise.
(get_ada_pspace_data): Likewise.
(ada_pspace_data_cleanup): Likewise.
(ada_complete_symbol_matcher): Likewise.
(ada_exc_search_name_matches): Likewise.
* ada-tasks.c (get_ada_tasks_pspace_data): Likewise.
(get_ada_tasks_inferior_data): Likewise.
* addrmap.c (addrmap_mutable_foreach_worker): Likewise.
(splay_obstack_alloc): Likewise.
(splay_obstack_free): Likewise.
* alpha-linux-tdep.c (alpha_linux_supply_gregset): Likewise.
(alpha_linux_collect_gregset): Likewise.
(alpha_linux_supply_fpregset): Likewise.
(alpha_linux_collect_fpregset): Likewise.
* alpha-mdebug-tdep.c (alpha_mdebug_frame_unwind_cache): Likewise.
* alpha-tdep.c (alpha_lds): Likewise.
(alpha_sts): Likewise.
(alpha_sigtramp_frame_unwind_cache): Likewise.
(alpha_heuristic_frame_unwind_cache): Likewise.
(alpha_supply_int_regs): Likewise.
(alpha_fill_int_regs): Likewise.
(alpha_supply_fp_regs): Likewise.
(alpha_fill_fp_regs): Likewise.
* alphanbsd-tdep.c (alphanbsd_supply_fpregset): Likewise.
(alphanbsd_aout_supply_gregset): Likewise.
(alphanbsd_supply_gregset): Likewise.
* amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
(amd64_x32_linux_init_abi): Likewise.
* amd64-nat.c (amd64_supply_native_gregset): Likewise.
(amd64_collect_native_gregset): Likewise.
* amd64-tdep.c (amd64_frame_cache): Likewise.
(amd64_sigtramp_frame_cache): Likewise.
(amd64_epilogue_frame_cache): Likewise.
(amd64_supply_fxsave): Likewise.
(amd64_supply_xsave): Likewise.
(amd64_collect_fxsave): Likewise.
(amd64_collect_xsave): Likewise.
* amd64-windows-tdep.c (amd64_windows_frame_cache): Likewise.
* amd64obsd-tdep.c (amd64obsd_trapframe_cache): Likewise.
* arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
(arm_linux_collect_gregset): Likewise.
(arm_linux_supply_nwfpe): Likewise.
(arm_linux_collect_nwfpe): Likewise.
(arm_linux_supply_vfp): Likewise.
(arm_linux_collect_vfp): Likewise.
* arm-tdep.c (arm_find_mapping_symbol): Likewise.
(arm_prologue_unwind_stop_reason): Likewise.
(arm_prologue_this_id): Likewise.
(arm_prologue_prev_register): Likewise.
(arm_exidx_data_free): Likewise.
(arm_find_exidx_entry): Likewise.
(arm_stub_this_id): Likewise.
(arm_m_exception_this_id): Likewise.
(arm_m_exception_prev_register): Likewise.
(arm_normal_frame_base): Likewise.
(gdb_print_insn_arm): Likewise.
(arm_objfile_data_free): Likewise.
(arm_record_special_symbol): Likewise.
(value_of_arm_user_reg): Likewise.
* armbsd-tdep.c (armbsd_supply_fpregset): Likewise.
(armbsd_supply_gregset): Likewise.
* auto-load.c (auto_load_pspace_data_cleanup): Likewise.
(get_auto_load_pspace_data): Likewise.
(hash_loaded_script_entry): Likewise.
(eq_loaded_script_entry): Likewise.
(clear_section_scripts): Likewise.
(collect_matching_scripts): Likewise.
* auxv.c (auxv_inferior_data_cleanup): Likewise.
(get_auxv_inferior_data): Likewise.
* avr-tdep.c (avr_frame_unwind_cache): Likewise.
* ax-general.c (do_free_agent_expr_cleanup): Likewise.
* bfd-target.c (target_bfd_xfer_partial): Likewise.
(target_bfd_xclose): Likewise.
(target_bfd_get_section_table): Likewise.
* bfin-tdep.c (bfin_frame_cache): Likewise.
* block.c (find_block_in_blockvector): Likewise.
(call_site_for_pc): Likewise.
(block_find_non_opaque_type_preferred): Likewise.
* break-catch-sig.c (signal_catchpoint_insert_location): Likewise.
(signal_catchpoint_remove_location): Likewise.
(signal_catchpoint_breakpoint_hit): Likewise.
(signal_catchpoint_print_one): Likewise.
(signal_catchpoint_print_mention): Likewise.
(signal_catchpoint_print_recreate): Likewise.
* break-catch-syscall.c (get_catch_syscall_inferior_data): Likewise.
* breakpoint.c (do_cleanup_counted_command_line): Likewise.
(bp_location_compare_addrs): Likewise.
(get_first_locp_gte_addr): Likewise.
(check_tracepoint_command): Likewise.
(do_map_commands_command): Likewise.
(get_breakpoint_objfile_data): Likewise.
(free_breakpoint_probes): Likewise.
(do_captured_breakpoint_query): Likewise.
(compare_breakpoints): Likewise.
(bp_location_compare): Likewise.
(bpstat_remove_breakpoint_callback): Likewise.
(do_delete_breakpoint_cleanup): Likewise.
* bsd-uthread.c (bsd_uthread_set_supply_uthread): Likewise.
(bsd_uthread_set_collect_uthread): Likewise.
(bsd_uthread_activate): Likewise.
(bsd_uthread_fetch_registers): Likewise.
(bsd_uthread_store_registers): Likewise.
* btrace.c (check_xml_btrace_version): Likewise.
(parse_xml_btrace_block): Likewise.
(parse_xml_btrace_pt_config_cpu): Likewise.
(parse_xml_btrace_pt_raw): Likewise.
(parse_xml_btrace_pt): Likewise.
(parse_xml_btrace_conf_bts): Likewise.
(parse_xml_btrace_conf_pt): Likewise.
(do_btrace_data_cleanup): Likewise.
* c-typeprint.c (find_typedef_for_canonicalize): Likewise.
* charset.c (cleanup_iconv): Likewise.
(do_cleanup_iterator): Likewise.
* cli-out.c (cli_uiout_dtor): Likewise.
(cli_table_begin): Likewise.
(cli_table_body): Likewise.
(cli_table_end): Likewise.
(cli_table_header): Likewise.
(cli_begin): Likewise.
(cli_end): Likewise.
(cli_field_int): Likewise.
(cli_field_skip): Likewise.
(cli_field_string): Likewise.
(cli_field_fmt): Likewise.
(cli_spaces): Likewise.
(cli_text): Likewise.
(cli_message): Likewise.
(cli_wrap_hint): Likewise.
(cli_flush): Likewise.
(cli_redirect): Likewise.
(out_field_fmt): Likewise.
(field_separator): Likewise.
(cli_out_set_stream): Likewise.
* cli/cli-cmds.c (compare_symtabs): Likewise.
* cli/cli-dump.c (call_dump_func): Likewise.
(restore_section_callback): Likewise.
* cli/cli-script.c (clear_hook_in_cleanup): Likewise.
(do_restore_user_call_depth): Likewise.
(do_free_command_lines_cleanup): Likewise.
* coff-pe-read.c (get_section_vmas): Likewise.
(pe_as16): Likewise.
(pe_as32): Likewise.
* coffread.c (coff_symfile_read): Likewise.
* common/agent.c (agent_look_up_symbols): Likewise.
* common/filestuff.c (do_close_cleanup): Likewise.
* common/format.c (free_format_pieces_cleanup): Likewise.
* common/vec.c (vec_o_reserve): Likewise.
* compile/compile-c-support.c (print_one_macro): Likewise.
* compile/compile-c-symbols.c (hash_symbol_error): Likewise.
(eq_symbol_error): Likewise.
(del_symbol_error): Likewise.
(error_symbol_once): Likewise.
(gcc_convert_symbol): Likewise.
(gcc_symbol_address): Likewise.
(hash_symname): Likewise.
(eq_symname): Likewise.
* compile/compile-c-types.c (hash_type_map_instance): Likewise.
(eq_type_map_instance): Likewise.
(insert_type): Likewise.
(convert_type): Likewise.
* compile/compile-object-load.c (munmap_listp_free_cleanup): Likewise.
(setup_sections): Likewise.
(link_hash_table_free): Likewise.
(copy_sections): Likewise.
* compile/compile-object-run.c (do_module_cleanup): Likewise.
* compile/compile.c (compile_print_value): Likewise.
(do_rmdir): Likewise.
(cleanup_compile_instance): Likewise.
(cleanup_unlink_file): Likewise.
* completer.c (free_completion_tracker): Likewise.
* corelow.c (add_to_spuid_list): Likewise.
* cp-namespace.c (reset_directive_searched): Likewise.
* cp-support.c (reset_directive_searched): Likewise.
* cris-tdep.c (cris_sigtramp_frame_unwind_cache): Likewise.
(cris_frame_unwind_cache): Likewise.
* d-lang.c (builtin_d_type): Likewise.
* d-namespace.c (reset_directive_searched): Likewise.
* dbxread.c (dbx_free_symfile_info): Likewise.
(do_free_bincl_list_cleanup): Likewise.
* disasm.c (hash_dis_line_entry): Likewise.
(eq_dis_line_entry): Likewise.
(dis_asm_print_address): Likewise.
(fprintf_disasm): Likewise.
(do_ui_file_delete): Likewise.
* doublest.c (convert_floatformat_to_doublest): Likewise.
* dummy-frame.c (pop_dummy_frame_bpt): Likewise.
(dummy_frame_prev_register): Likewise.
(dummy_frame_this_id): Likewise.
* dwarf2-frame-tailcall.c (cache_hash): Likewise.
(cache_eq): Likewise.
(cache_find): Likewise.
(tailcall_frame_this_id): Likewise.
(dwarf2_tailcall_prev_register_first): Likewise.
(tailcall_frame_prev_register): Likewise.
(tailcall_frame_dealloc_cache): Likewise.
(tailcall_frame_prev_arch): Likewise.
* dwarf2-frame.c (dwarf2_frame_state_free): Likewise.
(dwarf2_frame_set_init_reg): Likewise.
(dwarf2_frame_init_reg): Likewise.
(dwarf2_frame_set_signal_frame_p): Likewise.
(dwarf2_frame_signal_frame_p): Likewise.
(dwarf2_frame_set_adjust_regnum): Likewise.
(dwarf2_frame_adjust_regnum): Likewise.
(clear_pointer_cleanup): Likewise.
(dwarf2_frame_cache): Likewise.
(find_cie): Likewise.
(dwarf2_frame_find_fde): Likewise.
* dwarf2expr.c (dwarf_expr_address_type): Likewise.
(free_dwarf_expr_context_cleanup): Likewise.
* dwarf2loc.c (locexpr_find_frame_base_location): Likewise.
(locexpr_get_frame_base): Likewise.
(loclist_find_frame_base_location): Likewise.
(loclist_get_frame_base): Likewise.
(dwarf_expr_dwarf_call): Likewise.
(dwarf_expr_get_base_type): Likewise.
(dwarf_expr_push_dwarf_reg_entry_value): Likewise.
(dwarf_expr_get_obj_addr): Likewise.
(entry_data_value_coerce_ref): Likewise.
(entry_data_value_copy_closure): Likewise.
(entry_data_value_free_closure): Likewise.
(get_frame_address_in_block_wrapper): Likewise.
(dwarf2_evaluate_property): Likewise.
(dwarf2_compile_property_to_c): Likewise.
(needs_frame_read_addr_from_reg): Likewise.
(needs_frame_get_reg_value): Likewise.
(needs_frame_frame_base): Likewise.
(needs_frame_frame_cfa): Likewise.
(needs_frame_tls_address): Likewise.
(needs_frame_dwarf_call): Likewise.
(needs_dwarf_reg_entry_value): Likewise.
(get_ax_pc): Likewise.
(locexpr_read_variable): Likewise.
(locexpr_read_variable_at_entry): Likewise.
(locexpr_read_needs_frame): Likewise.
(locexpr_describe_location): Likewise.
(locexpr_tracepoint_var_ref): Likewise.
(locexpr_generate_c_location): Likewise.
(loclist_read_variable): Likewise.
(loclist_read_variable_at_entry): Likewise.
(loclist_describe_location): Likewise.
(loclist_tracepoint_var_ref): Likewise.
(loclist_generate_c_location): Likewise.
* dwarf2read.c (line_header_hash_voidp): Likewise.
(line_header_eq_voidp): Likewise.
(dwarf2_has_info): Likewise.
(dwarf2_get_section_info): Likewise.
(locate_dwz_sections): Likewise.
(hash_file_name_entry): Likewise.
(eq_file_name_entry): Likewise.
(delete_file_name_entry): Likewise.
(dw2_setup): Likewise.
(dw2_get_file_names_reader): Likewise.
(dw2_find_pc_sect_compunit_symtab): Likewise.
(hash_signatured_type): Likewise.
(eq_signatured_type): Likewise.
(add_signatured_type_cu_to_table): Likewise.
(create_debug_types_hash_table): Likewise.
(lookup_dwo_signatured_type): Likewise.
(lookup_dwp_signatured_type): Likewise.
(lookup_signatured_type): Likewise.
(hash_type_unit_group): Likewise.
(eq_type_unit_group): Likewise.
(get_type_unit_group): Likewise.
(process_psymtab_comp_unit_reader): Likewise.
(sort_tu_by_abbrev_offset): Likewise.
(process_skeletonless_type_unit): Likewise.
(psymtabs_addrmap_cleanup): Likewise.
(dwarf2_read_symtab): Likewise.
(psymtab_to_symtab_1): Likewise.
(die_hash): Likewise.
(die_eq): Likewise.
(load_full_comp_unit_reader): Likewise.
(reset_die_in_process): Likewise.
(free_cu_line_header): Likewise.
(handle_DW_AT_stmt_list): Likewise.
(hash_dwo_file): Likewise.
(eq_dwo_file): Likewise.
(hash_dwo_unit): Likewise.
(eq_dwo_unit): Likewise.
(create_dwo_cu_reader): Likewise.
(create_dwo_unit_in_dwp_v1): Likewise.
(create_dwo_unit_in_dwp_v2): Likewise.
(lookup_dwo_unit_in_dwp): Likewise.
(dwarf2_locate_dwo_sections): Likewise.
(dwarf2_locate_common_dwp_sections): Likewise.
(dwarf2_locate_v2_dwp_sections): Likewise.
(hash_dwp_loaded_cutus): Likewise.
(eq_dwp_loaded_cutus): Likewise.
(lookup_dwo_cutu): Likewise.
(abbrev_table_free_cleanup): Likewise.
(dwarf2_free_abbrev_table): Likewise.
(find_partial_die_in_comp_unit): Likewise.
(free_line_header_voidp): Likewise.
(follow_die_offset): Likewise.
(follow_die_sig_1): Likewise.
(free_heap_comp_unit): Likewise.
(free_stack_comp_unit): Likewise.
(dwarf2_free_objfile): Likewise.
(per_cu_offset_and_type_hash): Likewise.
(per_cu_offset_and_type_eq): Likewise.
(get_die_type_at_offset): Likewise.
(partial_die_hash): Likewise.
(partial_die_eq): Likewise.
(dwarf2_per_objfile_free): Likewise.
(hash_strtab_entry): Likewise.
(eq_strtab_entry): Likewise.
(add_string): Likewise.
(hash_symtab_entry): Likewise.
(eq_symtab_entry): Likewise.
(delete_symtab_entry): Likewise.
(cleanup_mapped_symtab): Likewise.
(add_indices_to_cpool): Likewise.
(hash_psymtab_cu_index): Likewise.
(eq_psymtab_cu_index): Likewise.
(add_address_entry_worker): Likewise.
(unlink_if_set): Likewise.
(write_one_signatured_type): Likewise.
(save_gdb_index_command): Likewise.
* elfread.c (elf_symtab_read): Likewise.
(elf_gnu_ifunc_cache_hash): Likewise.
(elf_gnu_ifunc_cache_eq): Likewise.
(elf_gnu_ifunc_record_cache): Likewise.
(elf_gnu_ifunc_resolve_by_cache): Likewise.
(elf_get_probes): Likewise.
(probe_key_free): Likewise.
* f-lang.c (builtin_f_type): Likewise.
* frame-base.c (frame_base_append_sniffer): Likewise.
(frame_base_set_default): Likewise.
(frame_base_find_by_frame): Likewise.
* frame-unwind.c (frame_unwind_prepend_unwinder): Likewise.
(frame_unwind_append_unwinder): Likewise.
(frame_unwind_find_by_frame): Likewise.
* frame.c (frame_addr_hash): Likewise.
(frame_addr_hash_eq): Likewise.
(frame_stash_find): Likewise.
(do_frame_register_read): Likewise.
(unwind_to_current_frame): Likewise.
(frame_cleanup_after_sniffer): Likewise.
* frv-linux-tdep.c (frv_linux_sigtramp_frame_cache): Likewise.
* frv-tdep.c (frv_frame_unwind_cache): Likewise.
* ft32-tdep.c (ft32_frame_cache): Likewise.
* gcore.c (do_bfd_delete_cleanup): Likewise.
(gcore_create_callback): Likewise.
* gdb_bfd.c (hash_bfd): Likewise.
(eq_bfd): Likewise.
(gdb_bfd_open): Likewise.
(free_one_bfd_section): Likewise.
(gdb_bfd_ref): Likewise.
(gdb_bfd_unref): Likewise.
(get_section_descriptor): Likewise.
(gdb_bfd_map_section): Likewise.
(gdb_bfd_crc): Likewise.
(gdb_bfd_mark_parent): Likewise.
(gdb_bfd_record_inclusion): Likewise.
(gdb_bfd_requires_relocations): Likewise.
(print_one_bfd): Likewise.
* gdbtypes.c (type_pair_hash): Likewise.
(type_pair_eq): Likewise.
(builtin_type): Likewise.
(objfile_type): Likewise.
* gnu-v3-abi.c (vtable_ptrdiff_type): Likewise.
(vtable_address_point_offset): Likewise.
(gnuv3_get_vtable): Likewise.
(hash_value_and_voffset): Likewise.
(eq_value_and_voffset): Likewise.
(compare_value_and_voffset): Likewise.
(compute_vtable_size): Likewise.
(gnuv3_get_typeid_type): Likewise.
* go-lang.c (builtin_go_type): Likewise.
* guile/scm-block.c (bkscm_hash_block_smob): Likewise.
(bkscm_eq_block_smob): Likewise.
(bkscm_objfile_block_map): Likewise.
(bkscm_del_objfile_blocks): Likewise.
* guile/scm-breakpoint.c (bpscm_build_bp_list): Likewise.
* guile/scm-disasm.c (gdbscm_disasm_read_memory_worker): Likewise.
(gdbscm_disasm_print_address): Likewise.
* guile/scm-frame.c (frscm_hash_frame_smob): Likewise.
(frscm_eq_frame_smob): Likewise.
(frscm_inferior_frame_map): Likewise.
(frscm_del_inferior_frames): Likewise.
* guile/scm-gsmob.c (gdbscm_add_objfile_ref): Likewise.
* guile/scm-objfile.c (ofscm_handle_objfile_deleted): Likewise.
(ofscm_objfile_smob_from_objfile): Likewise.
* guile/scm-ports.c (ioscm_write): Likewise.
(ioscm_file_port_delete): Likewise.
(ioscm_file_port_rewind): Likewise.
(ioscm_file_port_put): Likewise.
(ioscm_file_port_write): Likewise.
* guile/scm-progspace.c (psscm_handle_pspace_deleted): Likewise.
(psscm_pspace_smob_from_pspace): Likewise.
* guile/scm-safe-call.c (scscm_recording_pre_unwind_handler): Likewise.
(scscm_recording_unwind_handler): Likewise.
(gdbscm_with_catch): Likewise.
(scscm_call_0_body): Likewise.
(scscm_call_1_body): Likewise.
(scscm_call_2_body): Likewise.
(scscm_call_3_body): Likewise.
(scscm_call_4_body): Likewise.
(scscm_apply_1_body): Likewise.
(scscm_eval_scheme_string): Likewise.
(gdbscm_safe_eval_string): Likewise.
(scscm_source_scheme_script): Likewise.
(gdbscm_safe_source_script): Likewise.
* guile/scm-string.c (gdbscm_call_scm_to_stringn): Likewise.
(gdbscm_call_scm_from_stringn): Likewise.
* guile/scm-symbol.c (syscm_hash_symbol_smob): Likewise.
(syscm_eq_symbol_smob): Likewise.
(syscm_get_symbol_map): Likewise.
(syscm_del_objfile_symbols): Likewise.
* guile/scm-symtab.c (stscm_hash_symtab_smob): Likewise.
(stscm_eq_symtab_smob): Likewise.
(stscm_objfile_symtab_map): Likewise.
(stscm_del_objfile_symtabs): Likewise.
* guile/scm-type.c (tyscm_hash_type_smob): Likewise.
(tyscm_eq_type_smob): Likewise.
(tyscm_type_map): Likewise.
(tyscm_copy_type_recursive): Likewise.
(save_objfile_types): Likewise.
* guile/scm-utils.c (extract_arg): Likewise.
* h8300-tdep.c (h8300_frame_cache): Likewise.
* hppa-linux-tdep.c (hppa_linux_sigtramp_frame_unwind_cache): Likewise.
* hppa-tdep.c (compare_unwind_entries): Likewise.
(find_unwind_entry): Likewise.
(hppa_frame_cache): Likewise.
(hppa_stub_frame_unwind_cache): Likewise.
* hppanbsd-tdep.c (hppanbsd_supply_gregset): Likewise.
* hppaobsd-tdep.c (hppaobsd_supply_gregset): Likewise.
(hppaobsd_supply_fpregset): Likewise.
* i386-cygwin-tdep.c (core_process_module_section): Likewise.
* i386-linux-tdep.c (i386_linux_init_abi): Likewise.
* i386-tdep.c (i386_frame_cache): Likewise.
(i386_epilogue_frame_cache): Likewise.
(i386_sigtramp_frame_cache): Likewise.
(i386_supply_gregset): Likewise.
(i386_collect_gregset): Likewise.
(i386_gdbarch_init): Likewise.
* i386obsd-tdep.c (i386obsd_aout_supply_regset): Likewise.
(i386obsd_trapframe_cache): Likewise.
* i387-tdep.c (i387_supply_fsave): Likewise.
(i387_collect_fsave): Likewise.
(i387_supply_fxsave): Likewise.
(i387_collect_fxsave): Likewise.
(i387_supply_xsave): Likewise.
(i387_collect_xsave): Likewise.
* ia64-tdep.c (ia64_frame_cache): Likewise.
(ia64_sigtramp_frame_cache): Likewise.
* infcmd.c (attach_command_continuation): Likewise.
(attach_command_continuation_free_args): Likewise.
* inferior.c (restore_inferior): Likewise.
(delete_thread_of_inferior): Likewise.
* inflow.c (inflow_inferior_data_cleanup): Likewise.
(get_inflow_inferior_data): Likewise.
(inflow_inferior_exit): Likewise.
* infrun.c (displaced_step_clear_cleanup): Likewise.
(restore_current_uiout_cleanup): Likewise.
(release_stop_context_cleanup): Likewise.
(do_restore_infcall_suspend_state_cleanup): Likewise.
(do_restore_infcall_control_state_cleanup): Likewise.
(restore_inferior_ptid): Likewise.
* inline-frame.c (block_starting_point_at): Likewise.
* iq2000-tdep.c (iq2000_frame_cache): Likewise.
* jit.c (get_jit_objfile_data): Likewise.
(get_jit_program_space_data): Likewise.
(jit_object_close_impl): Likewise.
(jit_find_objf_with_entry_addr): Likewise.
(jit_breakpoint_deleted): Likewise.
(jit_unwind_reg_set_impl): Likewise.
(jit_unwind_reg_get_impl): Likewise.
(jit_dealloc_cache): Likewise.
(jit_frame_sniffer): Likewise.
(jit_frame_prev_register): Likewise.
(jit_prepend_unwinder): Likewise.
(jit_inferior_exit_hook): Likewise.
(free_objfile_data): Likewise.
* jv-lang.c (jv_per_objfile_free): Likewise.
(get_dynamics_objfile): Likewise.
(get_java_class_symtab): Likewise.
(builtin_java_type): Likewise.
* language.c (language_string_char_type): Likewise.
(language_bool_type): Likewise.
(language_lookup_primitive_type): Likewise.
(language_lookup_primitive_type_as_symbol): Likewise.
* linespec.c (hash_address_entry): Likewise.
(eq_address_entry): Likewise.
(iterate_inline_only): Likewise.
(iterate_name_matcher): Likewise.
(decode_line_2_compare_items): Likewise.
(collect_one_symbol): Likewise.
(compare_symbols): Likewise.
(compare_msymbols): Likewise.
(add_symtabs_to_list): Likewise.
(collect_symbols): Likewise.
(compare_msyms): Likewise.
(add_minsym): Likewise.
(cleanup_linespec_result): Likewise.
* linux-fork.c (inferior_call_waitpid_cleanup): Likewise.
* linux-nat.c (delete_lwp_cleanup): Likewise.
(count_events_callback): Likewise.
(select_event_lwp_callback): Likewise.
(resume_stopped_resumed_lwps): Likewise.
* linux-tdep.c (get_linux_gdbarch_data): Likewise.
(invalidate_linux_cache_inf): Likewise.
(get_linux_inferior_data): Likewise.
(linux_find_memory_regions_thunk): Likewise.
(linux_make_mappings_callback): Likewise.
(linux_corefile_thread_callback): Likewise.
(find_mapping_size): Likewise.
* linux-thread-db.c (find_new_threads_callback): Likewise.
* lm32-tdep.c (lm32_frame_cache): Likewise.
* m2-lang.c (builtin_m2_type): Likewise.
* m32c-tdep.c (m32c_analyze_frame_prologue): Likewise.
* m32r-linux-tdep.c (m32r_linux_sigtramp_frame_cache): Likewise.
(m32r_linux_supply_gregset): Likewise.
(m32r_linux_collect_gregset): Likewise.
* m32r-tdep.c (m32r_frame_unwind_cache): Likewise.
* m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
* m68k-tdep.c (m68k_frame_cache): Likewise.
* m68kbsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
(m68kbsd_supply_gregset): Likewise.
* m68klinux-tdep.c (m68k_linux_sigtramp_frame_cache): Likewise.
* m88k-tdep.c (m88k_frame_cache): Likewise.
(m88k_supply_gregset): Likewise.
gdb/gdbserver/ChangeLog:
* dll.c (match_dll): Add cast(s).
(unloaded_dll): Likewise.
* linux-low.c (second_thread_of_pid_p): Likewise.
(delete_lwp_callback): Likewise.
(count_events_callback): Likewise.
(select_event_lwp_callback): Likewise.
(linux_set_resume_request): Likewise.
* server.c (accumulate_file_name_length): Likewise.
(emit_dll_description): Likewise.
(handle_qxfer_threads_worker): Likewise.
(visit_actioned_threads): Likewise.
* thread-db.c (any_thread_of): Likewise.
* tracepoint.c (same_process_p): Likewise.
(match_blocktype): Likewise.
(build_traceframe_info_xml): Likewise.
gdb/testsuite/ChangeLog:
* gdb.gdb/selftest.exp (do_steps_and_nexts): Adjust expected
source line.
---
gdb/ChangeLog | 529 +++++++++++++++++++++++++++++++++++++
gdb/aarch64-tdep.c | 6 +-
gdb/ada-lang.c | 13 +-
gdb/ada-tasks.c | 6 +-
gdb/addrmap.c | 9 +-
gdb/alpha-linux-tdep.c | 8 +-
gdb/alpha-mdebug-tdep.c | 2 +-
gdb/alpha-tdep.c | 21 +-
gdb/alphanbsd-tdep.c | 6 +-
gdb/amd64-linux-tdep.c | 8 +-
gdb/amd64-nat.c | 4 +-
gdb/amd64-tdep.c | 14 +-
gdb/amd64-windows-tdep.c | 2 +-
gdb/amd64obsd-tdep.c | 2 +-
gdb/arm-linux-tdep.c | 12 +-
gdb/arm-tdep.c | 31 ++-
gdb/armbsd-tdep.c | 4 +-
gdb/auto-load.c | 19 +-
gdb/auxv.c | 4 +-
gdb/avr-tdep.c | 2 +-
gdb/ax-general.c | 2 +-
gdb/bfd-target.c | 6 +-
gdb/bfin-tdep.c | 2 +-
gdb/block.c | 6 +-
gdb/break-catch-sig.c | 13 +-
gdb/break-catch-syscall.c | 3 +-
gdb/breakpoint.c | 38 +--
gdb/bsd-uthread.c | 17 +-
gdb/btrace.c | 29 +-
gdb/c-typeprint.c | 2 +-
gdb/charset.c | 4 +-
gdb/cli-out.c | 40 +--
gdb/cli/cli-cmds.c | 4 +-
gdb/cli/cli-dump.c | 4 +-
gdb/cli/cli-script.c | 6 +-
gdb/coff-pe-read.c | 6 +-
gdb/coffread.c | 3 +-
gdb/common/agent.c | 3 +-
gdb/common/filestuff.c | 2 +-
gdb/common/format.c | 2 +-
gdb/common/vec.c | 2 +-
gdb/compile/compile-c-support.c | 2 +-
gdb/compile/compile-c-symbols.c | 20 +-
gdb/compile/compile-c-types.c | 10 +-
gdb/compile/compile-object-load.c | 9 +-
gdb/compile/compile-object-run.c | 2 +-
gdb/compile/compile.c | 8 +-
gdb/completer.c | 2 +-
gdb/corelow.c | 2 +-
gdb/cp-namespace.c | 2 +-
gdb/cp-support.c | 2 +-
gdb/cris-tdep.c | 4 +-
gdb/d-lang.c | 2 +-
gdb/d-namespace.c | 2 +-
gdb/dbxread.c | 4 +-
gdb/disasm.c | 14 +-
gdb/doublest.c | 2 +-
gdb/dummy-frame.c | 8 +-
gdb/dwarf2-frame-tailcall.c | 18 +-
gdb/dwarf2-frame.c | 40 +--
gdb/dwarf2expr.c | 7 +-
gdb/dwarf2loc.c | 87 +++---
gdb/dwarf2read.c | 239 ++++++++++-------
gdb/elfread.c | 27 +-
gdb/f-lang.c | 2 +-
gdb/frame-base.c | 9 +-
gdb/frame-unwind.c | 9 +-
gdb/frame.c | 14 +-
gdb/frv-linux-tdep.c | 2 +-
gdb/frv-tdep.c | 2 +-
gdb/ft32-tdep.c | 2 +-
gdb/gcore.c | 6 +-
gdb/gdb_bfd.c | 37 +--
gdb/gdbserver/ChangeLog | 18 ++
gdb/gdbserver/dll.c | 6 +-
gdb/gdbserver/linux-low.c | 10 +-
gdb/gdbserver/server.c | 9 +-
gdb/gdbserver/thread-db.c | 2 +-
gdb/gdbserver/tracepoint.c | 6 +-
gdb/gdbtypes.c | 9 +-
gdb/gnu-v3-abi.c | 27 +-
gdb/go-lang.c | 2 +-
gdb/guile/scm-block.c | 10 +-
gdb/guile/scm-breakpoint.c | 2 +-
gdb/guile/scm-disasm.c | 11 +-
gdb/guile/scm-frame.c | 10 +-
gdb/guile/scm-gsmob.c | 2 +-
gdb/guile/scm-objfile.c | 4 +-
gdb/guile/scm-ports.c | 12 +-
gdb/guile/scm-progspace.c | 4 +-
gdb/guile/scm-safe-call.c | 27 +-
gdb/guile/scm-string.c | 4 +-
gdb/guile/scm-symbol.c | 13 +-
gdb/guile/scm-symtab.c | 10 +-
gdb/guile/scm-type.c | 12 +-
gdb/guile/scm-utils.c | 18 +-
gdb/h8300-tdep.c | 2 +-
gdb/hppa-linux-tdep.c | 2 +-
gdb/hppa-tdep.c | 20 +-
gdb/hppanbsd-tdep.c | 2 +-
gdb/hppaobsd-tdep.c | 4 +-
gdb/i386-cygwin-tdep.c | 2 +-
gdb/i386-linux-tdep.c | 3 +-
gdb/i386-tdep.c | 12 +-
gdb/i386obsd-tdep.c | 4 +-
gdb/i387-tdep.c | 12 +-
gdb/ia64-tdep.c | 4 +-
gdb/infcmd.c | 6 +-
gdb/inferior.c | 5 +-
gdb/inflow.c | 6 +-
gdb/infrun.c | 13 +-
gdb/inline-frame.c | 2 +-
gdb/iq2000-tdep.c | 2 +-
gdb/jit.c | 37 +--
gdb/jv-lang.c | 18 +-
gdb/language.c | 16 +-
gdb/linespec.c | 41 +--
gdb/linux-fork.c | 2 +-
gdb/linux-nat.c | 8 +-
gdb/linux-tdep.c | 18 +-
gdb/linux-thread-db.c | 2 +-
gdb/lm32-tdep.c | 2 +-
gdb/m2-lang.c | 2 +-
gdb/m32c-tdep.c | 5 +-
gdb/m32r-linux-tdep.c | 6 +-
gdb/m32r-tdep.c | 2 +-
gdb/m68hc11-tdep.c | 2 +-
gdb/m68k-tdep.c | 2 +-
gdb/m68kbsd-tdep.c | 4 +-
gdb/m68klinux-tdep.c | 2 +-
gdb/m88k-tdep.c | 4 +-
gdb/testsuite/ChangeLog | 5 +
gdb/testsuite/gdb.gdb/selftest.exp | 2 +-
133 files changed, 1352 insertions(+), 649 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fb66ae8..1baed6a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,534 @@
2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
+ * aarch64-tdep.c (aarch64_make_prologue_cache): Add cast(s).
+ (aarch64_make_stub_cache): Likewise.
+ (value_of_aarch64_user_reg): Likewise.
+ * ada-lang.c (ada_inferior_data_cleanup): Likewise.
+ (get_ada_inferior_data): Likewise.
+ (get_ada_pspace_data): Likewise.
+ (ada_pspace_data_cleanup): Likewise.
+ (ada_complete_symbol_matcher): Likewise.
+ (ada_exc_search_name_matches): Likewise.
+ * ada-tasks.c (get_ada_tasks_pspace_data): Likewise.
+ (get_ada_tasks_inferior_data): Likewise.
+ * addrmap.c (addrmap_mutable_foreach_worker): Likewise.
+ (splay_obstack_alloc): Likewise.
+ (splay_obstack_free): Likewise.
+ * alpha-linux-tdep.c (alpha_linux_supply_gregset): Likewise.
+ (alpha_linux_collect_gregset): Likewise.
+ (alpha_linux_supply_fpregset): Likewise.
+ (alpha_linux_collect_fpregset): Likewise.
+ * alpha-mdebug-tdep.c (alpha_mdebug_frame_unwind_cache): Likewise.
+ * alpha-tdep.c (alpha_lds): Likewise.
+ (alpha_sts): Likewise.
+ (alpha_sigtramp_frame_unwind_cache): Likewise.
+ (alpha_heuristic_frame_unwind_cache): Likewise.
+ (alpha_supply_int_regs): Likewise.
+ (alpha_fill_int_regs): Likewise.
+ (alpha_supply_fp_regs): Likewise.
+ (alpha_fill_fp_regs): Likewise.
+ * alphanbsd-tdep.c (alphanbsd_supply_fpregset): Likewise.
+ (alphanbsd_aout_supply_gregset): Likewise.
+ (alphanbsd_supply_gregset): Likewise.
+ * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
+ (amd64_x32_linux_init_abi): Likewise.
+ * amd64-nat.c (amd64_supply_native_gregset): Likewise.
+ (amd64_collect_native_gregset): Likewise.
+ * amd64-tdep.c (amd64_frame_cache): Likewise.
+ (amd64_sigtramp_frame_cache): Likewise.
+ (amd64_epilogue_frame_cache): Likewise.
+ (amd64_supply_fxsave): Likewise.
+ (amd64_supply_xsave): Likewise.
+ (amd64_collect_fxsave): Likewise.
+ (amd64_collect_xsave): Likewise.
+ * amd64-windows-tdep.c (amd64_windows_frame_cache): Likewise.
+ * amd64obsd-tdep.c (amd64obsd_trapframe_cache): Likewise.
+ * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
+ (arm_linux_collect_gregset): Likewise.
+ (arm_linux_supply_nwfpe): Likewise.
+ (arm_linux_collect_nwfpe): Likewise.
+ (arm_linux_supply_vfp): Likewise.
+ (arm_linux_collect_vfp): Likewise.
+ * arm-tdep.c (arm_find_mapping_symbol): Likewise.
+ (arm_prologue_unwind_stop_reason): Likewise.
+ (arm_prologue_this_id): Likewise.
+ (arm_prologue_prev_register): Likewise.
+ (arm_exidx_data_free): Likewise.
+ (arm_find_exidx_entry): Likewise.
+ (arm_stub_this_id): Likewise.
+ (arm_m_exception_this_id): Likewise.
+ (arm_m_exception_prev_register): Likewise.
+ (arm_normal_frame_base): Likewise.
+ (gdb_print_insn_arm): Likewise.
+ (arm_objfile_data_free): Likewise.
+ (arm_record_special_symbol): Likewise.
+ (value_of_arm_user_reg): Likewise.
+ * armbsd-tdep.c (armbsd_supply_fpregset): Likewise.
+ (armbsd_supply_gregset): Likewise.
+ * auto-load.c (auto_load_pspace_data_cleanup): Likewise.
+ (get_auto_load_pspace_data): Likewise.
+ (hash_loaded_script_entry): Likewise.
+ (eq_loaded_script_entry): Likewise.
+ (clear_section_scripts): Likewise.
+ (collect_matching_scripts): Likewise.
+ * auxv.c (auxv_inferior_data_cleanup): Likewise.
+ (get_auxv_inferior_data): Likewise.
+ * avr-tdep.c (avr_frame_unwind_cache): Likewise.
+ * ax-general.c (do_free_agent_expr_cleanup): Likewise.
+ * bfd-target.c (target_bfd_xfer_partial): Likewise.
+ (target_bfd_xclose): Likewise.
+ (target_bfd_get_section_table): Likewise.
+ * bfin-tdep.c (bfin_frame_cache): Likewise.
+ * block.c (find_block_in_blockvector): Likewise.
+ (call_site_for_pc): Likewise.
+ (block_find_non_opaque_type_preferred): Likewise.
+ * break-catch-sig.c (signal_catchpoint_insert_location): Likewise.
+ (signal_catchpoint_remove_location): Likewise.
+ (signal_catchpoint_breakpoint_hit): Likewise.
+ (signal_catchpoint_print_one): Likewise.
+ (signal_catchpoint_print_mention): Likewise.
+ (signal_catchpoint_print_recreate): Likewise.
+ * break-catch-syscall.c (get_catch_syscall_inferior_data): Likewise.
+ * breakpoint.c (do_cleanup_counted_command_line): Likewise.
+ (bp_location_compare_addrs): Likewise.
+ (get_first_locp_gte_addr): Likewise.
+ (check_tracepoint_command): Likewise.
+ (do_map_commands_command): Likewise.
+ (get_breakpoint_objfile_data): Likewise.
+ (free_breakpoint_probes): Likewise.
+ (do_captured_breakpoint_query): Likewise.
+ (compare_breakpoints): Likewise.
+ (bp_location_compare): Likewise.
+ (bpstat_remove_breakpoint_callback): Likewise.
+ (do_delete_breakpoint_cleanup): Likewise.
+ * bsd-uthread.c (bsd_uthread_set_supply_uthread): Likewise.
+ (bsd_uthread_set_collect_uthread): Likewise.
+ (bsd_uthread_activate): Likewise.
+ (bsd_uthread_fetch_registers): Likewise.
+ (bsd_uthread_store_registers): Likewise.
+ * btrace.c (check_xml_btrace_version): Likewise.
+ (parse_xml_btrace_block): Likewise.
+ (parse_xml_btrace_pt_config_cpu): Likewise.
+ (parse_xml_btrace_pt_raw): Likewise.
+ (parse_xml_btrace_pt): Likewise.
+ (parse_xml_btrace_conf_bts): Likewise.
+ (parse_xml_btrace_conf_pt): Likewise.
+ (do_btrace_data_cleanup): Likewise.
+ * c-typeprint.c (find_typedef_for_canonicalize): Likewise.
+ * charset.c (cleanup_iconv): Likewise.
+ (do_cleanup_iterator): Likewise.
+ * cli-out.c (cli_uiout_dtor): Likewise.
+ (cli_table_begin): Likewise.
+ (cli_table_body): Likewise.
+ (cli_table_end): Likewise.
+ (cli_table_header): Likewise.
+ (cli_begin): Likewise.
+ (cli_end): Likewise.
+ (cli_field_int): Likewise.
+ (cli_field_skip): Likewise.
+ (cli_field_string): Likewise.
+ (cli_field_fmt): Likewise.
+ (cli_spaces): Likewise.
+ (cli_text): Likewise.
+ (cli_message): Likewise.
+ (cli_wrap_hint): Likewise.
+ (cli_flush): Likewise.
+ (cli_redirect): Likewise.
+ (out_field_fmt): Likewise.
+ (field_separator): Likewise.
+ (cli_out_set_stream): Likewise.
+ * cli/cli-cmds.c (compare_symtabs): Likewise.
+ * cli/cli-dump.c (call_dump_func): Likewise.
+ (restore_section_callback): Likewise.
+ * cli/cli-script.c (clear_hook_in_cleanup): Likewise.
+ (do_restore_user_call_depth): Likewise.
+ (do_free_command_lines_cleanup): Likewise.
+ * coff-pe-read.c (get_section_vmas): Likewise.
+ (pe_as16): Likewise.
+ (pe_as32): Likewise.
+ * coffread.c (coff_symfile_read): Likewise.
+ * common/agent.c (agent_look_up_symbols): Likewise.
+ * common/filestuff.c (do_close_cleanup): Likewise.
+ * common/format.c (free_format_pieces_cleanup): Likewise.
+ * common/vec.c (vec_o_reserve): Likewise.
+ * compile/compile-c-support.c (print_one_macro): Likewise.
+ * compile/compile-c-symbols.c (hash_symbol_error): Likewise.
+ (eq_symbol_error): Likewise.
+ (del_symbol_error): Likewise.
+ (error_symbol_once): Likewise.
+ (gcc_convert_symbol): Likewise.
+ (gcc_symbol_address): Likewise.
+ (hash_symname): Likewise.
+ (eq_symname): Likewise.
+ * compile/compile-c-types.c (hash_type_map_instance): Likewise.
+ (eq_type_map_instance): Likewise.
+ (insert_type): Likewise.
+ (convert_type): Likewise.
+ * compile/compile-object-load.c (munmap_listp_free_cleanup): Likewise.
+ (setup_sections): Likewise.
+ (link_hash_table_free): Likewise.
+ (copy_sections): Likewise.
+ * compile/compile-object-run.c (do_module_cleanup): Likewise.
+ * compile/compile.c (compile_print_value): Likewise.
+ (do_rmdir): Likewise.
+ (cleanup_compile_instance): Likewise.
+ (cleanup_unlink_file): Likewise.
+ * completer.c (free_completion_tracker): Likewise.
+ * corelow.c (add_to_spuid_list): Likewise.
+ * cp-namespace.c (reset_directive_searched): Likewise.
+ * cp-support.c (reset_directive_searched): Likewise.
+ * cris-tdep.c (cris_sigtramp_frame_unwind_cache): Likewise.
+ (cris_frame_unwind_cache): Likewise.
+ * d-lang.c (builtin_d_type): Likewise.
+ * d-namespace.c (reset_directive_searched): Likewise.
+ * dbxread.c (dbx_free_symfile_info): Likewise.
+ (do_free_bincl_list_cleanup): Likewise.
+ * disasm.c (hash_dis_line_entry): Likewise.
+ (eq_dis_line_entry): Likewise.
+ (dis_asm_print_address): Likewise.
+ (fprintf_disasm): Likewise.
+ (do_ui_file_delete): Likewise.
+ * doublest.c (convert_floatformat_to_doublest): Likewise.
+ * dummy-frame.c (pop_dummy_frame_bpt): Likewise.
+ (dummy_frame_prev_register): Likewise.
+ (dummy_frame_this_id): Likewise.
+ * dwarf2-frame-tailcall.c (cache_hash): Likewise.
+ (cache_eq): Likewise.
+ (cache_find): Likewise.
+ (tailcall_frame_this_id): Likewise.
+ (dwarf2_tailcall_prev_register_first): Likewise.
+ (tailcall_frame_prev_register): Likewise.
+ (tailcall_frame_dealloc_cache): Likewise.
+ (tailcall_frame_prev_arch): Likewise.
+ * dwarf2-frame.c (dwarf2_frame_state_free): Likewise.
+ (dwarf2_frame_set_init_reg): Likewise.
+ (dwarf2_frame_init_reg): Likewise.
+ (dwarf2_frame_set_signal_frame_p): Likewise.
+ (dwarf2_frame_signal_frame_p): Likewise.
+ (dwarf2_frame_set_adjust_regnum): Likewise.
+ (dwarf2_frame_adjust_regnum): Likewise.
+ (clear_pointer_cleanup): Likewise.
+ (dwarf2_frame_cache): Likewise.
+ (find_cie): Likewise.
+ (dwarf2_frame_find_fde): Likewise.
+ * dwarf2expr.c (dwarf_expr_address_type): Likewise.
+ (free_dwarf_expr_context_cleanup): Likewise.
+ * dwarf2loc.c (locexpr_find_frame_base_location): Likewise.
+ (locexpr_get_frame_base): Likewise.
+ (loclist_find_frame_base_location): Likewise.
+ (loclist_get_frame_base): Likewise.
+ (dwarf_expr_dwarf_call): Likewise.
+ (dwarf_expr_get_base_type): Likewise.
+ (dwarf_expr_push_dwarf_reg_entry_value): Likewise.
+ (dwarf_expr_get_obj_addr): Likewise.
+ (entry_data_value_coerce_ref): Likewise.
+ (entry_data_value_copy_closure): Likewise.
+ (entry_data_value_free_closure): Likewise.
+ (get_frame_address_in_block_wrapper): Likewise.
+ (dwarf2_evaluate_property): Likewise.
+ (dwarf2_compile_property_to_c): Likewise.
+ (needs_frame_read_addr_from_reg): Likewise.
+ (needs_frame_get_reg_value): Likewise.
+ (needs_frame_frame_base): Likewise.
+ (needs_frame_frame_cfa): Likewise.
+ (needs_frame_tls_address): Likewise.
+ (needs_frame_dwarf_call): Likewise.
+ (needs_dwarf_reg_entry_value): Likewise.
+ (get_ax_pc): Likewise.
+ (locexpr_read_variable): Likewise.
+ (locexpr_read_variable_at_entry): Likewise.
+ (locexpr_read_needs_frame): Likewise.
+ (locexpr_describe_location): Likewise.
+ (locexpr_tracepoint_var_ref): Likewise.
+ (locexpr_generate_c_location): Likewise.
+ (loclist_read_variable): Likewise.
+ (loclist_read_variable_at_entry): Likewise.
+ (loclist_describe_location): Likewise.
+ (loclist_tracepoint_var_ref): Likewise.
+ (loclist_generate_c_location): Likewise.
+ * dwarf2read.c (line_header_hash_voidp): Likewise.
+ (line_header_eq_voidp): Likewise.
+ (dwarf2_has_info): Likewise.
+ (dwarf2_get_section_info): Likewise.
+ (locate_dwz_sections): Likewise.
+ (hash_file_name_entry): Likewise.
+ (eq_file_name_entry): Likewise.
+ (delete_file_name_entry): Likewise.
+ (dw2_setup): Likewise.
+ (dw2_get_file_names_reader): Likewise.
+ (dw2_find_pc_sect_compunit_symtab): Likewise.
+ (hash_signatured_type): Likewise.
+ (eq_signatured_type): Likewise.
+ (add_signatured_type_cu_to_table): Likewise.
+ (create_debug_types_hash_table): Likewise.
+ (lookup_dwo_signatured_type): Likewise.
+ (lookup_dwp_signatured_type): Likewise.
+ (lookup_signatured_type): Likewise.
+ (hash_type_unit_group): Likewise.
+ (eq_type_unit_group): Likewise.
+ (get_type_unit_group): Likewise.
+ (process_psymtab_comp_unit_reader): Likewise.
+ (sort_tu_by_abbrev_offset): Likewise.
+ (process_skeletonless_type_unit): Likewise.
+ (psymtabs_addrmap_cleanup): Likewise.
+ (dwarf2_read_symtab): Likewise.
+ (psymtab_to_symtab_1): Likewise.
+ (die_hash): Likewise.
+ (die_eq): Likewise.
+ (load_full_comp_unit_reader): Likewise.
+ (reset_die_in_process): Likewise.
+ (free_cu_line_header): Likewise.
+ (handle_DW_AT_stmt_list): Likewise.
+ (hash_dwo_file): Likewise.
+ (eq_dwo_file): Likewise.
+ (hash_dwo_unit): Likewise.
+ (eq_dwo_unit): Likewise.
+ (create_dwo_cu_reader): Likewise.
+ (create_dwo_unit_in_dwp_v1): Likewise.
+ (create_dwo_unit_in_dwp_v2): Likewise.
+ (lookup_dwo_unit_in_dwp): Likewise.
+ (dwarf2_locate_dwo_sections): Likewise.
+ (dwarf2_locate_common_dwp_sections): Likewise.
+ (dwarf2_locate_v2_dwp_sections): Likewise.
+ (hash_dwp_loaded_cutus): Likewise.
+ (eq_dwp_loaded_cutus): Likewise.
+ (lookup_dwo_cutu): Likewise.
+ (abbrev_table_free_cleanup): Likewise.
+ (dwarf2_free_abbrev_table): Likewise.
+ (find_partial_die_in_comp_unit): Likewise.
+ (free_line_header_voidp): Likewise.
+ (follow_die_offset): Likewise.
+ (follow_die_sig_1): Likewise.
+ (free_heap_comp_unit): Likewise.
+ (free_stack_comp_unit): Likewise.
+ (dwarf2_free_objfile): Likewise.
+ (per_cu_offset_and_type_hash): Likewise.
+ (per_cu_offset_and_type_eq): Likewise.
+ (get_die_type_at_offset): Likewise.
+ (partial_die_hash): Likewise.
+ (partial_die_eq): Likewise.
+ (dwarf2_per_objfile_free): Likewise.
+ (hash_strtab_entry): Likewise.
+ (eq_strtab_entry): Likewise.
+ (add_string): Likewise.
+ (hash_symtab_entry): Likewise.
+ (eq_symtab_entry): Likewise.
+ (delete_symtab_entry): Likewise.
+ (cleanup_mapped_symtab): Likewise.
+ (add_indices_to_cpool): Likewise.
+ (hash_psymtab_cu_index): Likewise.
+ (eq_psymtab_cu_index): Likewise.
+ (add_address_entry_worker): Likewise.
+ (unlink_if_set): Likewise.
+ (write_one_signatured_type): Likewise.
+ (save_gdb_index_command): Likewise.
+ * elfread.c (elf_symtab_read): Likewise.
+ (elf_gnu_ifunc_cache_hash): Likewise.
+ (elf_gnu_ifunc_cache_eq): Likewise.
+ (elf_gnu_ifunc_record_cache): Likewise.
+ (elf_gnu_ifunc_resolve_by_cache): Likewise.
+ (elf_get_probes): Likewise.
+ (probe_key_free): Likewise.
+ * f-lang.c (builtin_f_type): Likewise.
+ * frame-base.c (frame_base_append_sniffer): Likewise.
+ (frame_base_set_default): Likewise.
+ (frame_base_find_by_frame): Likewise.
+ * frame-unwind.c (frame_unwind_prepend_unwinder): Likewise.
+ (frame_unwind_append_unwinder): Likewise.
+ (frame_unwind_find_by_frame): Likewise.
+ * frame.c (frame_addr_hash): Likewise.
+ (frame_addr_hash_eq): Likewise.
+ (frame_stash_find): Likewise.
+ (do_frame_register_read): Likewise.
+ (unwind_to_current_frame): Likewise.
+ (frame_cleanup_after_sniffer): Likewise.
+ * frv-linux-tdep.c (frv_linux_sigtramp_frame_cache): Likewise.
+ * frv-tdep.c (frv_frame_unwind_cache): Likewise.
+ * ft32-tdep.c (ft32_frame_cache): Likewise.
+ * gcore.c (do_bfd_delete_cleanup): Likewise.
+ (gcore_create_callback): Likewise.
+ * gdb_bfd.c (hash_bfd): Likewise.
+ (eq_bfd): Likewise.
+ (gdb_bfd_open): Likewise.
+ (free_one_bfd_section): Likewise.
+ (gdb_bfd_ref): Likewise.
+ (gdb_bfd_unref): Likewise.
+ (get_section_descriptor): Likewise.
+ (gdb_bfd_map_section): Likewise.
+ (gdb_bfd_crc): Likewise.
+ (gdb_bfd_mark_parent): Likewise.
+ (gdb_bfd_record_inclusion): Likewise.
+ (gdb_bfd_requires_relocations): Likewise.
+ (print_one_bfd): Likewise.
+ * gdbtypes.c (type_pair_hash): Likewise.
+ (type_pair_eq): Likewise.
+ (builtin_type): Likewise.
+ (objfile_type): Likewise.
+ * gnu-v3-abi.c (vtable_ptrdiff_type): Likewise.
+ (vtable_address_point_offset): Likewise.
+ (gnuv3_get_vtable): Likewise.
+ (hash_value_and_voffset): Likewise.
+ (eq_value_and_voffset): Likewise.
+ (compare_value_and_voffset): Likewise.
+ (compute_vtable_size): Likewise.
+ (gnuv3_get_typeid_type): Likewise.
+ * go-lang.c (builtin_go_type): Likewise.
+ * guile/scm-block.c (bkscm_hash_block_smob): Likewise.
+ (bkscm_eq_block_smob): Likewise.
+ (bkscm_objfile_block_map): Likewise.
+ (bkscm_del_objfile_blocks): Likewise.
+ * guile/scm-breakpoint.c (bpscm_build_bp_list): Likewise.
+ * guile/scm-disasm.c (gdbscm_disasm_read_memory_worker): Likewise.
+ (gdbscm_disasm_print_address): Likewise.
+ * guile/scm-frame.c (frscm_hash_frame_smob): Likewise.
+ (frscm_eq_frame_smob): Likewise.
+ (frscm_inferior_frame_map): Likewise.
+ (frscm_del_inferior_frames): Likewise.
+ * guile/scm-gsmob.c (gdbscm_add_objfile_ref): Likewise.
+ * guile/scm-objfile.c (ofscm_handle_objfile_deleted): Likewise.
+ (ofscm_objfile_smob_from_objfile): Likewise.
+ * guile/scm-ports.c (ioscm_write): Likewise.
+ (ioscm_file_port_delete): Likewise.
+ (ioscm_file_port_rewind): Likewise.
+ (ioscm_file_port_put): Likewise.
+ (ioscm_file_port_write): Likewise.
+ * guile/scm-progspace.c (psscm_handle_pspace_deleted): Likewise.
+ (psscm_pspace_smob_from_pspace): Likewise.
+ * guile/scm-safe-call.c (scscm_recording_pre_unwind_handler): Likewise.
+ (scscm_recording_unwind_handler): Likewise.
+ (gdbscm_with_catch): Likewise.
+ (scscm_call_0_body): Likewise.
+ (scscm_call_1_body): Likewise.
+ (scscm_call_2_body): Likewise.
+ (scscm_call_3_body): Likewise.
+ (scscm_call_4_body): Likewise.
+ (scscm_apply_1_body): Likewise.
+ (scscm_eval_scheme_string): Likewise.
+ (gdbscm_safe_eval_string): Likewise.
+ (scscm_source_scheme_script): Likewise.
+ (gdbscm_safe_source_script): Likewise.
+ * guile/scm-string.c (gdbscm_call_scm_to_stringn): Likewise.
+ (gdbscm_call_scm_from_stringn): Likewise.
+ * guile/scm-symbol.c (syscm_hash_symbol_smob): Likewise.
+ (syscm_eq_symbol_smob): Likewise.
+ (syscm_get_symbol_map): Likewise.
+ (syscm_del_objfile_symbols): Likewise.
+ * guile/scm-symtab.c (stscm_hash_symtab_smob): Likewise.
+ (stscm_eq_symtab_smob): Likewise.
+ (stscm_objfile_symtab_map): Likewise.
+ (stscm_del_objfile_symtabs): Likewise.
+ * guile/scm-type.c (tyscm_hash_type_smob): Likewise.
+ (tyscm_eq_type_smob): Likewise.
+ (tyscm_type_map): Likewise.
+ (tyscm_copy_type_recursive): Likewise.
+ (save_objfile_types): Likewise.
+ * guile/scm-utils.c (extract_arg): Likewise.
+ * h8300-tdep.c (h8300_frame_cache): Likewise.
+ * hppa-linux-tdep.c (hppa_linux_sigtramp_frame_unwind_cache): Likewise.
+ * hppa-tdep.c (compare_unwind_entries): Likewise.
+ (find_unwind_entry): Likewise.
+ (hppa_frame_cache): Likewise.
+ (hppa_stub_frame_unwind_cache): Likewise.
+ * hppanbsd-tdep.c (hppanbsd_supply_gregset): Likewise.
+ * hppaobsd-tdep.c (hppaobsd_supply_gregset): Likewise.
+ (hppaobsd_supply_fpregset): Likewise.
+ * i386-cygwin-tdep.c (core_process_module_section): Likewise.
+ * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
+ * i386-tdep.c (i386_frame_cache): Likewise.
+ (i386_epilogue_frame_cache): Likewise.
+ (i386_sigtramp_frame_cache): Likewise.
+ (i386_supply_gregset): Likewise.
+ (i386_collect_gregset): Likewise.
+ (i386_gdbarch_init): Likewise.
+ * i386obsd-tdep.c (i386obsd_aout_supply_regset): Likewise.
+ (i386obsd_trapframe_cache): Likewise.
+ * i387-tdep.c (i387_supply_fsave): Likewise.
+ (i387_collect_fsave): Likewise.
+ (i387_supply_fxsave): Likewise.
+ (i387_collect_fxsave): Likewise.
+ (i387_supply_xsave): Likewise.
+ (i387_collect_xsave): Likewise.
+ * ia64-tdep.c (ia64_frame_cache): Likewise.
+ (ia64_sigtramp_frame_cache): Likewise.
+ * infcmd.c (attach_command_continuation): Likewise.
+ (attach_command_continuation_free_args): Likewise.
+ * inferior.c (restore_inferior): Likewise.
+ (delete_thread_of_inferior): Likewise.
+ * inflow.c (inflow_inferior_data_cleanup): Likewise.
+ (get_inflow_inferior_data): Likewise.
+ (inflow_inferior_exit): Likewise.
+ * infrun.c (displaced_step_clear_cleanup): Likewise.
+ (restore_current_uiout_cleanup): Likewise.
+ (release_stop_context_cleanup): Likewise.
+ (do_restore_infcall_suspend_state_cleanup): Likewise.
+ (do_restore_infcall_control_state_cleanup): Likewise.
+ (restore_inferior_ptid): Likewise.
+ * inline-frame.c (block_starting_point_at): Likewise.
+ * iq2000-tdep.c (iq2000_frame_cache): Likewise.
+ * jit.c (get_jit_objfile_data): Likewise.
+ (get_jit_program_space_data): Likewise.
+ (jit_object_close_impl): Likewise.
+ (jit_find_objf_with_entry_addr): Likewise.
+ (jit_breakpoint_deleted): Likewise.
+ (jit_unwind_reg_set_impl): Likewise.
+ (jit_unwind_reg_get_impl): Likewise.
+ (jit_dealloc_cache): Likewise.
+ (jit_frame_sniffer): Likewise.
+ (jit_frame_prev_register): Likewise.
+ (jit_prepend_unwinder): Likewise.
+ (jit_inferior_exit_hook): Likewise.
+ (free_objfile_data): Likewise.
+ * jv-lang.c (jv_per_objfile_free): Likewise.
+ (get_dynamics_objfile): Likewise.
+ (get_java_class_symtab): Likewise.
+ (builtin_java_type): Likewise.
+ * language.c (language_string_char_type): Likewise.
+ (language_bool_type): Likewise.
+ (language_lookup_primitive_type): Likewise.
+ (language_lookup_primitive_type_as_symbol): Likewise.
+ * linespec.c (hash_address_entry): Likewise.
+ (eq_address_entry): Likewise.
+ (iterate_inline_only): Likewise.
+ (iterate_name_matcher): Likewise.
+ (decode_line_2_compare_items): Likewise.
+ (collect_one_symbol): Likewise.
+ (compare_symbols): Likewise.
+ (compare_msymbols): Likewise.
+ (add_symtabs_to_list): Likewise.
+ (collect_symbols): Likewise.
+ (compare_msyms): Likewise.
+ (add_minsym): Likewise.
+ (cleanup_linespec_result): Likewise.
+ * linux-fork.c (inferior_call_waitpid_cleanup): Likewise.
+ * linux-nat.c (delete_lwp_cleanup): Likewise.
+ (count_events_callback): Likewise.
+ (select_event_lwp_callback): Likewise.
+ (resume_stopped_resumed_lwps): Likewise.
+ * linux-tdep.c (get_linux_gdbarch_data): Likewise.
+ (invalidate_linux_cache_inf): Likewise.
+ (get_linux_inferior_data): Likewise.
+ (linux_find_memory_regions_thunk): Likewise.
+ (linux_make_mappings_callback): Likewise.
+ (linux_corefile_thread_callback): Likewise.
+ (find_mapping_size): Likewise.
+ * linux-thread-db.c (find_new_threads_callback): Likewise.
+ * lm32-tdep.c (lm32_frame_cache): Likewise.
+ * m2-lang.c (builtin_m2_type): Likewise.
+ * m32c-tdep.c (m32c_analyze_frame_prologue): Likewise.
+ * m32r-linux-tdep.c (m32r_linux_sigtramp_frame_cache): Likewise.
+ (m32r_linux_supply_gregset): Likewise.
+ (m32r_linux_collect_gregset): Likewise.
+ * m32r-tdep.c (m32r_frame_unwind_cache): Likewise.
+ * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
+ * m68k-tdep.c (m68k_frame_cache): Likewise.
+ * m68kbsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
+ (m68kbsd_supply_gregset): Likewise.
+ * m68klinux-tdep.c (m68k_linux_sigtramp_frame_cache): Likewise.
+ * m88k-tdep.c (m88k_frame_cache): Likewise.
+ (m88k_supply_gregset): Likewise.
+
+2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
+
* aarch64-linux-tdep.c (aarch64_stap_parse_special_token): Add cast
to allocation result assignment.
* ada-exp.y (write_object_renaming): Likewise.
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index da61e54..5b5e1ad 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -846,7 +846,7 @@ aarch64_make_prologue_cache (struct frame_info *this_frame, void **this_cache)
struct aarch64_prologue_cache *cache;
if (*this_cache != NULL)
- return *this_cache;
+ return (struct aarch64_prologue_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct aarch64_prologue_cache);
cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -971,7 +971,7 @@ aarch64_make_stub_cache (struct frame_info *this_frame, void **this_cache)
struct aarch64_prologue_cache *cache;
if (*this_cache != NULL)
- return *this_cache;
+ return (struct aarch64_prologue_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct aarch64_prologue_cache);
cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -2464,7 +2464,7 @@ aarch64_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
static struct value *
value_of_aarch64_user_reg (struct frame_info *frame, const void *baton)
{
- const int *reg_p = baton;
+ const int *reg_p = (const int *) baton;
return value_of_register (*reg_p, frame);
}
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 0b463e2..a229fa1 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -398,7 +398,7 @@ ada_inferior_data_cleanup (struct inferior *inf, void *arg)
{
struct ada_inferior_data *data;
- data = inferior_data (inf, ada_inferior_data);
+ data = (struct ada_inferior_data *) inferior_data (inf, ada_inferior_data);
if (data != NULL)
xfree (data);
}
@@ -416,7 +416,7 @@ get_ada_inferior_data (struct inferior *inf)
{
struct ada_inferior_data *data;
- data = inferior_data (inf, ada_inferior_data);
+ data = (struct ada_inferior_data *) inferior_data (inf, ada_inferior_data);
if (data == NULL)
{
data = XCNEW (struct ada_inferior_data);
@@ -459,7 +459,8 @@ get_ada_pspace_data (struct program_space *pspace)
{
struct ada_pspace_data *data;
- data = program_space_data (pspace, ada_pspace_data_handle);
+ data = ((struct ada_pspace_data *)
+ program_space_data (pspace, ada_pspace_data_handle));
if (data == NULL)
{
data = XCNEW (struct ada_pspace_data);
@@ -474,7 +475,7 @@ get_ada_pspace_data (struct program_space *pspace)
static void
ada_pspace_data_cleanup (struct program_space *pspace, void *data)
{
- struct ada_pspace_data *pspace_data = data;
+ struct ada_pspace_data *pspace_data = (struct ada_pspace_data *) data;
if (pspace_data->sym_cache != NULL)
ada_free_symbol_cache (pspace_data->sym_cache);
@@ -6370,7 +6371,7 @@ struct add_partial_datum
static int
ada_complete_symbol_matcher (const char *name, void *user_data)
{
- struct add_partial_datum *data = user_data;
+ struct add_partial_datum *data = (struct add_partial_datum *) user_data;
return symbol_completion_match (name, data->text, data->text_len,
data->wild_match, data->encoded) != NULL;
@@ -13131,7 +13132,7 @@ sort_remove_dups_ada_exceptions_list (VEC(ada_exc_info) **exceptions,
static int
ada_exc_search_name_matches (const char *search_name, void *user_data)
{
- regex_t *preg = user_data;
+ regex_t *preg = (regex_t *) user_data;
if (preg == NULL)
return 1;
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
index fbe67aa..e2194dd 100644
--- a/gdb/ada-tasks.c
+++ b/gdb/ada-tasks.c
@@ -248,7 +248,8 @@ get_ada_tasks_pspace_data (struct program_space *pspace)
{
struct ada_tasks_pspace_data *data;
- data = program_space_data (pspace, ada_tasks_pspace_data_handle);
+ data = ((struct ada_tasks_pspace_data *)
+ program_space_data (pspace, ada_tasks_pspace_data_handle));
if (data == NULL)
{
data = XCNEW (struct ada_tasks_pspace_data);
@@ -275,7 +276,8 @@ get_ada_tasks_inferior_data (struct inferior *inf)
{
struct ada_tasks_inferior_data *data;
- data = inferior_data (inf, ada_tasks_inferior_data_handle);
+ data = ((struct ada_tasks_inferior_data *)
+ inferior_data (inf, ada_tasks_inferior_data_handle));
if (data == NULL)
{
data = XCNEW (struct ada_tasks_inferior_data);
diff --git a/gdb/addrmap.c b/gdb/addrmap.c
index a526167..0324edc 100644
--- a/gdb/addrmap.c
+++ b/gdb/addrmap.c
@@ -479,7 +479,8 @@ struct mutable_foreach_data
static int
addrmap_mutable_foreach_worker (splay_tree_node node, void *data)
{
- struct mutable_foreach_data *foreach_data = data;
+ struct mutable_foreach_data *foreach_data
+ = (struct mutable_foreach_data *) data;
return foreach_data->fn (foreach_data->data,
addrmap_node_key (node),
@@ -514,7 +515,7 @@ static const struct addrmap_funcs addrmap_mutable_funcs =
static void *
splay_obstack_alloc (int size, void *closure)
{
- struct addrmap_mutable *map = closure;
+ struct addrmap_mutable *map = (struct addrmap_mutable *) closure;
splay_tree_node n;
/* We should only be asked to allocate nodes and larger things.
@@ -536,8 +537,8 @@ splay_obstack_alloc (int size, void *closure)
static void
splay_obstack_free (void *obj, void *closure)
{
- struct addrmap_mutable *map = closure;
- splay_tree_node n = obj;
+ struct addrmap_mutable *map = (struct addrmap_mutable *) closure;
+ splay_tree_node n = (splay_tree_node) obj;
/* We've asserted in the allocation function that we only allocate
nodes or larger things, so it should be safe to put whatever
diff --git a/gdb/alpha-linux-tdep.c b/gdb/alpha-linux-tdep.c
index 27bd452..3263049 100644
--- a/gdb/alpha-linux-tdep.c
+++ b/gdb/alpha-linux-tdep.c
@@ -163,7 +163,7 @@ alpha_linux_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
gdb_assert (len >= 32 * 8);
alpha_supply_int_regs (regcache, regnum, regs, regs + 31 * 8,
@@ -180,7 +180,7 @@ alpha_linux_collect_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs, size_t len)
{
- gdb_byte *regs = gregs;
+ gdb_byte *regs = (gdb_byte *) gregs;
gdb_assert (len >= 32 * 8);
alpha_fill_int_regs (regcache, regnum, regs, regs + 31 * 8,
@@ -196,7 +196,7 @@ alpha_linux_supply_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
- const gdb_byte *regs = fpregs;
+ const gdb_byte *regs = (const gdb_byte *) fpregs;
gdb_assert (len >= 32 * 8);
alpha_supply_fp_regs (regcache, regnum, regs, regs + 31 * 8);
@@ -212,7 +212,7 @@ alpha_linux_collect_fpregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *fpregs, size_t len)
{
- gdb_byte *regs = fpregs;
+ gdb_byte *regs = (gdb_byte *) fpregs;
gdb_assert (len >= 32 * 8);
alpha_fill_fp_regs (regcache, regnum, regs, regs + 31 * 8);
diff --git a/gdb/alpha-mdebug-tdep.c b/gdb/alpha-mdebug-tdep.c
index a8a511b..a32088b 100644
--- a/gdb/alpha-mdebug-tdep.c
+++ b/gdb/alpha-mdebug-tdep.c
@@ -197,7 +197,7 @@ alpha_mdebug_frame_unwind_cache (struct frame_info *this_frame,
int ireg, returnreg;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct alpha_mdebug_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct alpha_mdebug_unwind_cache);
*this_prologue_cache = info;
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 7654096..0696b6e 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -185,7 +185,8 @@ static void
alpha_lds (struct gdbarch *gdbarch, void *out, const void *in)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- ULONGEST mem = extract_unsigned_integer (in, 4, byte_order);
+ ULONGEST mem
+ = extract_unsigned_integer ((const gdb_byte *) in, 4, byte_order);
ULONGEST frac = (mem >> 0) & 0x7fffff;
ULONGEST sign = (mem >> 31) & 1;
ULONGEST exp_msb = (mem >> 30) & 1;
@@ -205,7 +206,7 @@ alpha_lds (struct gdbarch *gdbarch, void *out, const void *in)
}
reg = (sign << 63) | (exp << 52) | (frac << 29);
- store_unsigned_integer (out, 8, byte_order, reg);
+ store_unsigned_integer ((gdb_byte *) out, 8, byte_order, reg);
}
/* Similarly, this represents exactly the conversion performed by
@@ -217,9 +218,9 @@ alpha_sts (struct gdbarch *gdbarch, void *out, const void *in)
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST reg, mem;
- reg = extract_unsigned_integer (in, 8, byte_order);
+ reg = extract_unsigned_integer ((const gdb_byte *) in, 8, byte_order);
mem = ((reg >> 32) & 0xc0000000) | ((reg >> 29) & 0x3fffffff);
- store_unsigned_integer (out, 4, byte_order, mem);
+ store_unsigned_integer ((gdb_byte *) out, 4, byte_order, mem);
}
/* The alpha needs a conversion between register and memory format if the
@@ -889,7 +890,7 @@ alpha_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
struct gdbarch_tdep *tdep;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct alpha_sigtramp_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct alpha_sigtramp_unwind_cache);
*this_prologue_cache = info;
@@ -1239,7 +1240,7 @@ alpha_heuristic_frame_unwind_cache (struct frame_info *this_frame,
int frame_reg, frame_size, return_reg, reg;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct alpha_heuristic_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct alpha_heuristic_unwind_cache);
*this_prologue_cache = info;
@@ -1498,7 +1499,7 @@ void
alpha_supply_int_regs (struct regcache *regcache, int regno,
const void *r0_r30, const void *pc, const void *unique)
{
- const gdb_byte *regs = r0_r30;
+ const gdb_byte *regs = (const gdb_byte *) r0_r30;
int i;
for (i = 0; i < 31; ++i)
@@ -1523,7 +1524,7 @@ void
alpha_fill_int_regs (const struct regcache *regcache,
int regno, void *r0_r30, void *pc, void *unique)
{
- gdb_byte *regs = r0_r30;
+ gdb_byte *regs = (gdb_byte *) r0_r30;
int i;
for (i = 0; i < 31; ++i)
@@ -1541,7 +1542,7 @@ void
alpha_supply_fp_regs (struct regcache *regcache, int regno,
const void *f0_f30, const void *fpcr)
{
- const gdb_byte *regs = f0_f30;
+ const gdb_byte *regs = (const gdb_byte *) f0_f30;
int i;
for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
@@ -1557,7 +1558,7 @@ void
alpha_fill_fp_regs (const struct regcache *regcache,
int regno, void *f0_f30, void *fpcr)
{
- gdb_byte *regs = f0_f30;
+ gdb_byte *regs = (gdb_byte *) f0_f30;
int i;
for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c
index 69be265..8e07c55 100644
--- a/gdb/alphanbsd-tdep.c
+++ b/gdb/alphanbsd-tdep.c
@@ -53,7 +53,7 @@ alphanbsd_supply_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
- const gdb_byte *regs = fpregs;
+ const gdb_byte *regs = (const gdb_byte *) fpregs;
int i;
gdb_assert (len >= ALPHANBSD_SIZEOF_FPREGS);
@@ -77,7 +77,7 @@ alphanbsd_aout_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
/* Table to map a GDB register number to a trapframe register index. */
@@ -121,7 +121,7 @@ alphanbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
if (len >= ALPHANBSD_SIZEOF_GREGS + ALPHANBSD_SIZEOF_FPREGS)
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index 14c1065..021dca6 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -1845,7 +1845,8 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
const struct target_desc *tdesc = info.target_desc;
- struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info;
+ struct tdesc_arch_data *tdesc_data
+ = (struct tdesc_arch_data *) info.tdep_info;
const struct tdesc_feature *feature;
int valid_p;
@@ -2057,11 +2058,12 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
}
static void
-amd64_x32_linux_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
+amd64_x32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
const struct target_desc *tdesc = info.target_desc;
- struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info;
+ struct tdesc_arch_data *tdesc_data
+ = (struct tdesc_arch_data *) info.tdep_info;
const struct tdesc_feature *feature;
int valid_p;
diff --git a/gdb/amd64-nat.c b/gdb/amd64-nat.c
index 6a1690e..884f04d 100644
--- a/gdb/amd64-nat.c
+++ b/gdb/amd64-nat.c
@@ -88,7 +88,7 @@ void
amd64_supply_native_gregset (struct regcache *regcache,
const void *gregs, int regnum)
{
- const char *regs = gregs;
+ const char *regs = (const char *) gregs;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
int num_regs = amd64_native_gregset64_num_regs;
int i;
@@ -119,7 +119,7 @@ void
amd64_collect_native_gregset (const struct regcache *regcache,
void *gregs, int regnum)
{
- char *regs = gregs;
+ char *regs = (char *) gregs;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
int num_regs = amd64_native_gregset64_num_regs;
int i;
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index a2179ce..f0720c8 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -2471,7 +2471,7 @@ amd64_frame_cache (struct frame_info *this_frame, void **this_cache)
struct amd64_frame_cache *cache;
if (*this_cache)
- return *this_cache;
+ return (struct amd64_frame_cache *) *this_cache;
cache = amd64_alloc_frame_cache ();
*this_cache = cache;
@@ -2590,7 +2590,7 @@ amd64_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct amd64_frame_cache *) *this_cache;
cache = amd64_alloc_frame_cache ();
@@ -2766,7 +2766,7 @@ amd64_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache)
gdb_byte buf[8];
if (*this_cache)
- return *this_cache;
+ return (struct amd64_frame_cache *) *this_cache;
cache = amd64_alloc_frame_cache ();
*this_cache = cache;
@@ -3182,7 +3182,7 @@ amd64_supply_fxsave (struct regcache *regcache, int regnum,
if (fxsave
&& gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64)
{
- const gdb_byte *regs = fxsave;
+ const gdb_byte *regs = (const gdb_byte *) fxsave;
if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep))
regcache_raw_supply (regcache, I387_FISEG_REGNUM (tdep), regs + 12);
@@ -3205,7 +3205,7 @@ amd64_supply_xsave (struct regcache *regcache, int regnum,
if (xsave
&& gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64)
{
- const gdb_byte *regs = xsave;
+ const gdb_byte *regs = (const gdb_byte *) xsave;
if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep))
regcache_raw_supply (regcache, I387_FISEG_REGNUM (tdep),
@@ -3227,7 +3227,7 @@ amd64_collect_fxsave (const struct regcache *regcache, int regnum,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- gdb_byte *regs = fxsave;
+ gdb_byte *regs = (gdb_byte *) fxsave;
i387_collect_fxsave (regcache, regnum, fxsave);
@@ -3248,7 +3248,7 @@ amd64_collect_xsave (const struct regcache *regcache, int regnum,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- gdb_byte *regs = xsave;
+ gdb_byte *regs = (gdb_byte *) xsave;
i387_collect_xsave (regcache, regnum, xsave, gcore);
diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c
index 8b6e52b..296bdb2 100644
--- a/gdb/amd64-windows-tdep.c
+++ b/gdb/amd64-windows-tdep.c
@@ -1025,7 +1025,7 @@ amd64_windows_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR unwind_info = 0;
if (*this_cache)
- return *this_cache;
+ return (struct amd64_windows_frame_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct amd64_windows_frame_cache);
*this_cache = cache;
diff --git a/gdb/amd64obsd-tdep.c b/gdb/amd64obsd-tdep.c
index 46bf7c5..4effa08 100644
--- a/gdb/amd64obsd-tdep.c
+++ b/gdb/amd64obsd-tdep.c
@@ -363,7 +363,7 @@ amd64obsd_trapframe_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
*this_cache = cache;
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 46d59ba..b7c5b99 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -506,7 +506,7 @@ arm_linux_supply_gregset (const struct regset *regset,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- const gdb_byte *gregs = gregs_buf;
+ const gdb_byte *gregs = (const gdb_byte *) gregs_buf;
int regno;
CORE_ADDR reg_pc;
gdb_byte pc_buf[INT_REGISTER_SIZE];
@@ -542,7 +542,7 @@ arm_linux_collect_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs_buf, size_t len)
{
- gdb_byte *gregs = gregs_buf;
+ gdb_byte *gregs = (gdb_byte *) gregs_buf;
int regno;
for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++)
@@ -649,7 +649,7 @@ arm_linux_supply_nwfpe (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *regs_buf, size_t len)
{
- const gdb_byte *regs = regs_buf;
+ const gdb_byte *regs = (const gdb_byte *) regs_buf;
int regno;
if (regnum == ARM_FPS_REGNUM || regnum == -1)
@@ -666,7 +666,7 @@ arm_linux_collect_nwfpe (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *regs_buf, size_t len)
{
- gdb_byte *regs = regs_buf;
+ gdb_byte *regs = (gdb_byte *) regs_buf;
int regno;
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
@@ -687,7 +687,7 @@ arm_linux_supply_vfp (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *regs_buf, size_t len)
{
- const gdb_byte *regs = regs_buf;
+ const gdb_byte *regs = (const gdb_byte *) regs_buf;
int regno;
if (regnum == ARM_FPSCR_REGNUM || regnum == -1)
@@ -704,7 +704,7 @@ arm_linux_collect_vfp (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *regs_buf, size_t len)
{
- gdb_byte *regs = regs_buf;
+ gdb_byte *regs = (gdb_byte *) regs_buf;
int regno;
if (regnum == ARM_FPSCR_REGNUM || regnum == -1)
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index cb47fa7..4c99ddf 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -333,7 +333,8 @@ arm_find_mapping_symbol (CORE_ADDR memaddr, CORE_ADDR *start)
0 };
unsigned int idx;
- data = objfile_data (sec->objfile, arm_objfile_data_key);
+ data = (struct arm_per_objfile *) objfile_data (sec->objfile,
+ arm_objfile_data_key);
if (data != NULL)
{
map = data->section_maps[sec->the_bfd_section->index];
@@ -2028,7 +2029,7 @@ arm_prologue_unwind_stop_reason (struct frame_info *this_frame,
if (*this_cache == NULL)
*this_cache = arm_make_prologue_cache (this_frame);
- cache = *this_cache;
+ cache = (struct arm_prologue_cache *) *this_cache;
/* This is meant to halt the backtrace at "_start". */
pc = get_frame_pc (this_frame);
@@ -2056,7 +2057,7 @@ arm_prologue_this_id (struct frame_info *this_frame,
if (*this_cache == NULL)
*this_cache = arm_make_prologue_cache (this_frame);
- cache = *this_cache;
+ cache = (struct arm_prologue_cache *) *this_cache;
/* Use function start address as part of the frame ID. If we cannot
identify the start address (due to missing symbol information),
@@ -2080,7 +2081,7 @@ arm_prologue_prev_register (struct frame_info *this_frame,
if (*this_cache == NULL)
*this_cache = arm_make_prologue_cache (this_frame);
- cache = *this_cache;
+ cache = (struct arm_prologue_cache *) *this_cache;
/* If we are asked to unwind the PC, then we need to return the LR
instead. The prologue may save PC, but it will point into this
@@ -2160,7 +2161,7 @@ struct arm_exidx_data
static void
arm_exidx_data_free (struct objfile *objfile, void *arg)
{
- struct arm_exidx_data *data = arg;
+ struct arm_exidx_data *data = (struct arm_exidx_data *) arg;
unsigned int i;
for (i = 0; i < objfile->obfd->section_count; i++)
@@ -2435,7 +2436,8 @@ arm_find_exidx_entry (CORE_ADDR memaddr, CORE_ADDR *start)
struct arm_exidx_entry map_key = { memaddr - obj_section_addr (sec), 0 };
unsigned int idx;
- data = objfile_data (sec->objfile, arm_exidx_data_key);
+ data = ((struct arm_exidx_data *)
+ objfile_data (sec->objfile, arm_exidx_data_key));
if (data != NULL)
{
map = data->section_maps[sec->the_bfd_section->index];
@@ -2960,7 +2962,7 @@ arm_stub_this_id (struct frame_info *this_frame,
if (*this_cache == NULL)
*this_cache = arm_make_stub_cache (this_frame);
- cache = *this_cache;
+ cache = (struct arm_prologue_cache *) *this_cache;
*this_id = frame_id_build (cache->prev_sp, get_frame_pc (this_frame));
}
@@ -3054,7 +3056,7 @@ arm_m_exception_this_id (struct frame_info *this_frame,
if (*this_cache == NULL)
*this_cache = arm_m_exception_cache (this_frame);
- cache = *this_cache;
+ cache = (struct arm_prologue_cache *) *this_cache;
/* Our frame ID for a stub frame is the current SP and LR. */
*this_id = frame_id_build (cache->prev_sp,
@@ -3074,7 +3076,7 @@ arm_m_exception_prev_register (struct frame_info *this_frame,
if (*this_cache == NULL)
*this_cache = arm_m_exception_cache (this_frame);
- cache = *this_cache;
+ cache = (struct arm_prologue_cache *) *this_cache;
/* The value was already reconstructed into PREV_SP. */
if (prev_regnum == ARM_SP_REGNUM)
@@ -3127,7 +3129,7 @@ arm_normal_frame_base (struct frame_info *this_frame, void **this_cache)
if (*this_cache == NULL)
*this_cache = arm_make_prologue_cache (this_frame);
- cache = *this_cache;
+ cache = (struct arm_prologue_cache *) *this_cache;
return cache->prev_sp - cache->framesize;
}
@@ -8770,7 +8772,7 @@ arm_displaced_step_fixup (struct gdbarch *gdbarch,
static int
gdb_print_insn_arm (bfd_vma memaddr, disassemble_info *info)
{
- struct gdbarch *gdbarch = info->application_data;
+ struct gdbarch *gdbarch = (struct gdbarch *) info->application_data;
if (arm_pc_is_thumb (gdbarch, memaddr))
{
@@ -9598,7 +9600,7 @@ arm_coff_make_msymbol_special(int val, struct minimal_symbol *msym)
static void
arm_objfile_data_free (struct objfile *objfile, void *arg)
{
- struct arm_per_objfile *data = arg;
+ struct arm_per_objfile *data = (struct arm_per_objfile *) arg;
unsigned int i;
for (i = 0; i < objfile->obfd->section_count; i++)
@@ -9618,7 +9620,8 @@ arm_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile,
if (name[1] != 'a' && name[1] != 't' && name[1] != 'd')
return;
- data = objfile_data (objfile, arm_objfile_data_key);
+ data = (struct arm_per_objfile *) objfile_data (objfile,
+ arm_objfile_data_key);
if (data == NULL)
{
data = OBSTACK_ZALLOC (&objfile->objfile_obstack,
@@ -9822,7 +9825,7 @@ arm_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
static struct value *
value_of_arm_user_reg (struct frame_info *frame, const void *baton)
{
- const int *reg_p = baton;
+ const int *reg_p = (const int *) baton;
return value_of_register (*reg_p, frame);
}
\f
diff --git a/gdb/armbsd-tdep.c b/gdb/armbsd-tdep.c
index c043b51..1b9bad7 100644
--- a/gdb/armbsd-tdep.c
+++ b/gdb/armbsd-tdep.c
@@ -50,7 +50,7 @@ armbsd_supply_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
- const gdb_byte *regs = fpregs;
+ const gdb_byte *regs = (const gdb_byte *) fpregs;
int i;
gdb_assert (len >= ARMBSD_SIZEOF_FPREGS);
@@ -71,7 +71,7 @@ armbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
gdb_assert (len >= ARMBSD_SIZEOF_GREGS);
diff --git a/gdb/auto-load.c b/gdb/auto-load.c
index 119c673..49a8b61 100644
--- a/gdb/auto-load.c
+++ b/gdb/auto-load.c
@@ -580,7 +580,7 @@ static const struct program_space_data *auto_load_pspace_data;
static void
auto_load_pspace_data_cleanup (struct program_space *pspace, void *arg)
{
- struct auto_load_pspace_info *info = arg;
+ struct auto_load_pspace_info *info = (struct auto_load_pspace_info *) arg;
if (info->loaded_script_files)
htab_delete (info->loaded_script_files);
@@ -597,7 +597,8 @@ get_auto_load_pspace_data (struct program_space *pspace)
{
struct auto_load_pspace_info *info;
- info = program_space_data (pspace, auto_load_pspace_data);
+ info = ((struct auto_load_pspace_info *)
+ program_space_data (pspace, auto_load_pspace_data));
if (info == NULL)
{
info = XCNEW (struct auto_load_pspace_info);
@@ -612,7 +613,7 @@ get_auto_load_pspace_data (struct program_space *pspace)
static hashval_t
hash_loaded_script_entry (const void *data)
{
- const struct loaded_script *e = data;
+ const struct loaded_script *e = (const struct loaded_script *) data;
return htab_hash_string (e->name) ^ htab_hash_pointer (e->language);
}
@@ -622,8 +623,8 @@ hash_loaded_script_entry (const void *data)
static int
eq_loaded_script_entry (const void *a, const void *b)
{
- const struct loaded_script *ea = a;
- const struct loaded_script *eb = b;
+ const struct loaded_script *ea = (const struct loaded_script *) a;
+ const struct loaded_script *eb = (const struct loaded_script *) b;
return strcmp (ea->name, eb->name) == 0 && ea->language == eb->language;
}
@@ -762,7 +763,8 @@ clear_section_scripts (void)
struct program_space *pspace = current_program_space;
struct auto_load_pspace_info *info;
- info = program_space_data (pspace, auto_load_pspace_data);
+ info = ((struct auto_load_pspace_info *)
+ program_space_data (pspace, auto_load_pspace_data));
if (info != NULL && info->loaded_script_files != NULL)
{
htab_delete (info->loaded_script_files);
@@ -1249,8 +1251,9 @@ struct collect_matching_scripts_data
static int
collect_matching_scripts (void **slot, void *info)
{
- struct loaded_script *script = *slot;
- struct collect_matching_scripts_data *data = info;
+ struct loaded_script *script = (struct loaded_script *) *slot;
+ struct collect_matching_scripts_data *data
+ = (struct collect_matching_scripts_data *) info;
if (script->language == data->language && re_exec (script->name))
VEC_safe_push (loaded_script_ptr, *data->scripts_p, script);
diff --git a/gdb/auxv.c b/gdb/auxv.c
index f99da36..1f22d8a 100644
--- a/gdb/auxv.c
+++ b/gdb/auxv.c
@@ -320,7 +320,7 @@ auxv_inferior_data_cleanup (struct inferior *inf, void *arg)
{
struct auxv_info *info;
- info = inferior_data (inf, auxv_inferior_data);
+ info = (struct auxv_info *) inferior_data (inf, auxv_inferior_data);
if (info != NULL)
{
xfree (info->data);
@@ -355,7 +355,7 @@ get_auxv_inferior_data (struct target_ops *ops)
struct auxv_info *info;
struct inferior *inf = current_inferior ();
- info = inferior_data (inf, auxv_inferior_data);
+ info = (struct auxv_info *) inferior_data (inf, auxv_inferior_data);
if (info == NULL)
{
info = XCNEW (struct auxv_info);
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index aaa2921..4fcae53 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -987,7 +987,7 @@ avr_frame_unwind_cache (struct frame_info *this_frame,
int i;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct avr_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct avr_unwind_cache);
*this_prologue_cache = info;
diff --git a/gdb/ax-general.c b/gdb/ax-general.c
index 49afee6..e5dc240 100644
--- a/gdb/ax-general.c
+++ b/gdb/ax-general.c
@@ -73,7 +73,7 @@ free_agent_expr (struct agent_expr *x)
static void
do_free_agent_expr_cleanup (void *x)
{
- free_agent_expr (x);
+ free_agent_expr ((struct agent_expr *) x);
}
struct cleanup *
diff --git a/gdb/bfd-target.c b/gdb/bfd-target.c
index b7cd8e6..ee93c3b 100644
--- a/gdb/bfd-target.c
+++ b/gdb/bfd-target.c
@@ -48,7 +48,7 @@ target_bfd_xfer_partial (struct target_ops *ops,
{
case TARGET_OBJECT_MEMORY:
{
- struct target_bfd_data *data = ops->to_data;
+ struct target_bfd_data *data = (struct target_bfd_data *) ops->to_data;
return section_table_xfer_memory_partial (readbuf, writebuf,
offset, len, xfered_len,
data->table.sections,
@@ -63,14 +63,14 @@ target_bfd_xfer_partial (struct target_ops *ops,
static struct target_section_table *
target_bfd_get_section_table (struct target_ops *ops)
{
- struct target_bfd_data *data = ops->to_data;
+ struct target_bfd_data *data = (struct target_bfd_data *) ops->to_data;
return &data->table;
}
static void
target_bfd_xclose (struct target_ops *t)
{
- struct target_bfd_data *data = t->to_data;
+ struct target_bfd_data *data = (struct target_bfd_data *) t->to_data;
gdb_bfd_unref (data->bfd);
xfree (data->table.sections);
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index 4532e1b..3afa7bc 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -292,7 +292,7 @@ bfin_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct bfin_frame_cache *) *this_cache;
cache = bfin_alloc_frame_cache ();
*this_cache = cache;
diff --git a/gdb/block.c b/gdb/block.c
index 3195baa..a1fb3ad 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -140,7 +140,7 @@ find_block_in_blockvector (const struct blockvector *bl, CORE_ADDR pc)
/* If we have an addrmap mapping code addresses to blocks, then use
that. */
if (BLOCKVECTOR_MAP (bl))
- return addrmap_find (BLOCKVECTOR_MAP (bl), pc);
+ return (struct block *) addrmap_find (BLOCKVECTOR_MAP (bl), pc);
/* Otherwise, use binary search to find the last block that starts
before PC.
@@ -246,7 +246,7 @@ call_site_for_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
: MSYMBOL_PRINT_NAME (msym.minsym)));
}
- return *slot;
+ return (struct call_site *) *slot;
}
/* Return the blockvector immediately containing the innermost lexical block
@@ -870,7 +870,7 @@ block_find_non_opaque_type (struct symbol *sym, void *data)
int
block_find_non_opaque_type_preferred (struct symbol *sym, void *data)
{
- struct symbol **best = data;
+ struct symbol **best = (struct symbol **) data;
if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym)))
return 1;
diff --git a/gdb/break-catch-sig.c b/gdb/break-catch-sig.c
index 419d226..f117bd5 100644
--- a/gdb/break-catch-sig.c
+++ b/gdb/break-catch-sig.c
@@ -107,7 +107,7 @@ signal_catchpoint_dtor (struct breakpoint *b)
static int
signal_catchpoint_insert_location (struct bp_location *bl)
{
- struct signal_catchpoint *c = (void *) bl->owner;
+ struct signal_catchpoint *c = (struct signal_catchpoint *) bl->owner;
int i;
if (c->signals_to_be_caught != NULL)
@@ -139,7 +139,7 @@ signal_catchpoint_insert_location (struct bp_location *bl)
static int
signal_catchpoint_remove_location (struct bp_location *bl)
{
- struct signal_catchpoint *c = (void *) bl->owner;
+ struct signal_catchpoint *c = (struct signal_catchpoint *) bl->owner;
int i;
if (c->signals_to_be_caught != NULL)
@@ -180,7 +180,8 @@ signal_catchpoint_breakpoint_hit (const struct bp_location *bl,
CORE_ADDR bp_addr,
const struct target_waitstatus *ws)
{
- const struct signal_catchpoint *c = (void *) bl->owner;
+ const struct signal_catchpoint *c
+ = (const struct signal_catchpoint *) bl->owner;
gdb_signal_type signal_number;
if (ws->kind != TARGET_WAITKIND_STOPPED)
@@ -238,7 +239,7 @@ static void
signal_catchpoint_print_one (struct breakpoint *b,
struct bp_location **last_loc)
{
- struct signal_catchpoint *c = (void *) b;
+ struct signal_catchpoint *c = (struct signal_catchpoint *) b;
struct value_print_options opts;
struct ui_out *uiout = current_uiout;
@@ -296,7 +297,7 @@ signal_catchpoint_print_one (struct breakpoint *b,
static void
signal_catchpoint_print_mention (struct breakpoint *b)
{
- struct signal_catchpoint *c = (void *) b;
+ struct signal_catchpoint *c = (struct signal_catchpoint *) b;
if (c->signals_to_be_caught)
{
@@ -330,7 +331,7 @@ signal_catchpoint_print_mention (struct breakpoint *b)
static void
signal_catchpoint_print_recreate (struct breakpoint *b, struct ui_file *fp)
{
- struct signal_catchpoint *c = (void *) b;
+ struct signal_catchpoint *c = (struct signal_catchpoint *) b;
fprintf_unfiltered (fp, "catch signal");
diff --git a/gdb/break-catch-syscall.c b/gdb/break-catch-syscall.c
index 1718f49..7ae115f 100644
--- a/gdb/break-catch-syscall.c
+++ b/gdb/break-catch-syscall.c
@@ -85,7 +85,8 @@ get_catch_syscall_inferior_data (struct inferior *inf)
{
struct catch_syscall_inferior_data *inf_data;
- inf_data = inferior_data (inf, catch_syscall_inferior_data);
+ inf_data = ((struct catch_syscall_inferior_data *)
+ inferior_data (inf, catch_syscall_inferior_data));
if (inf_data == NULL)
{
inf_data = XCNEW (struct catch_syscall_inferior_data);
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index c09d56a..2c901ff 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -766,7 +766,7 @@ decref_counted_command_line (struct counted_command_line **cmdp)
static void
do_cleanup_counted_command_line (void *arg)
{
- decref_counted_command_line (arg);
+ decref_counted_command_line ((struct counted_command_line **) arg);
}
/* Create a cleanup that calls decref_counted_command_line on the
@@ -925,8 +925,8 @@ show_condition_evaluation_mode (struct ui_file *file, int from_tty,
static int
bp_location_compare_addrs (const void *ap, const void *bp)
{
- struct bp_location *a = *(void **) ap;
- struct bp_location *b = *(void **) bp;
+ const struct bp_location *a = *(const struct bp_location **) ap;
+ const struct bp_location *b = *(const struct bp_location **) bp;
if (a->address == b->address)
return 0;
@@ -951,9 +951,10 @@ get_first_locp_gte_addr (CORE_ADDR address)
dummy_loc.address = address;
/* Find a close match to the first location at ADDRESS. */
- locp_found = bsearch (&dummy_locp, bp_location, bp_location_count,
- sizeof (struct bp_location **),
- bp_location_compare_addrs);
+ locp_found = ((struct bp_location **)
+ bsearch (&dummy_locp, bp_location, bp_location_count,
+ sizeof (struct bp_location **),
+ bp_location_compare_addrs));
/* Nothing was found, nothing left to do. */
if (locp_found == NULL)
@@ -1323,7 +1324,7 @@ breakpoint_set_task (struct breakpoint *b, int task)
void
check_tracepoint_command (char *line, void *closure)
{
- struct breakpoint *b = closure;
+ struct breakpoint *b = (struct breakpoint *) closure;
validate_actionline (line, b);
}
@@ -1354,7 +1355,7 @@ struct commands_info
static void
do_map_commands_command (struct breakpoint *b, void *data)
{
- struct commands_info *info = data;
+ struct commands_info *info = (struct commands_info *) data;
if (info->cmd == NULL)
{
@@ -3393,7 +3394,8 @@ get_breakpoint_objfile_data (struct objfile *objfile)
{
struct breakpoint_objfile_data *bp_objfile_data;
- bp_objfile_data = objfile_data (objfile, breakpoint_objfile_key);
+ bp_objfile_data = ((struct breakpoint_objfile_data *)
+ objfile_data (objfile, breakpoint_objfile_key));
if (bp_objfile_data == NULL)
{
bp_objfile_data =
@@ -3408,7 +3410,8 @@ get_breakpoint_objfile_data (struct objfile *objfile)
static void
free_breakpoint_probes (struct objfile *obj, void *data)
{
- struct breakpoint_objfile_data *bp_objfile_data = data;
+ struct breakpoint_objfile_data *bp_objfile_data
+ = (struct breakpoint_objfile_data *) data;
VEC_free (probe_p, bp_objfile_data->longjmp_probes);
VEC_free (probe_p, bp_objfile_data->exception_probes);
@@ -6651,7 +6654,8 @@ struct captured_breakpoint_query_args
static int
do_captured_breakpoint_query (struct ui_out *uiout, void *data)
{
- struct captured_breakpoint_query_args *args = data;
+ struct captured_breakpoint_query_args *args
+ = (struct captured_breakpoint_query_args *) data;
struct breakpoint *b;
struct bp_location *dummy_loc = NULL;
@@ -11852,9 +11856,9 @@ tcatch_command (char *arg, int from_tty)
static int
compare_breakpoints (const void *a, const void *b)
{
- const breakpoint_p *ba = a;
+ const breakpoint_p *ba = (const breakpoint_p *) a;
uintptr_t ua = (uintptr_t) *ba;
- const breakpoint_p *bb = b;
+ const breakpoint_p *bb = (const breakpoint_p *) b;
uintptr_t ub = (uintptr_t) *bb;
if ((*ba)->number < (*bb)->number)
@@ -12074,8 +12078,8 @@ breakpoint_auto_delete (bpstat bs)
static int
bp_location_compare (const void *ap, const void *bp)
{
- struct bp_location *a = *(void **) ap;
- struct bp_location *b = *(void **) bp;
+ const struct bp_location *a = *(const struct bp_location **) ap;
+ const struct bp_location *b = *(const struct bp_location **) bp;
if (a->address != b->address)
return (a->address > b->address) - (a->address < b->address);
@@ -12676,7 +12680,7 @@ bpstat_remove_bp_location (bpstat bps, struct breakpoint *bpt)
static int
bpstat_remove_breakpoint_callback (struct thread_info *th, void *data)
{
- struct breakpoint *bpt = data;
+ struct breakpoint *bpt = (struct breakpoint *) data;
bpstat_remove_bp_location (th->control.stop_bpstat, bpt);
return 0;
@@ -13780,7 +13784,7 @@ delete_breakpoint (struct breakpoint *bpt)
static void
do_delete_breakpoint_cleanup (void *b)
{
- delete_breakpoint (b);
+ delete_breakpoint ((struct breakpoint *) b);
}
struct cleanup *
diff --git a/gdb/bsd-uthread.c b/gdb/bsd-uthread.c
index a5abb63..f9cb6d4 100644
--- a/gdb/bsd-uthread.c
+++ b/gdb/bsd-uthread.c
@@ -68,7 +68,9 @@ bsd_uthread_set_supply_uthread (struct gdbarch *gdbarch,
void (*supply_uthread) (struct regcache *,
int, CORE_ADDR))
{
- struct bsd_uthread_ops *ops = gdbarch_data (gdbarch, bsd_uthread_data);
+ struct bsd_uthread_ops *ops
+ = (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
+
ops->supply_uthread = supply_uthread;
}
@@ -80,7 +82,9 @@ bsd_uthread_set_collect_uthread (struct gdbarch *gdbarch,
void (*collect_uthread) (const struct regcache *,
int, CORE_ADDR))
{
- struct bsd_uthread_ops *ops = gdbarch_data (gdbarch, bsd_uthread_data);
+ struct bsd_uthread_ops *ops
+ = (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
+
ops->collect_uthread = collect_uthread;
}
@@ -161,7 +165,8 @@ static int
bsd_uthread_activate (struct objfile *objfile)
{
struct gdbarch *gdbarch = target_gdbarch ();
- struct bsd_uthread_ops *ops = gdbarch_data (gdbarch, bsd_uthread_data);
+ struct bsd_uthread_ops *ops
+ = (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
/* Skip if the thread stratum has already been activated. */
if (bsd_uthread_active)
@@ -283,7 +288,8 @@ bsd_uthread_fetch_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- struct bsd_uthread_ops *uthread_ops = gdbarch_data (gdbarch, bsd_uthread_data);
+ struct bsd_uthread_ops *uthread_ops
+ = (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
CORE_ADDR addr = ptid_get_tid (inferior_ptid);
struct target_ops *beneath = find_target_beneath (ops);
CORE_ADDR active_addr;
@@ -310,7 +316,8 @@ bsd_uthread_store_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- struct bsd_uthread_ops *uthread_ops = gdbarch_data (gdbarch, bsd_uthread_data);
+ struct bsd_uthread_ops *uthread_ops
+ = (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
struct target_ops *beneath = find_target_beneath (ops);
CORE_ADDR addr = ptid_get_tid (inferior_ptid);
CORE_ADDR active_addr;
diff --git a/gdb/btrace.c b/gdb/btrace.c
index 4292dc7..da0b517 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -1384,7 +1384,8 @@ check_xml_btrace_version (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC (gdb_xml_value_s) *attributes)
{
- const char *version = xml_find_attribute (attributes, "version")->value;
+ const char *version
+ = (const char *) xml_find_attribute (attributes, "version")->value;
if (strcmp (version, "1.0") != 0)
gdb_xml_error (parser, _("Unsupported btrace version: \"%s\""), version);
@@ -1401,7 +1402,7 @@ parse_xml_btrace_block (struct gdb_xml_parser *parser,
struct btrace_block *block;
ULONGEST *begin, *end;
- btrace = user_data;
+ btrace = (struct btrace_data *) user_data;
switch (btrace->format)
{
@@ -1417,8 +1418,8 @@ parse_xml_btrace_block (struct gdb_xml_parser *parser,
gdb_xml_error (parser, _("Btrace format error."));
}
- begin = xml_find_attribute (attributes, "begin")->value;
- end = xml_find_attribute (attributes, "end")->value;
+ begin = (long unsigned int *) xml_find_attribute (attributes, "begin")->value;
+ end = (long unsigned int *) xml_find_attribute (attributes, "end")->value;
block = VEC_safe_push (btrace_block_s, btrace->variant.bts.blocks, NULL);
block->begin = *begin;
@@ -1477,12 +1478,12 @@ parse_xml_btrace_pt_config_cpu (struct gdb_xml_parser *parser,
const char *vendor;
ULONGEST *family, *model, *stepping;
- vendor = xml_find_attribute (attributes, "vendor")->value;
- family = xml_find_attribute (attributes, "family")->value;
- model = xml_find_attribute (attributes, "model")->value;
- stepping = xml_find_attribute (attributes, "stepping")->value;
+ vendor = (const char *) xml_find_attribute (attributes, "vendor")->value;
+ family = (ULONGEST *) xml_find_attribute (attributes, "family")->value;
+ model = (ULONGEST *) xml_find_attribute (attributes, "model")->value;
+ stepping = (ULONGEST *) xml_find_attribute (attributes, "stepping")->value;
- btrace = user_data;
+ btrace = (struct btrace_data *) user_data;
if (strcmp (vendor, "GenuineIntel") == 0)
btrace->variant.pt.config.cpu.vendor = CV_INTEL;
@@ -1501,7 +1502,7 @@ parse_xml_btrace_pt_raw (struct gdb_xml_parser *parser,
{
struct btrace_data *btrace;
- btrace = user_data;
+ btrace = (struct btrace_data *) user_data;
parse_xml_raw (parser, body_text, &btrace->variant.pt.data,
&btrace->variant.pt.size);
}
@@ -1515,7 +1516,7 @@ parse_xml_btrace_pt (struct gdb_xml_parser *parser,
{
struct btrace_data *btrace;
- btrace = user_data;
+ btrace = (struct btrace_data *) user_data;
btrace->format = BTRACE_FORMAT_PT;
btrace->variant.pt.config.cpu.vendor = CV_UNKNOWN;
btrace->variant.pt.data = NULL;
@@ -1610,7 +1611,7 @@ parse_xml_btrace_conf_bts (struct gdb_xml_parser *parser,
struct btrace_config *conf;
struct gdb_xml_value *size;
- conf = user_data;
+ conf = (struct btrace_config *) user_data;
conf->format = BTRACE_FORMAT_BTS;
conf->bts.size = 0;
@@ -1629,7 +1630,7 @@ parse_xml_btrace_conf_pt (struct gdb_xml_parser *parser,
struct btrace_config *conf;
struct gdb_xml_value *size;
- conf = user_data;
+ conf = (struct btrace_config *) user_data;
conf->format = BTRACE_FORMAT_PT;
conf->pt.size = 0;
@@ -2250,7 +2251,7 @@ btrace_is_empty (struct thread_info *tp)
static void
do_btrace_data_cleanup (void *arg)
{
- btrace_data_fini (arg);
+ btrace_data_fini ((struct btrace_data *) arg);
}
/* See btrace.h. */
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index 708ace0..1af477c 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -50,7 +50,7 @@ static void c_type_print_modifier (struct type *,
static const char *
find_typedef_for_canonicalize (struct type *t, void *data)
{
- return find_typedef_in_hash (data, t);
+ return find_typedef_in_hash ((const struct type_print_options *) data, t);
}
/* Print NAME on STREAM. If the 'raw' field of FLAGS is not set,
diff --git a/gdb/charset.c b/gdb/charset.c
index afd9220..ee1ae20 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -468,7 +468,7 @@ host_hex_value (char c)
static void
cleanup_iconv (void *p)
{
- iconv_t *descp = p;
+ iconv_t *descp = (iconv_t *) p;
iconv_close (*descp);
}
@@ -617,7 +617,7 @@ make_wchar_iterator (const gdb_byte *input, size_t bytes,
static void
do_cleanup_iterator (void *p)
{
- struct wchar_iterator *iter = p;
+ struct wchar_iterator *iter = (struct wchar_iterator *) p;
iconv_close (iter->desc);
xfree (iter->out);
diff --git a/gdb/cli-out.c b/gdb/cli-out.c
index 2a83169..df26d3b 100644
--- a/gdb/cli-out.c
+++ b/gdb/cli-out.c
@@ -44,7 +44,7 @@ static void out_field_fmt (struct ui_out *uiout, int fldno,
static void
cli_uiout_dtor (struct ui_out *ui_out)
{
- cli_out_data *data = ui_out_data (ui_out);
+ cli_out_data *data = (cli_out_data *) ui_out_data (ui_out);
VEC_free (ui_filep, data->streams);
xfree (data);
@@ -59,7 +59,7 @@ cli_table_begin (struct ui_out *uiout, int nbrofcols,
int nr_rows,
const char *tblid)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (nr_rows == 0)
data->suppress_output = 1;
@@ -74,7 +74,7 @@ cli_table_begin (struct ui_out *uiout, int nbrofcols,
static void
cli_table_body (struct ui_out *uiout)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -87,7 +87,7 @@ cli_table_body (struct ui_out *uiout)
static void
cli_table_end (struct ui_out *uiout)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
data->suppress_output = 0;
}
@@ -99,7 +99,7 @@ cli_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
const char *col_name,
const char *colhdr)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -117,7 +117,7 @@ cli_begin (struct ui_out *uiout,
int level,
const char *id)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -130,7 +130,7 @@ cli_end (struct ui_out *uiout,
enum ui_out_type type,
int level)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -144,7 +144,7 @@ cli_field_int (struct ui_out *uiout, int fldno, int width,
const char *fldname, int value)
{
char buffer[20]; /* FIXME: how many chars long a %d can become? */
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -162,7 +162,7 @@ cli_field_skip (struct ui_out *uiout, int fldno, int width,
enum ui_align alignment,
const char *fldname)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -185,7 +185,7 @@ cli_field_string (struct ui_out *uiout,
{
int before = 0;
int after = 0;
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -233,7 +233,7 @@ cli_field_fmt (struct ui_out *uiout, int fldno,
const char *format,
va_list args)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
struct ui_file *stream;
if (data->suppress_output)
@@ -249,7 +249,7 @@ cli_field_fmt (struct ui_out *uiout, int fldno,
static void
cli_spaces (struct ui_out *uiout, int numspaces)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
struct ui_file *stream;
if (data->suppress_output)
@@ -262,7 +262,7 @@ cli_spaces (struct ui_out *uiout, int numspaces)
static void
cli_text (struct ui_out *uiout, const char *string)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
struct ui_file *stream;
if (data->suppress_output)
@@ -276,7 +276,7 @@ static void ATTRIBUTE_PRINTF (3, 0)
cli_message (struct ui_out *uiout, int verbosity,
const char *format, va_list args)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -292,7 +292,7 @@ cli_message (struct ui_out *uiout, int verbosity,
static void
cli_wrap_hint (struct ui_out *uiout, char *identstring)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -302,7 +302,7 @@ cli_wrap_hint (struct ui_out *uiout, char *identstring)
static void
cli_flush (struct ui_out *uiout)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
gdb_flush (stream);
@@ -315,7 +315,7 @@ cli_flush (struct ui_out *uiout)
static int
cli_redirect (struct ui_out *uiout, struct ui_file *outstream)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
if (outstream != NULL)
VEC_safe_push (ui_filep, data->streams, outstream);
@@ -336,7 +336,7 @@ out_field_fmt (struct ui_out *uiout, int fldno,
const char *fldname,
const char *format,...)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
va_list args;
@@ -351,7 +351,7 @@ out_field_fmt (struct ui_out *uiout, int fldno,
static void
field_separator (void)
{
- cli_out_data *data = ui_out_data (current_uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (current_uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
fputc_filtered (' ', stream);
@@ -409,7 +409,7 @@ cli_out_new (struct ui_file *stream)
struct ui_file *
cli_out_set_stream (struct ui_out *uiout, struct ui_file *stream)
{
- cli_out_data *data = ui_out_data (uiout);
+ cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
struct ui_file *old;
old = VEC_pop (ui_filep, data->streams);
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 424bf5e..6753c70 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -1554,8 +1554,8 @@ ambiguous_line_spec (struct symtabs_and_lines *sals)
static int
compare_symtabs (const void *a, const void *b)
{
- const struct symtab_and_line *sala = a;
- const struct symtab_and_line *salb = b;
+ const struct symtab_and_line *sala = (const struct symtab_and_line *) a;
+ const struct symtab_and_line *salb = (const struct symtab_and_line *) b;
const char *dira = SYMTAB_DIRNAME (sala->symtab);
const char *dirb = SYMTAB_DIRNAME (salb->symtab);
int r;
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index aabe3e3..931bb4a 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -392,7 +392,7 @@ struct dump_context
static void
call_dump_func (struct cmd_list_element *c, char *args, int from_tty)
{
- struct dump_context *d = get_cmd_context (c);
+ struct dump_context *d = (struct dump_context *) get_cmd_context (c);
d->func (args, d->mode);
}
@@ -447,7 +447,7 @@ struct callback_data {
static void
restore_section_callback (bfd *ibfd, asection *isec, void *args)
{
- struct callback_data *data = args;
+ struct callback_data *data = (struct callback_data *) args;
bfd_vma sec_start = bfd_section_vma (ibfd, isec);
bfd_size_type size = bfd_section_size (ibfd, isec);
bfd_vma sec_end = sec_start + size;
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 624a493..6a3c068 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -307,7 +307,7 @@ print_command_lines (struct ui_out *uiout, struct command_line *cmd,
static void
clear_hook_in_cleanup (void *data)
{
- struct cmd_list_element *c = data;
+ struct cmd_list_element *c = (struct cmd_list_element *) data;
c->hook_in = 0; /* Allow hook to work again once it is complete. */
}
@@ -341,7 +341,7 @@ execute_cmd_post_hook (struct cmd_list_element *c)
static void
do_restore_user_call_depth (void * call_depth)
{
- int *depth = call_depth;
+ int *depth = (int *) call_depth;
(*depth)--;
if ((*depth) == 0)
@@ -1390,7 +1390,7 @@ free_command_lines (struct command_line **lptr)
static void
do_free_command_lines_cleanup (void *arg)
{
- free_command_lines (arg);
+ free_command_lines ((struct command_line **) arg);
}
struct cleanup *
diff --git a/gdb/coff-pe-read.c b/gdb/coff-pe-read.c
index 2d780b9..a7e4f2b 100644
--- a/gdb/coff-pe-read.c
+++ b/gdb/coff-pe-read.c
@@ -125,7 +125,7 @@ struct pe_sections_info
static void
get_section_vmas (bfd *abfd, asection *sectp, void *context)
{
- struct pe_sections_info *data = context;
+ struct pe_sections_info *data = (struct pe_sections_info *) context;
struct read_pe_section_data *sections = data->sections;
int sectix = get_pe_section_index (sectp->name, sections,
data->nb_sections);
@@ -313,7 +313,7 @@ pe_get32 (bfd *abfd, int where)
static unsigned int
pe_as16 (void *ptr)
{
- unsigned char *b = ptr;
+ unsigned char *b = (unsigned char *) ptr;
return b[0] + (b[1] << 8);
}
@@ -321,7 +321,7 @@ pe_as16 (void *ptr)
static unsigned int
pe_as32 (void *ptr)
{
- unsigned char *b = ptr;
+ unsigned char *b = (unsigned char *) ptr;
return b[0] + (b[1] << 8) + (b[2] << 16) + (b[3] << 24);
}
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 9d20eebdc..ba94421 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -572,7 +572,8 @@ coff_symfile_read (struct objfile *objfile, int symfile_flags)
struct cleanup *back_to, *cleanup_minimal_symbols;
int stabstrsize;
- info = objfile_data (objfile, coff_objfile_data_key);
+ info = (struct coff_symfile_info *) objfile_data (objfile,
+ coff_objfile_data_key);
dbxinfo = DBX_SYMFILE_INFO (objfile);
symfile_bfd = abfd; /* Kludge for swap routines. */
diff --git a/gdb/common/agent.c b/gdb/common/agent.c
index 5bb18641..5c30729 100644
--- a/gdb/common/agent.c
+++ b/gdb/common/agent.c
@@ -93,9 +93,10 @@ agent_look_up_symbols (void *arg)
{
CORE_ADDR *addrp =
(CORE_ADDR *) ((char *) &ipa_sym_addrs + symbol_list[i].offset);
+ struct objfile *objfile = (struct objfile *) arg;
if (find_minimal_symbol_address (symbol_list[i].name, addrp,
- arg) != 0)
+ objfile) != 0)
{
DEBUG_AGENT ("symbol `%s' not found\n", symbol_list[i].name);
return -1;
diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c
index 4348527..798a411 100644
--- a/gdb/common/filestuff.c
+++ b/gdb/common/filestuff.c
@@ -410,7 +410,7 @@ gdb_pipe_cloexec (int filedes[2])
static void
do_close_cleanup (void *arg)
{
- int *fd = arg;
+ int *fd = (int *) arg;
close (*fd);
}
diff --git a/gdb/common/format.c b/gdb/common/format.c
index 52c6b81..65c1fb4 100644
--- a/gdb/common/format.c
+++ b/gdb/common/format.c
@@ -381,7 +381,7 @@ free_format_pieces (struct format_piece *pieces)
void
free_format_pieces_cleanup (void *ptr)
{
- void **location = ptr;
+ struct format_piece **location = (struct format_piece **) ptr;
if (location == NULL)
return;
diff --git a/gdb/common/vec.c b/gdb/common/vec.c
index ce7bc6e..6b7f25e 100644
--- a/gdb/common/vec.c
+++ b/gdb/common/vec.c
@@ -90,7 +90,7 @@ vec_p_reserve (void *vec, int reserve)
void *
vec_o_reserve (void *vec, int reserve, size_t vec_offset, size_t elt_size)
{
- struct vec_prefix *pfx = vec;
+ struct vec_prefix *pfx = (struct vec_prefix *) vec;
unsigned alloc = calculate_allocation (pfx, reserve);
if (!alloc)
diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c
index 39f06c6..07f0fbd 100644
--- a/gdb/compile/compile-c-support.c
+++ b/gdb/compile/compile-c-support.c
@@ -124,7 +124,7 @@ print_one_macro (const char *name, const struct macro_definition *macro,
struct macro_source_file *source, int line,
void *user_data)
{
- struct ui_file *file = user_data;
+ struct ui_file *file = (struct ui_file *) user_data;
/* Don't print command-line defines. They will be supplied another
way. */
diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c
index 355b063..f5ca15c 100644
--- a/gdb/compile/compile-c-symbols.c
+++ b/gdb/compile/compile-c-symbols.c
@@ -51,7 +51,7 @@ struct symbol_error
static hashval_t
hash_symbol_error (const void *a)
{
- const struct symbol_error *se = a;
+ const struct symbol_error *se = (const struct symbol_error *) a;
return htab_hash_pointer (se->sym);
}
@@ -61,8 +61,8 @@ hash_symbol_error (const void *a)
static int
eq_symbol_error (const void *a, const void *b)
{
- const struct symbol_error *sea = a;
- const struct symbol_error *seb = b;
+ const struct symbol_error *sea = (const struct symbol_error *) a;
+ const struct symbol_error *seb = (const struct symbol_error *) b;
return sea->sym == seb->sym;
}
@@ -72,7 +72,7 @@ eq_symbol_error (const void *a, const void *b)
static void
del_symbol_error (void *a)
{
- struct symbol_error *se = a;
+ struct symbol_error *se = (struct symbol_error *) a;
xfree (se->message);
xfree (se);
@@ -113,7 +113,7 @@ error_symbol_once (struct compile_c_instance *context,
return;
search.sym = sym;
- err = htab_find (context->symbol_err_map, &search);
+ err = (struct symbol_error *) htab_find (context->symbol_err_map, &search);
if (err == NULL || err->message == NULL)
return;
@@ -421,7 +421,7 @@ gcc_convert_symbol (void *datum,
enum gcc_c_oracle_request request,
const char *identifier)
{
- struct compile_c_instance *context = datum;
+ struct compile_c_instance *context = (struct compile_c_instance *) datum;
domain_enum domain;
int found = 0;
@@ -484,7 +484,7 @@ gcc_address
gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
const char *identifier)
{
- struct compile_c_instance *context = datum;
+ struct compile_c_instance *context = (struct compile_c_instance *) datum;
gcc_address result = 0;
int found = 0;
@@ -547,7 +547,7 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
static hashval_t
hash_symname (const void *a)
{
- const struct symbol *sym = a;
+ const struct symbol *sym = (const struct symbol *) a;
return htab_hash_string (SYMBOL_NATURAL_NAME (sym));
}
@@ -558,8 +558,8 @@ hash_symname (const void *a)
static int
eq_symname (const void *a, const void *b)
{
- const struct symbol *syma = a;
- const struct symbol *symb = b;
+ const struct symbol *syma = (const struct symbol *) a;
+ const struct symbol *symb = (const struct symbol *) b;
return strcmp (SYMBOL_NATURAL_NAME (syma), SYMBOL_NATURAL_NAME (symb)) == 0;
}
diff --git a/gdb/compile/compile-c-types.c b/gdb/compile/compile-c-types.c
index 77fbd68..60f9bd4 100644
--- a/gdb/compile/compile-c-types.c
+++ b/gdb/compile/compile-c-types.c
@@ -39,7 +39,7 @@ struct type_map_instance
static hashval_t
hash_type_map_instance (const void *p)
{
- const struct type_map_instance *inst = p;
+ const struct type_map_instance *inst = (const struct type_map_instance *) p;
return htab_hash_pointer (inst->type);
}
@@ -49,8 +49,8 @@ hash_type_map_instance (const void *p)
static int
eq_type_map_instance (const void *a, const void *b)
{
- const struct type_map_instance *insta = a;
- const struct type_map_instance *instb = b;
+ const struct type_map_instance *insta = (const struct type_map_instance *) a;
+ const struct type_map_instance *instb = (const struct type_map_instance *) b;
return insta->type == instb->type;
}
@@ -75,7 +75,7 @@ insert_type (struct compile_c_instance *context, struct type *type,
inst.gcc_type = gcc_type;
slot = htab_find_slot (context->type_map, &inst, INSERT);
- add = *slot;
+ add = (struct type_map_instance *) *slot;
/* The type might have already been inserted in order to handle
recursive types. */
if (add != NULL && add->gcc_type != gcc_type)
@@ -386,7 +386,7 @@ convert_type (struct compile_c_instance *context, struct type *type)
type = check_typedef (type);
inst.type = type;
- found = htab_find (context->type_map, &inst);
+ found = (struct type_map_instance *) htab_find (context->type_map, &inst);
if (found != NULL)
return found->gcc_type;
diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c
index ea1a19a..ce30e70 100644
--- a/gdb/compile/compile-object-load.c
+++ b/gdb/compile/compile-object-load.c
@@ -79,7 +79,7 @@ munmap_list_free (struct munmap_list *head)
static void
munmap_listp_free_cleanup (void *headp_voidp)
{
- struct munmap_list **headp = headp_voidp;
+ struct munmap_list **headp = (struct munmap_list **) headp_voidp;
munmap_list_free (*headp);
}
@@ -111,7 +111,7 @@ struct setup_sections_data
static void
setup_sections (bfd *abfd, asection *sect, void *data_voidp)
{
- struct setup_sections_data *data = data_voidp;
+ struct setup_sections_data *data = (struct setup_sections_data *) data_voidp;
CORE_ADDR alignment;
unsigned prot;
@@ -336,7 +336,8 @@ struct link_hash_table_cleanup_data
static void
link_hash_table_free (void *d)
{
- struct link_hash_table_cleanup_data *data = d;
+ struct link_hash_table_cleanup_data *data
+ = (struct link_hash_table_cleanup_data *) d;
if (data->abfd->is_linker_output)
(*data->abfd->link.hash->hash_table_free) (data->abfd);
@@ -348,7 +349,7 @@ link_hash_table_free (void *d)
static void
copy_sections (bfd *abfd, asection *sect, void *data)
{
- asymbol **symbol_table = data;
+ asymbol **symbol_table = (asymbol **) data;
bfd_byte *sect_data, *sect_data_got;
struct cleanup *cleanups;
struct bfd_link_info link_info;
diff --git a/gdb/compile/compile-object-run.c b/gdb/compile/compile-object-run.c
index 6bc96b9..e5d2b643 100644
--- a/gdb/compile/compile-object-run.c
+++ b/gdb/compile/compile-object-run.c
@@ -61,7 +61,7 @@ static dummy_frame_dtor_ftype do_module_cleanup;
static void
do_module_cleanup (void *arg, int registers_valid)
{
- struct do_module_cleanup *data = arg;
+ struct do_module_cleanup *data = (struct do_module_cleanup *) arg;
struct objfile *objfile;
if (data->executedp != NULL)
diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
index 3d710ed..7560028 100644
--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -169,7 +169,7 @@ compile_code_command (char *arg, int from_tty)
void
compile_print_value (struct value *val, void *data_voidp)
{
- const struct format_data *fmtp = data_voidp;
+ const struct format_data *fmtp = (const struct format_data *) data_voidp;
print_value (val, fmtp);
}
@@ -214,7 +214,7 @@ compile_print_command (char *arg_param, int from_tty)
static void
do_rmdir (void *arg)
{
- const char *dir = arg;
+ const char *dir = (const char *) arg;
char *zap;
int wstat;
@@ -431,7 +431,7 @@ get_args (const struct compile_instance *compiler, struct gdbarch *gdbarch,
static void
cleanup_compile_instance (void *arg)
{
- struct compile_instance *inst = arg;
+ struct compile_instance *inst = (struct compile_instance *) arg;
inst->destroy (inst);
}
@@ -441,7 +441,7 @@ cleanup_compile_instance (void *arg)
static void
cleanup_unlink_file (void *arg)
{
- const char *filename = arg;
+ const char *filename = (const char *) arg;
unlink (filename);
}
diff --git a/gdb/completer.c b/gdb/completer.c
index f13289a..210a078 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -985,7 +985,7 @@ new_completion_tracker (void)
static void
free_completion_tracker (void *p)
{
- completion_tracker_t *tracker_ptr = p;
+ completion_tracker_t *tracker_ptr = (completion_tracker_t *) p;
htab_delete (*tracker_ptr);
*tracker_ptr = NULL;
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 5462e02..f7a8bb3 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -656,7 +656,7 @@ struct spuid_list
static void
add_to_spuid_list (bfd *abfd, asection *asect, void *list_p)
{
- struct spuid_list *list = list_p;
+ struct spuid_list *list = (struct spuid_list *) list_p;
enum bfd_endian byte_order
= bfd_big_endian (abfd) ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE;
int fd, pos = 0;
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index acd4845..989544b 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -343,7 +343,7 @@ cp_lookup_symbol_in_namespace (const char *the_namespace, const char *name,
static void
reset_directive_searched (void *data)
{
- struct using_direct *direct = data;
+ struct using_direct *direct = (struct using_direct *) data;
direct->searched = 0;
}
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 0e3c948..a14455a 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -1339,7 +1339,7 @@ make_symbol_overload_list_adl (struct type **arg_types, int nargs,
static void
reset_directive_searched (void *data)
{
- struct using_direct *direct = data;
+ struct using_direct *direct = (struct using_direct *) data;
direct->searched = 0;
}
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 88a6441..73e4048 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -320,7 +320,7 @@ cris_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
int i;
if ((*this_cache))
- return (*this_cache);
+ return (struct cris_unwind_cache *) (*this_cache);
info = FRAME_OBSTACK_ZALLOC (struct cris_unwind_cache);
(*this_cache) = info;
@@ -704,7 +704,7 @@ cris_frame_unwind_cache (struct frame_info *this_frame,
struct cris_unwind_cache *info;
if ((*this_prologue_cache))
- return (*this_prologue_cache);
+ return (struct cris_unwind_cache *) (*this_prologue_cache);
info = FRAME_OBSTACK_ZALLOC (struct cris_unwind_cache);
(*this_prologue_cache) = info;
diff --git a/gdb/d-lang.c b/gdb/d-lang.c
index 2fc5080..0fbc2fa 100644
--- a/gdb/d-lang.c
+++ b/gdb/d-lang.c
@@ -322,7 +322,7 @@ static struct gdbarch_data *d_type_data;
const struct builtin_d_type *
builtin_d_type (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, d_type_data);
+ return (const struct builtin_d_type *) gdbarch_data (gdbarch, d_type_data);
}
/* Provide a prototype to silence -Wmissing-prototypes. */
diff --git a/gdb/d-namespace.c b/gdb/d-namespace.c
index e142e11..9e00710 100644
--- a/gdb/d-namespace.c
+++ b/gdb/d-namespace.c
@@ -356,7 +356,7 @@ d_lookup_nested_symbol (struct type *parent_type,
static void
reset_directive_searched (void *data)
{
- struct using_direct *direct = data;
+ struct using_direct *direct = (struct using_direct *) data;
direct->searched = 0;
}
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 1f003b2..7f422ad 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -729,7 +729,7 @@ dbx_symfile_finish (struct objfile *objfile)
static void
dbx_free_symfile_info (struct objfile *objfile, void *arg)
{
- struct dbx_symfile_info *dbx = arg;
+ struct dbx_symfile_info *dbx = (struct dbx_symfile_info *) arg;
if (dbx->header_files != NULL)
{
@@ -942,7 +942,7 @@ free_bincl_list (struct objfile *objfile)
static void
do_free_bincl_list_cleanup (void *objfile)
{
- free_bincl_list (objfile);
+ free_bincl_list ((struct objfile *) objfile);
}
static struct cleanup *
diff --git a/gdb/disasm.c b/gdb/disasm.c
index 2b65c6a..6e3d6c1 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -59,7 +59,7 @@ struct dis_line_entry
static hashval_t
hash_dis_line_entry (const void *item)
{
- const struct dis_line_entry *dle = item;
+ const struct dis_line_entry *dle = (const struct dis_line_entry *) item;
return htab_hash_pointer (dle->symtab) + dle->line;
}
@@ -69,8 +69,8 @@ hash_dis_line_entry (const void *item)
static int
eq_dis_line_entry (const void *item_lhs, const void *item_rhs)
{
- const struct dis_line_entry *lhs = item_lhs;
- const struct dis_line_entry *rhs = item_rhs;
+ const struct dis_line_entry *lhs = (const struct dis_line_entry *) item_lhs;
+ const struct dis_line_entry *rhs = (const struct dis_line_entry *) item_rhs;
return (lhs->symtab == rhs->symtab
&& lhs->line == rhs->line);
@@ -139,9 +139,9 @@ dis_asm_memory_error (int status, bfd_vma memaddr,
static void
dis_asm_print_address (bfd_vma addr, struct disassemble_info *info)
{
- struct gdbarch *gdbarch = info->application_data;
+ struct gdbarch *gdbarch = (struct gdbarch *) info->application_data;
- print_address (gdbarch, addr, info->stream);
+ print_address (gdbarch, addr, (struct ui_file *) info->stream);
}
static int
@@ -713,7 +713,7 @@ fprintf_disasm (void *stream, const char *format, ...)
va_list args;
va_start (args, format);
- vfprintf_filtered (stream, format, args);
+ vfprintf_filtered ((struct ui_file *) stream, format, args);
va_end (args);
/* Something non -ve. */
return 0;
@@ -806,7 +806,7 @@ gdb_print_insn (struct gdbarch *gdbarch, CORE_ADDR memaddr,
static void
do_ui_file_delete (void *arg)
{
- ui_file_delete (arg);
+ ui_file_delete ((struct ui_file *) arg);
}
/* Return the length in bytes of the instruction at address MEMADDR in
diff --git a/gdb/doublest.c b/gdb/doublest.c
index e8e39af..0babb10 100644
--- a/gdb/doublest.c
+++ b/gdb/doublest.c
@@ -183,7 +183,7 @@ convert_floatformat_to_doublest (const struct floatformat *fmt,
/* For non-numbers, reuse libiberty's logic to find the correct
format. We do not lose any precision in this case by passing
through a double. */
- kind = floatformat_classify (fmt, from);
+ kind = floatformat_classify (fmt, (const bfd_byte *) from);
if (kind == float_infinite || kind == float_nan)
{
double dto;
diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c
index b6993a2..2aacf5b 100644
--- a/gdb/dummy-frame.c
+++ b/gdb/dummy-frame.c
@@ -128,7 +128,7 @@ remove_dummy_frame (struct dummy_frame **dummy_ptr)
static int
pop_dummy_frame_bpt (struct breakpoint *b, void *dummy_voidp)
{
- struct dummy_frame *dummy = dummy_voidp;
+ struct dummy_frame *dummy = (struct dummy_frame *) dummy_voidp;
if (b->thread == pid_to_thread_id (dummy->id.ptid)
&& b->disposition == disp_del && frame_id_eq (b->frame_id, dummy->id.id))
@@ -337,7 +337,8 @@ dummy_frame_prev_register (struct frame_info *this_frame,
void **this_prologue_cache,
int regnum)
{
- struct dummy_frame_cache *cache = (*this_prologue_cache);
+ struct dummy_frame_cache *cache
+ = (struct dummy_frame_cache *) *this_prologue_cache;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct value *reg_val;
@@ -367,7 +368,8 @@ dummy_frame_this_id (struct frame_info *this_frame,
struct frame_id *this_id)
{
/* The dummy-frame sniffer always fills in the cache. */
- struct dummy_frame_cache *cache = (*this_prologue_cache);
+ struct dummy_frame_cache *cache
+ = (struct dummy_frame_cache *) *this_prologue_cache;
gdb_assert (cache != NULL);
(*this_id) = cache->this_id;
diff --git a/gdb/dwarf2-frame-tailcall.c b/gdb/dwarf2-frame-tailcall.c
index e4a8112..952bc14 100644
--- a/gdb/dwarf2-frame-tailcall.c
+++ b/gdb/dwarf2-frame-tailcall.c
@@ -68,7 +68,7 @@ struct tailcall_cache
static hashval_t
cache_hash (const void *arg)
{
- const struct tailcall_cache *cache = arg;
+ const struct tailcall_cache *cache = (const struct tailcall_cache *) arg;
return htab_hash_pointer (cache->next_bottom_frame);
}
@@ -78,8 +78,8 @@ cache_hash (const void *arg)
static int
cache_eq (const void *arg1, const void *arg2)
{
- const struct tailcall_cache *cache1 = arg1;
- const struct tailcall_cache *cache2 = arg2;
+ const struct tailcall_cache *cache1 = (const struct tailcall_cache *) arg1;
+ const struct tailcall_cache *cache2 = (const struct tailcall_cache *) arg2;
return cache1->next_bottom_frame == cache2->next_bottom_frame;
}
@@ -160,7 +160,7 @@ cache_find (struct frame_info *fi)
if (slot == NULL)
return NULL;
- cache = *slot;
+ cache = (struct tailcall_cache *) *slot;
gdb_assert (cache != NULL);
return cache;
}
@@ -209,7 +209,7 @@ static void
tailcall_frame_this_id (struct frame_info *this_frame, void **this_cache,
struct frame_id *this_id)
{
- struct tailcall_cache *cache = *this_cache;
+ struct tailcall_cache *cache = (struct tailcall_cache *) *this_cache;
struct frame_info *next_frame;
/* Tail call does not make sense for a sentinel frame. */
@@ -264,7 +264,7 @@ dwarf2_tailcall_prev_register_first (struct frame_info *this_frame,
void **tailcall_cachep, int regnum)
{
struct gdbarch *this_gdbarch = get_frame_arch (this_frame);
- struct tailcall_cache *cache = *tailcall_cachep;
+ struct tailcall_cache *cache = (struct tailcall_cache *) *tailcall_cachep;
CORE_ADDR addr;
if (regnum == gdbarch_pc_regnum (this_gdbarch))
@@ -293,7 +293,7 @@ static struct value *
tailcall_frame_prev_register (struct frame_info *this_frame,
void **this_cache, int regnum)
{
- struct tailcall_cache *cache = *this_cache;
+ struct tailcall_cache *cache = (struct tailcall_cache *) *this_cache;
struct value *val;
gdb_assert (this_frame != cache->next_bottom_frame);
@@ -430,7 +430,7 @@ dwarf2_tailcall_sniffer_first (struct frame_info *this_frame,
static void
tailcall_frame_dealloc_cache (struct frame_info *self, void *this_cache)
{
- struct tailcall_cache *cache = this_cache;
+ struct tailcall_cache *cache = (struct tailcall_cache *) this_cache;
cache_unref (cache);
}
@@ -442,7 +442,7 @@ static struct gdbarch *
tailcall_frame_prev_arch (struct frame_info *this_frame,
void **this_prologue_cache)
{
- struct tailcall_cache *cache = *this_prologue_cache;
+ struct tailcall_cache *cache = (struct tailcall_cache *) *this_prologue_cache;
return get_frame_arch (cache->next_bottom_frame);
}
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index 0613d06..200b044 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -275,7 +275,7 @@ dwarf2_frame_state_free_regs (struct dwarf2_frame_state_reg_info *rs)
static void
dwarf2_frame_state_free (void *p)
{
- struct dwarf2_frame_state *fs = p;
+ struct dwarf2_frame_state *fs = (struct dwarf2_frame_state *) p;
dwarf2_frame_state_free_regs (fs->initial.prev);
dwarf2_frame_state_free_regs (fs->regs.prev);
@@ -782,7 +782,8 @@ dwarf2_frame_set_init_reg (struct gdbarch *gdbarch,
struct dwarf2_frame_state_reg *,
struct frame_info *))
{
- struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+ struct dwarf2_frame_ops *ops
+ = (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
ops->init_reg = init_reg;
}
@@ -794,7 +795,8 @@ dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
struct dwarf2_frame_state_reg *reg,
struct frame_info *this_frame)
{
- struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+ struct dwarf2_frame_ops *ops
+ = (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
ops->init_reg (gdbarch, regnum, reg, this_frame);
}
@@ -807,7 +809,8 @@ dwarf2_frame_set_signal_frame_p (struct gdbarch *gdbarch,
int (*signal_frame_p) (struct gdbarch *,
struct frame_info *))
{
- struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+ struct dwarf2_frame_ops *ops
+ = (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
ops->signal_frame_p = signal_frame_p;
}
@@ -819,7 +822,8 @@ static int
dwarf2_frame_signal_frame_p (struct gdbarch *gdbarch,
struct frame_info *this_frame)
{
- struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+ struct dwarf2_frame_ops *ops
+ = (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
if (ops->signal_frame_p == NULL)
return 0;
@@ -834,7 +838,8 @@ dwarf2_frame_set_adjust_regnum (struct gdbarch *gdbarch,
int (*adjust_regnum) (struct gdbarch *,
int, int))
{
- struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+ struct dwarf2_frame_ops *ops
+ = (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
ops->adjust_regnum = adjust_regnum;
}
@@ -846,7 +851,8 @@ static int
dwarf2_frame_adjust_regnum (struct gdbarch *gdbarch,
int regnum, int eh_frame_p)
{
- struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+ struct dwarf2_frame_ops *ops
+ = (struct dwarf2_frame_ops *) gdbarch_data (gdbarch, dwarf2_frame_data);
if (ops->adjust_regnum == NULL)
return regnum;
@@ -1010,7 +1016,7 @@ struct dwarf2_frame_cache
static void
clear_pointer_cleanup (void *arg)
{
- void **ptr = arg;
+ void **ptr = (void **) arg;
*ptr = NULL;
}
@@ -1029,7 +1035,7 @@ dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache)
const gdb_byte *instr;
if (*this_cache)
- return *this_cache;
+ return (struct dwarf2_frame_cache *) *this_cache;
/* Allocate a new cache. */
cache = FRAME_OBSTACK_ZALLOC (struct dwarf2_frame_cache);
@@ -1720,8 +1726,9 @@ find_cie (struct dwarf2_cie_table *cie_table, ULONGEST cie_pointer)
return NULL;
}
- p_cie = bsearch (&cie_pointer, cie_table->entries, cie_table->num_entries,
- sizeof (cie_table->entries[0]), bsearch_cie_cmp);
+ p_cie = ((struct dwarf2_cie **)
+ bsearch (&cie_pointer, cie_table->entries, cie_table->num_entries,
+ sizeof (cie_table->entries[0]), bsearch_cie_cmp));
if (p_cie != NULL)
return *p_cie;
return NULL;
@@ -1770,11 +1777,13 @@ dwarf2_frame_find_fde (CORE_ADDR *pc, CORE_ADDR *out_offset)
CORE_ADDR offset;
CORE_ADDR seek_pc;
- fde_table = objfile_data (objfile, dwarf2_frame_objfile_data);
+ fde_table = ((struct dwarf2_fde_table *)
+ objfile_data (objfile, dwarf2_frame_objfile_data));
if (fde_table == NULL)
{
dwarf2_build_frame_info (objfile);
- fde_table = objfile_data (objfile, dwarf2_frame_objfile_data);
+ fde_table = ((struct dwarf2_fde_table *)
+ objfile_data (objfile, dwarf2_frame_objfile_data));
}
gdb_assert (fde_table != NULL);
@@ -1789,8 +1798,9 @@ dwarf2_frame_find_fde (CORE_ADDR *pc, CORE_ADDR *out_offset)
continue;
seek_pc = *pc - offset;
- p_fde = bsearch (&seek_pc, fde_table->entries, fde_table->num_entries,
- sizeof (fde_table->entries[0]), bsearch_fde_cmp);
+ p_fde = ((struct dwarf2_fde **)
+ bsearch (&seek_pc, fde_table->entries, fde_table->num_entries,
+ sizeof (fde_table->entries[0]), bsearch_fde_cmp));
if (p_fde != NULL)
{
*pc = (*p_fde)->initial_location + offset;
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index 819a5f1..2ac60b7 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -64,8 +64,9 @@ dwarf_gdbarch_types_init (struct gdbarch *gdbarch)
static struct type *
dwarf_expr_address_type (struct dwarf_expr_context *ctx)
{
- struct dwarf_gdbarch_types *types = gdbarch_data (ctx->gdbarch,
- dwarf_arch_cookie);
+ struct dwarf_gdbarch_types *types
+ = (struct dwarf_gdbarch_types *) gdbarch_data (ctx->gdbarch,
+ dwarf_arch_cookie);
int ndx;
if (ctx->addr_size == 2)
@@ -119,7 +120,7 @@ free_dwarf_expr_context (struct dwarf_expr_context *ctx)
static void
free_dwarf_expr_context_cleanup (void *arg)
{
- free_dwarf_expr_context (arg);
+ free_dwarf_expr_context ((struct dwarf_expr_context *) arg);
}
/* Return a cleanup that calls free_dwarf_expr_context. */
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index c2c0c59..3e652f9 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -375,7 +375,8 @@ static void
locexpr_find_frame_base_location (struct symbol *framefunc, CORE_ADDR pc,
const gdb_byte **start, size_t *length)
{
- struct dwarf2_locexpr_baton *symbaton = SYMBOL_LOCATION_BATON (framefunc);
+ struct dwarf2_locexpr_baton *symbaton
+ = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (framefunc);
*length = symbaton->size;
*start = symbaton->data;
@@ -401,7 +402,7 @@ locexpr_get_frame_base (struct symbol *framefunc, struct frame_info *frame)
gdbarch = get_frame_arch (frame);
type = builtin_type (gdbarch)->builtin_data_ptr;
- dlbaton = SYMBOL_LOCATION_BATON (framefunc);
+ dlbaton = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (framefunc);
SYMBOL_BLOCK_OPS (framefunc)->find_frame_base_location
(framefunc, get_frame_pc (frame), &start, &length);
@@ -432,7 +433,8 @@ static void
loclist_find_frame_base_location (struct symbol *framefunc, CORE_ADDR pc,
const gdb_byte **start, size_t *length)
{
- struct dwarf2_loclist_baton *symbaton = SYMBOL_LOCATION_BATON (framefunc);
+ struct dwarf2_loclist_baton *symbaton
+ = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (framefunc);
*start = dwarf2_find_location_expression (symbaton, length, pc);
}
@@ -457,7 +459,7 @@ loclist_get_frame_base (struct symbol *framefunc, struct frame_info *frame)
gdbarch = get_frame_arch (frame);
type = builtin_type (gdbarch)->builtin_data_ptr;
- dlbaton = SYMBOL_LOCATION_BATON (framefunc);
+ dlbaton = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (framefunc);
SYMBOL_BLOCK_OPS (framefunc)->find_frame_base_location
(framefunc, get_frame_pc (frame), &start, &length);
@@ -559,7 +561,7 @@ per_cu_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset,
static void
dwarf_expr_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset)
{
- struct dwarf_expr_baton *debaton = ctx->baton;
+ struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) ctx->baton;
per_cu_dwarf_call (ctx, die_offset, debaton->per_cu,
ctx->funcs->get_frame_pc, ctx->baton);
@@ -571,7 +573,7 @@ static struct type *
dwarf_expr_get_base_type (struct dwarf_expr_context *ctx,
cu_offset die_offset)
{
- struct dwarf_expr_baton *debaton = ctx->baton;
+ struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) ctx->baton;
return dwarf2_get_die_type (die_offset, debaton->per_cu);
}
@@ -1263,7 +1265,7 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
size_t size;
gdb_assert (ctx->funcs == &dwarf_expr_ctx_funcs);
- debaton = ctx->baton;
+ debaton = (struct dwarf_expr_baton *) ctx->baton;
frame = debaton->frame;
caller_frame = get_prev_frame (frame);
@@ -1315,7 +1317,7 @@ dwarf_expr_get_addr_index (void *baton, unsigned int index)
static CORE_ADDR
dwarf_expr_get_obj_addr (void *baton)
{
- struct dwarf_expr_baton *debaton = baton;
+ struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton;
gdb_assert (debaton != NULL);
@@ -1338,7 +1340,7 @@ entry_data_value_coerce_ref (const struct value *value)
if (TYPE_CODE (checked_type) != TYPE_CODE_REF)
return NULL;
- target_val = value_computed_closure (value);
+ target_val = (struct value *) value_computed_closure (value);
value_incref (target_val);
return target_val;
}
@@ -1348,7 +1350,7 @@ entry_data_value_coerce_ref (const struct value *value)
static void *
entry_data_value_copy_closure (const struct value *v)
{
- struct value *target_val = value_computed_closure (v);
+ struct value *target_val = (struct value *) value_computed_closure (v);
value_incref (target_val);
return target_val;
@@ -1359,7 +1361,7 @@ entry_data_value_copy_closure (const struct value *v)
static void
entry_data_value_free_closure (struct value *v)
{
- struct value *target_val = value_computed_closure (v);
+ struct value *target_val = (struct value *) value_computed_closure (v);
value_free (target_val);
}
@@ -2068,7 +2070,7 @@ check_pieced_synthetic_pointer (const struct value *value, int bit_offset,
static CORE_ADDR
get_frame_address_in_block_wrapper (void *baton)
{
- return get_frame_address_in_block (baton);
+ return get_frame_address_in_block ((struct frame_info *) baton);
}
/* An implementation of an lval_funcs method to indirect through a
@@ -2549,7 +2551,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
{
case PROP_LOCEXPR:
{
- const struct dwarf2_property_baton *baton = prop->data.baton;
+ const struct dwarf2_property_baton *baton
+ = (const struct dwarf2_property_baton *) prop->data.baton;
if (dwarf2_locexpr_baton_eval (&baton->locexpr, frame,
addr_stack ? addr_stack->addr : 0,
@@ -2568,7 +2571,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
case PROP_LOCLIST:
{
- struct dwarf2_property_baton *baton = prop->data.baton;
+ struct dwarf2_property_baton *baton
+ = (struct dwarf2_property_baton *) prop->data.baton;
CORE_ADDR pc = get_frame_address_in_block (frame);
const gdb_byte *data;
struct value *val;
@@ -2594,7 +2598,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
case PROP_ADDR_OFFSET:
{
- struct dwarf2_property_baton *baton = prop->data.baton;
+ struct dwarf2_property_baton *baton
+ = (struct dwarf2_property_baton *) prop->data.baton;
struct property_addr_info *pinfo;
struct value *val;
@@ -2629,7 +2634,8 @@ dwarf2_compile_property_to_c (struct ui_file *stream,
CORE_ADDR pc,
struct symbol *sym)
{
- struct dwarf2_property_baton *baton = prop->data.baton;
+ struct dwarf2_property_baton *baton
+ = (struct dwarf2_property_baton *) prop->data.baton;
const gdb_byte *data;
size_t size;
struct dwarf2_per_cu_data *per_cu;
@@ -2667,7 +2673,7 @@ struct needs_frame_baton
static CORE_ADDR
needs_frame_read_addr_from_reg (void *baton, int regnum)
{
- struct needs_frame_baton *nf_baton = baton;
+ struct needs_frame_baton *nf_baton = (struct needs_frame_baton *) baton;
nf_baton->needs_frame = 1;
return 1;
@@ -2679,7 +2685,7 @@ needs_frame_read_addr_from_reg (void *baton, int regnum)
static struct value *
needs_frame_get_reg_value (void *baton, struct type *type, int regnum)
{
- struct needs_frame_baton *nf_baton = baton;
+ struct needs_frame_baton *nf_baton = (struct needs_frame_baton *) baton;
nf_baton->needs_frame = 1;
return value_zero (type, not_lval);
@@ -2697,7 +2703,7 @@ static void
needs_frame_frame_base (void *baton, const gdb_byte **start, size_t * length)
{
static gdb_byte lit0 = DW_OP_lit0;
- struct needs_frame_baton *nf_baton = baton;
+ struct needs_frame_baton *nf_baton = (struct needs_frame_baton *) baton;
*start = &lit0;
*length = 1;
@@ -2710,7 +2716,7 @@ needs_frame_frame_base (void *baton, const gdb_byte **start, size_t * length)
static CORE_ADDR
needs_frame_frame_cfa (void *baton)
{
- struct needs_frame_baton *nf_baton = baton;
+ struct needs_frame_baton *nf_baton = (struct needs_frame_baton *) baton;
nf_baton->needs_frame = 1;
return 1;
@@ -2720,7 +2726,7 @@ needs_frame_frame_cfa (void *baton)
static CORE_ADDR
needs_frame_tls_address (void *baton, CORE_ADDR offset)
{
- struct needs_frame_baton *nf_baton = baton;
+ struct needs_frame_baton *nf_baton = (struct needs_frame_baton *) baton;
nf_baton->needs_frame = 1;
return 1;
@@ -2731,7 +2737,7 @@ needs_frame_tls_address (void *baton, CORE_ADDR offset)
static void
needs_frame_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset)
{
- struct needs_frame_baton *nf_baton = ctx->baton;
+ struct needs_frame_baton *nf_baton = (struct needs_frame_baton *) ctx->baton;
per_cu_dwarf_call (ctx, die_offset, nf_baton->per_cu,
ctx->funcs->get_frame_pc, ctx->baton);
@@ -2744,7 +2750,7 @@ needs_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
enum call_site_parameter_kind kind,
union call_site_parameter_u kind_u, int deref_size)
{
- struct needs_frame_baton *nf_baton = ctx->baton;
+ struct needs_frame_baton *nf_baton = (struct needs_frame_baton *) ctx->baton;
nf_baton->needs_frame = 1;
@@ -2911,7 +2917,7 @@ access_memory (struct gdbarch *arch, struct agent_expr *expr, ULONGEST nbits)
static CORE_ADDR
get_ax_pc (void *baton)
{
- struct agent_expr *expr = baton;
+ struct agent_expr *expr = (struct agent_expr *) baton;
return expr->scope;
}
@@ -3601,7 +3607,8 @@ dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc,
static struct value *
locexpr_read_variable (struct symbol *symbol, struct frame_info *frame)
{
- struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_locexpr_baton *dlbaton
+ = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
struct value *val;
val = dwarf2_evaluate_loc_desc (SYMBOL_TYPE (symbol), frame, dlbaton->data,
@@ -3617,7 +3624,8 @@ locexpr_read_variable (struct symbol *symbol, struct frame_info *frame)
static struct value *
locexpr_read_variable_at_entry (struct symbol *symbol, struct frame_info *frame)
{
- struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_locexpr_baton *dlbaton
+ = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
return value_of_dwarf_block_entry (SYMBOL_TYPE (symbol), frame, dlbaton->data,
dlbaton->size);
@@ -3627,7 +3635,8 @@ locexpr_read_variable_at_entry (struct symbol *symbol, struct frame_info *frame)
static int
locexpr_read_needs_frame (struct symbol *symbol)
{
- struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_locexpr_baton *dlbaton
+ = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
return dwarf2_loc_desc_needs_frame (dlbaton->data, dlbaton->size,
dlbaton->per_cu);
@@ -4292,7 +4301,8 @@ static void
locexpr_describe_location (struct symbol *symbol, CORE_ADDR addr,
struct ui_file *stream)
{
- struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_locexpr_baton *dlbaton
+ = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
struct objfile *objfile = dwarf2_per_cu_objfile (dlbaton->per_cu);
unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
int offset_size = dwarf2_per_cu_offset_size (dlbaton->per_cu);
@@ -4310,7 +4320,8 @@ static void
locexpr_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
struct agent_expr *ax, struct axs_value *value)
{
- struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_locexpr_baton *dlbaton
+ = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
if (dlbaton->size == 0)
@@ -4329,7 +4340,8 @@ locexpr_generate_c_location (struct symbol *sym, struct ui_file *stream,
unsigned char *registers_used,
CORE_ADDR pc, const char *result_name)
{
- struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (sym);
+ struct dwarf2_locexpr_baton *dlbaton
+ = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (sym);
unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
if (dlbaton->size == 0)
@@ -4362,7 +4374,8 @@ const struct symbol_computed_ops dwarf2_locexpr_funcs = {
static struct value *
loclist_read_variable (struct symbol *symbol, struct frame_info *frame)
{
- struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_loclist_baton *dlbaton
+ = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol);
struct value *val;
const gdb_byte *data;
size_t size;
@@ -4386,7 +4399,8 @@ loclist_read_variable (struct symbol *symbol, struct frame_info *frame)
static struct value *
loclist_read_variable_at_entry (struct symbol *symbol, struct frame_info *frame)
{
- struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_loclist_baton *dlbaton
+ = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol);
const gdb_byte *data;
size_t size;
CORE_ADDR pc;
@@ -4422,7 +4436,8 @@ static void
loclist_describe_location (struct symbol *symbol, CORE_ADDR addr,
struct ui_file *stream)
{
- struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_loclist_baton *dlbaton
+ = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol);
const gdb_byte *loc_ptr, *buf_end;
struct objfile *objfile = dwarf2_per_cu_objfile (dlbaton->per_cu);
struct gdbarch *gdbarch = get_objfile_arch (objfile);
@@ -4511,7 +4526,8 @@ static void
loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
struct agent_expr *ax, struct axs_value *value)
{
- struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
+ struct dwarf2_loclist_baton *dlbaton
+ = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol);
const gdb_byte *data;
size_t size;
unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
@@ -4532,7 +4548,8 @@ loclist_generate_c_location (struct symbol *sym, struct ui_file *stream,
unsigned char *registers_used,
CORE_ADDR pc, const char *result_name)
{
- struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (sym);
+ struct dwarf2_loclist_baton *dlbaton
+ = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (sym);
unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
const gdb_byte *data;
size_t size;
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 4aa2f6d..5b12342 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1962,7 +1962,7 @@ line_header_hash (const struct line_header *ofs)
static hashval_t
line_header_hash_voidp (const void *item)
{
- const struct line_header *ofs = item;
+ const struct line_header *ofs = (const struct line_header *) item;
return line_header_hash (ofs);
}
@@ -1972,8 +1972,8 @@ line_header_hash_voidp (const void *item)
static int
line_header_eq_voidp (const void *item_lhs, const void *item_rhs)
{
- const struct line_header *ofs_lhs = item_lhs;
- const struct line_header *ofs_rhs = item_rhs;
+ const struct line_header *ofs_lhs = (const struct line_header *) item_lhs;
+ const struct line_header *ofs_rhs = (const struct line_header *) item_rhs;
return (ofs_lhs->offset.sect_off == ofs_rhs->offset.sect_off
&& ofs_lhs->offset_in_dwz == ofs_rhs->offset_in_dwz);
@@ -2043,7 +2043,8 @@ int
dwarf2_has_info (struct objfile *objfile,
const struct dwarf2_debug_sections *names)
{
- dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
+ dwarf2_per_objfile = ((struct dwarf2_per_objfile *)
+ objfile_data (objfile, dwarf2_objfile_data_key));
if (!dwarf2_per_objfile)
{
/* Initialize per-objfile state. */
@@ -2376,7 +2377,8 @@ dwarf2_get_section_info (struct objfile *objfile,
bfd_size_type *sizep)
{
struct dwarf2_per_objfile *data
- = objfile_data (objfile, dwarf2_objfile_data_key);
+ = (struct dwarf2_per_objfile *) objfile_data (objfile,
+ dwarf2_objfile_data_key);
struct dwarf2_section_info *info;
/* We may see an objfile without any DWARF, in which case we just
@@ -2412,7 +2414,7 @@ dwarf2_get_section_info (struct objfile *objfile,
static void
locate_dwz_sections (bfd *abfd, asection *sectp, void *arg)
{
- struct dwz_file *dwz_file = arg;
+ struct dwz_file *dwz_file = (struct dwz_file *) arg;
/* Note that we only support the standard ELF names, because .dwz
is ELF-only (at the time of writing). */
@@ -2609,7 +2611,8 @@ eq_stmt_list_entry (const struct stmt_list_hash *lhs,
static hashval_t
hash_file_name_entry (const void *e)
{
- const struct quick_file_names *file_data = e;
+ const struct quick_file_names *file_data
+ = (const struct quick_file_names *) e;
return hash_stmt_list_entry (&file_data->hash);
}
@@ -2619,8 +2622,8 @@ hash_file_name_entry (const void *e)
static int
eq_file_name_entry (const void *a, const void *b)
{
- const struct quick_file_names *ea = a;
- const struct quick_file_names *eb = b;
+ const struct quick_file_names *ea = (const struct quick_file_names *) a;
+ const struct quick_file_names *eb = (const struct quick_file_names *) b;
return eq_stmt_list_entry (&ea->hash, &eb->hash);
}
@@ -2630,7 +2633,7 @@ eq_file_name_entry (const void *a, const void *b)
static void
delete_file_name_entry (void *e)
{
- struct quick_file_names *file_data = e;
+ struct quick_file_names *file_data = (struct quick_file_names *) e;
int i;
for (i = 0; i < file_data->num_file_names; ++i)
@@ -3245,7 +3248,8 @@ dwarf2_read_index (struct objfile *objfile)
static void
dw2_setup (struct objfile *objfile)
{
- dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
+ dwarf2_per_objfile = ((struct dwarf2_per_objfile *)
+ objfile_data (objfile, dwarf2_objfile_data_key));
gdb_assert (dwarf2_per_objfile);
}
@@ -3300,7 +3304,7 @@ dw2_get_file_names_reader (const struct die_reader_specs *reader,
&find_entry, INSERT);
if (*slot != NULL)
{
- lh_cu->v.quick->file_names = *slot;
+ lh_cu->v.quick->file_names = (struct quick_file_names *) *slot;
return;
}
@@ -4092,7 +4096,8 @@ dw2_find_pc_sect_compunit_symtab (struct objfile *objfile,
if (!objfile->psymtabs_addrmap)
return NULL;
- data = addrmap_find (objfile->psymtabs_addrmap, pc);
+ data = (struct dwarf2_per_cu_data *) addrmap_find (objfile->psymtabs_addrmap,
+ pc);
if (!data)
return NULL;
@@ -4550,7 +4555,8 @@ dwarf2_build_include_psymtabs (struct dwarf2_cu *cu,
static hashval_t
hash_signatured_type (const void *item)
{
- const struct signatured_type *sig_type = item;
+ const struct signatured_type *sig_type
+ = (const struct signatured_type *) item;
/* This drops the top 32 bits of the signature, but is ok for a hash. */
return sig_type->signature;
@@ -4559,8 +4565,8 @@ hash_signatured_type (const void *item)
static int
eq_signatured_type (const void *item_lhs, const void *item_rhs)
{
- const struct signatured_type *lhs = item_lhs;
- const struct signatured_type *rhs = item_rhs;
+ const struct signatured_type *lhs = (const struct signatured_type *) item_lhs;
+ const struct signatured_type *rhs = (const struct signatured_type *) item_rhs;
return lhs->signature == rhs->signature;
}
@@ -4584,8 +4590,8 @@ allocate_signatured_type_table (struct objfile *objfile)
static int
add_signatured_type_cu_to_table (void **slot, void *datum)
{
- struct signatured_type *sigt = *slot;
- struct signatured_type ***datap = datum;
+ struct signatured_type *sigt = (struct signatured_type *) *slot;
+ struct signatured_type ***datap = (struct signatured_type ***) datum;
**datap = sigt;
++*datap;
@@ -4723,13 +4729,15 @@ create_debug_types_hash_table (struct dwo_file *dwo_file,
if (dwo_file)
{
- const struct dwo_unit *dup_tu = *slot;
+ const struct dwo_unit *dup_tu
+ = (const struct dwo_unit *) *slot;
dup_offset = dup_tu->offset;
}
else
{
- const struct signatured_type *dup_tu = *slot;
+ const struct signatured_type *dup_tu
+ = (const struct signatured_type *) *slot;
dup_offset = dup_tu->per_cu.offset;
}
@@ -4908,7 +4916,7 @@ lookup_dwo_signatured_type (struct dwarf2_cu *cu, ULONGEST sig)
find_sig_entry.signature = sig;
slot = htab_find_slot (dwarf2_per_objfile->signatured_types,
&find_sig_entry, INSERT);
- sig_entry = *slot;
+ sig_entry = (struct signatured_type *) *slot;
/* We can get here with the TU already read, *or* in the process of being
read. Don't reassign the global entry to point to this DWO if that's
@@ -4930,7 +4938,7 @@ lookup_dwo_signatured_type (struct dwarf2_cu *cu, ULONGEST sig)
if (dwo_file->tus == NULL)
return NULL;
find_dwo_entry.signature = sig;
- dwo_entry = htab_find (dwo_file->tus, &find_dwo_entry);
+ dwo_entry = (struct dwo_unit *) htab_find (dwo_file->tus, &find_dwo_entry);
if (dwo_entry == NULL)
return NULL;
@@ -4971,7 +4979,7 @@ lookup_dwp_signatured_type (struct dwarf2_cu *cu, ULONGEST sig)
find_sig_entry.signature = sig;
slot = htab_find_slot (dwarf2_per_objfile->signatured_types,
&find_sig_entry, INSERT);
- sig_entry = *slot;
+ sig_entry = (struct signatured_type *) *slot;
/* Have we already tried to read this TU?
Note: sig_entry can be NULL if the skeleton TU was removed (thus it
@@ -5016,7 +5024,8 @@ lookup_signatured_type (struct dwarf2_cu *cu, ULONGEST sig)
if (dwarf2_per_objfile->signatured_types == NULL)
return NULL;
find_entry.signature = sig;
- entry = htab_find (dwarf2_per_objfile->signatured_types, &find_entry);
+ entry = ((struct signatured_type *)
+ htab_find (dwarf2_per_objfile->signatured_types, &find_entry));
return entry;
}
}
@@ -5741,7 +5750,8 @@ init_cutu_and_read_dies_simple (struct dwarf2_per_cu_data *this_cu,
static hashval_t
hash_type_unit_group (const void *item)
{
- const struct type_unit_group *tu_group = item;
+ const struct type_unit_group *tu_group
+ = (const struct type_unit_group *) item;
return hash_stmt_list_entry (&tu_group->hash);
}
@@ -5749,8 +5759,8 @@ hash_type_unit_group (const void *item)
static int
eq_type_unit_group (const void *item_lhs, const void *item_rhs)
{
- const struct type_unit_group *lhs = item_lhs;
- const struct type_unit_group *rhs = item_rhs;
+ const struct type_unit_group *lhs = (const struct type_unit_group *) item_lhs;
+ const struct type_unit_group *rhs = (const struct type_unit_group *) item_rhs;
return eq_stmt_list_entry (&lhs->hash, &rhs->hash);
}
@@ -5864,7 +5874,7 @@ get_type_unit_group (struct dwarf2_cu *cu, const struct attribute *stmt_list)
&type_unit_group_for_lookup, INSERT);
if (*slot != NULL)
{
- tu_group = *slot;
+ tu_group = (struct type_unit_group *) *slot;
gdb_assert (tu_group != NULL);
}
else
@@ -5940,7 +5950,8 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
struct partial_symtab *pst;
int has_pc_info;
const char *filename;
- struct process_psymtab_comp_unit_data *info = data;
+ struct process_psymtab_comp_unit_data *info
+ = (struct process_psymtab_comp_unit_data *) data;
if (comp_unit_die->tag == DW_TAG_partial_unit && !info->want_partial_unit)
return;
@@ -6139,8 +6150,10 @@ struct tu_abbrev_offset
static int
sort_tu_by_abbrev_offset (const void *ap, const void *bp)
{
- const struct tu_abbrev_offset * const *a = ap;
- const struct tu_abbrev_offset * const *b = bp;
+ const struct tu_abbrev_offset * const *a
+ = (const struct tu_abbrev_offset * const*) ap;
+ const struct tu_abbrev_offset * const *b
+ = (const struct tu_abbrev_offset * const*) bp;
unsigned int aoff = (*a)->abbrev_offset.sect_off;
unsigned int boff = (*b)->abbrev_offset.sect_off;
@@ -6329,7 +6342,7 @@ static int
process_skeletonless_type_unit (void **slot, void *info)
{
struct dwo_unit *dwo_unit = (struct dwo_unit *) *slot;
- struct objfile *objfile = info;
+ struct objfile *objfile = (struct objfile *) info;
struct signatured_type find_entry, *entry;
/* If this TU doesn't exist in the global table, add it and read it in. */
@@ -6399,7 +6412,7 @@ process_skeletonless_type_units (struct objfile *objfile)
static void
psymtabs_addrmap_cleanup (void *o)
{
- struct objfile *objfile = o;
+ struct objfile *objfile = (struct objfile *) o;
objfile->psymtabs_addrmap = NULL;
}
@@ -7407,7 +7420,9 @@ dwarf2_read_symtab (struct partial_symtab *self,
}
/* Restore our global data. */
- dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
+ dwarf2_per_objfile
+ = (struct dwarf2_per_objfile *) objfile_data (objfile,
+ dwarf2_objfile_data_key);
/* If this psymtab is constructed from a debug-only objfile, the
has_section_at_zero flag will not necessarily be correct. We
@@ -7416,8 +7431,9 @@ dwarf2_read_symtab (struct partial_symtab *self,
if (objfile->separate_debug_objfile_backlink)
{
struct dwarf2_per_objfile *dpo_backlink
- = objfile_data (objfile->separate_debug_objfile_backlink,
- dwarf2_objfile_data_key);
+ = ((struct dwarf2_per_objfile *)
+ objfile_data (objfile->separate_debug_objfile_backlink,
+ dwarf2_objfile_data_key));
dwarf2_per_objfile->has_section_at_zero
= dpo_backlink->has_section_at_zero;
@@ -7637,7 +7653,7 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
psymtab_to_symtab_1 (pst->dependencies[i]);
}
- per_cu = pst->read_symtab_private;
+ per_cu = (struct dwarf2_per_cu_data *) pst->read_symtab_private;
if (per_cu == NULL)
{
@@ -7656,7 +7672,7 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
static hashval_t
die_hash (const void *item)
{
- const struct die_info *die = item;
+ const struct die_info *die = (const struct die_info *) item;
return die->offset.sect_off;
}
@@ -7667,8 +7683,8 @@ die_hash (const void *item)
static int
die_eq (const void *item_lhs, const void *item_rhs)
{
- const struct die_info *die_lhs = item_lhs;
- const struct die_info *die_rhs = item_rhs;
+ const struct die_info *die_lhs = (const struct die_info *) item_lhs;
+ const struct die_info *die_rhs = (const struct die_info *) item_rhs;
return die_lhs->offset.sect_off == die_rhs->offset.sect_off;
}
@@ -7685,7 +7701,7 @@ load_full_comp_unit_reader (const struct die_reader_specs *reader,
void *data)
{
struct dwarf2_cu *cu = reader->cu;
- enum language *language_ptr = data;
+ enum language *language_ptr = (enum language *) data;
gdb_assert (cu->die_hash == NULL);
cu->die_hash =
@@ -8218,7 +8234,7 @@ process_imported_unit_die (struct die_info *die, struct dwarf2_cu *cu)
static void
reset_die_in_process (void *arg)
{
- struct die_info *die = arg;
+ struct die_info *die = (struct die_info *) arg;
die->in_process = 0;
}
@@ -9016,7 +9032,7 @@ read_import_statement (struct die_info *die, struct dwarf2_cu *cu)
static void
free_cu_line_header (void *arg)
{
- struct dwarf2_cu *cu = arg;
+ struct dwarf2_cu *cu = (struct dwarf2_cu *) arg;
free_line_header (cu->line_header);
cu->line_header = NULL;
@@ -9127,7 +9143,7 @@ handle_DW_AT_stmt_list (struct die_info *die, struct dwarf2_cu *cu,
if (die->tag == DW_TAG_partial_unit && slot != NULL)
{
gdb_assert (*slot != NULL);
- cu->line_header = *slot;
+ cu->line_header = (struct line_header *) *slot;
return;
}
}
@@ -9401,7 +9417,7 @@ read_type_unit_scope (struct die_info *die, struct dwarf2_cu *cu)
static hashval_t
hash_dwo_file (const void *item)
{
- const struct dwo_file *dwo_file = item;
+ const struct dwo_file *dwo_file = (const struct dwo_file *) item;
hashval_t hash;
hash = htab_hash_string (dwo_file->dwo_name);
@@ -9413,8 +9429,8 @@ hash_dwo_file (const void *item)
static int
eq_dwo_file (const void *item_lhs, const void *item_rhs)
{
- const struct dwo_file *lhs = item_lhs;
- const struct dwo_file *rhs = item_rhs;
+ const struct dwo_file *lhs = (const struct dwo_file *) item_lhs;
+ const struct dwo_file *rhs = (const struct dwo_file *) item_rhs;
if (strcmp (lhs->dwo_name, rhs->dwo_name) != 0)
return 0;
@@ -9461,7 +9477,7 @@ lookup_dwo_file_slot (const char *dwo_name, const char *comp_dir)
static hashval_t
hash_dwo_unit (const void *item)
{
- const struct dwo_unit *dwo_unit = item;
+ const struct dwo_unit *dwo_unit = (const struct dwo_unit *) item;
/* This drops the top 32 bits of the id, but is ok for a hash. */
return dwo_unit->signature;
@@ -9470,8 +9486,8 @@ hash_dwo_unit (const void *item)
static int
eq_dwo_unit (const void *item_lhs, const void *item_rhs)
{
- const struct dwo_unit *lhs = item_lhs;
- const struct dwo_unit *rhs = item_rhs;
+ const struct dwo_unit *lhs = (const struct dwo_unit *) item_lhs;
+ const struct dwo_unit *rhs = (const struct dwo_unit *) item_rhs;
/* The signature is assumed to be unique within the DWO file.
So while object file CU dwo_id's always have the value zero,
@@ -9518,7 +9534,7 @@ create_dwo_cu_reader (const struct die_reader_specs *reader,
struct objfile *objfile = dwarf2_per_objfile->objfile;
sect_offset offset = cu->per_cu->offset;
struct dwarf2_section_info *section = cu->per_cu->section;
- struct create_dwo_cu_data *data = datap;
+ struct create_dwo_cu_data *data = (struct create_dwo_cu_data *) datap;
struct dwo_file *dwo_file = data->dwo_file;
struct dwo_unit *dwo_unit = &data->dwo_unit;
struct attribute *attr;
@@ -10135,7 +10151,7 @@ create_dwo_unit_in_dwp_v1 (struct dwp_file *dwp_file,
fprintf_unfiltered (gdb_stdlog, "Using existing virtual DWO: %s\n",
virtual_dwo_name);
}
- dwo_file = *dwo_file_slot;
+ dwo_file = (struct dwo_file *) *dwo_file_slot;
}
do_cleanups (cleanups);
@@ -10350,7 +10366,7 @@ create_dwo_unit_in_dwp_v2 (struct dwp_file *dwp_file,
fprintf_unfiltered (gdb_stdlog, "Using existing virtual DWO: %s\n",
virtual_dwo_name);
}
- dwo_file = *dwo_file_slot;
+ dwo_file = (struct dwo_file *) *dwo_file_slot;
}
do_cleanups (cleanups);
@@ -10394,7 +10410,7 @@ lookup_dwo_unit_in_dwp (struct dwp_file *dwp_file, const char *comp_dir,
&find_dwo_cu, INSERT);
if (*slot != NULL)
- return *slot;
+ return (struct dwo_unit *) *slot;
/* Use a for loop so that we don't loop forever on bad debug info. */
for (i = 0; i < dwp_htab->nr_slots; ++i)
@@ -10421,7 +10437,7 @@ lookup_dwo_unit_in_dwp (struct dwp_file *dwp_file, const char *comp_dir,
comp_dir, signature,
is_debug_types);
}
- return *slot;
+ return (struct dwo_unit *) *slot;
}
if (signature_in_table == 0)
return NULL;
@@ -10542,7 +10558,7 @@ open_dwo_file (const char *file_name, const char *comp_dir)
static void
dwarf2_locate_dwo_sections (bfd *abfd, asection *sectp, void *dwo_sections_ptr)
{
- struct dwo_sections *dwo_sections = dwo_sections_ptr;
+ struct dwo_sections *dwo_sections = (struct dwo_sections *) dwo_sections_ptr;
const struct dwop_section_names *names = &dwop_section_names;
if (section_is_p (sectp->name, &names->abbrev_dwo))
@@ -10647,7 +10663,7 @@ static void
dwarf2_locate_common_dwp_sections (bfd *abfd, asection *sectp,
void *dwp_file_ptr)
{
- struct dwp_file *dwp_file = dwp_file_ptr;
+ struct dwp_file *dwp_file = (struct dwp_file *) dwp_file_ptr;
const struct dwop_section_names *names = &dwop_section_names;
unsigned int elf_section_nr = elf_section_data (sectp)->this_idx;
@@ -10682,7 +10698,7 @@ dwarf2_locate_common_dwp_sections (bfd *abfd, asection *sectp,
static void
dwarf2_locate_v2_dwp_sections (bfd *abfd, asection *sectp, void *dwp_file_ptr)
{
- struct dwp_file *dwp_file = dwp_file_ptr;
+ struct dwp_file *dwp_file = (struct dwp_file *) dwp_file_ptr;
const struct dwop_section_names *names = &dwop_section_names;
unsigned int elf_section_nr = elf_section_data (sectp)->this_idx;
@@ -10739,7 +10755,7 @@ dwarf2_locate_v2_dwp_sections (bfd *abfd, asection *sectp, void *dwp_file_ptr)
static hashval_t
hash_dwp_loaded_cutus (const void *item)
{
- const struct dwo_unit *dwo_unit = item;
+ const struct dwo_unit *dwo_unit = (const struct dwo_unit *) item;
/* This drops the top 32 bits of the signature, but is ok for a hash. */
return dwo_unit->signature;
@@ -10750,8 +10766,8 @@ hash_dwp_loaded_cutus (const void *item)
static int
eq_dwp_loaded_cutus (const void *a, const void *b)
{
- const struct dwo_unit *dua = a;
- const struct dwo_unit *dub = b;
+ const struct dwo_unit *dua = (const struct dwo_unit *) a;
+ const struct dwo_unit *dub = (const struct dwo_unit *) b;
return dua->signature == dub->signature;
}
@@ -10969,7 +10985,7 @@ lookup_dwo_cutu (struct dwarf2_per_cu_data *this_unit,
*dwo_file_slot = open_and_init_dwo_file (this_unit, dwo_name, comp_dir);
}
/* NOTE: This will be NULL if unable to open the file. */
- dwo_file = *dwo_file_slot;
+ dwo_file = (struct dwo_file *) *dwo_file_slot;
if (dwo_file != NULL)
{
@@ -10981,7 +10997,8 @@ lookup_dwo_cutu (struct dwarf2_per_cu_data *this_unit,
memset (&find_dwo_cutu, 0, sizeof (find_dwo_cutu));
find_dwo_cutu.signature = signature;
- dwo_cutu = htab_find (dwo_file->tus, &find_dwo_cutu);
+ dwo_cutu
+ = (struct dwo_unit *) htab_find (dwo_file->tus, &find_dwo_cutu);
}
else if (!is_debug_types && dwo_file->cu)
{
@@ -15424,7 +15441,7 @@ abbrev_table_free (struct abbrev_table *abbrev_table)
static void
abbrev_table_free_cleanup (void *table_ptr)
{
- struct abbrev_table **abbrev_table_ptr = table_ptr;
+ struct abbrev_table **abbrev_table_ptr = (struct abbrev_table **) table_ptr;
if (*abbrev_table_ptr != NULL)
abbrev_table_free (*abbrev_table_ptr);
@@ -15446,7 +15463,7 @@ dwarf2_read_abbrevs (struct dwarf2_cu *cu,
static void
dwarf2_free_abbrev_table (void *ptr_to_cu)
{
- struct dwarf2_cu *cu = ptr_to_cu;
+ struct dwarf2_cu *cu = (struct dwarf2_cu *) ptr_to_cu;
if (cu->abbrev_table != NULL)
abbrev_table_free (cu->abbrev_table);
@@ -15988,8 +16005,9 @@ find_partial_die_in_comp_unit (sect_offset offset, struct dwarf2_cu *cu)
struct partial_die_info part_die;
part_die.offset = offset;
- lookup_die = htab_find_with_hash (cu->partial_dies, &part_die,
- offset.sect_off);
+ lookup_die = ((struct partial_die_info *)
+ htab_find_with_hash (cu->partial_dies, &part_die,
+ offset.sect_off));
return lookup_die;
}
@@ -17187,7 +17205,7 @@ free_line_header (struct line_header *lh)
static void
free_line_header_voidp (void *arg)
{
- struct line_header *lh = arg;
+ struct line_header *lh = (struct line_header *) arg;
free_line_header (lh);
}
@@ -20006,7 +20024,8 @@ follow_die_offset (sect_offset offset, int offset_in_dwz,
*ref_cu = target_cu;
temp_die.offset = offset;
- return htab_find_with_hash (target_cu->die_hash, &temp_die, offset.sect_off);
+ return (struct die_info *) htab_find_with_hash (target_cu->die_hash,
+ &temp_die, offset.sect_off);
}
/* Follow reference attribute ATTR of SRC_DIE.
@@ -20312,8 +20331,8 @@ follow_die_sig_1 (struct die_info *src_die, struct signatured_type *sig_type,
gdb_assert (sig_cu != NULL);
gdb_assert (sig_type->type_offset_in_section.sect_off != 0);
temp_die.offset = sig_type->type_offset_in_section;
- die = htab_find_with_hash (sig_cu->die_hash, &temp_die,
- temp_die.offset.sect_off);
+ die = (struct die_info *) htab_find_with_hash (sig_cu->die_hash, &temp_die,
+ temp_die.offset.sect_off);
if (die)
{
/* For .gdb_index version 7 keep track of included TUs.
@@ -22103,7 +22122,7 @@ prepare_one_comp_unit (struct dwarf2_cu *cu, struct die_info *comp_unit_die,
static void
free_heap_comp_unit (void *data)
{
- struct dwarf2_cu *cu = data;
+ struct dwarf2_cu *cu = (struct dwarf2_cu *) data;
gdb_assert (cu->per_cu != NULL);
cu->per_cu->cu = NULL;
@@ -22121,7 +22140,7 @@ free_heap_comp_unit (void *data)
static void
free_stack_comp_unit (void *data)
{
- struct dwarf2_cu *cu = data;
+ struct dwarf2_cu *cu = (struct dwarf2_cu *) data;
gdb_assert (cu->per_cu != NULL);
cu->per_cu->cu = NULL;
@@ -22225,7 +22244,9 @@ free_one_cached_comp_unit (struct dwarf2_per_cu_data *target_per_cu)
void
dwarf2_free_objfile (struct objfile *objfile)
{
- dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
+ dwarf2_per_objfile
+ = (struct dwarf2_per_objfile *) objfile_data (objfile,
+ dwarf2_objfile_data_key);
if (dwarf2_per_objfile == NULL)
return;
@@ -22268,7 +22289,8 @@ struct dwarf2_per_cu_offset_and_type
static hashval_t
per_cu_offset_and_type_hash (const void *item)
{
- const struct dwarf2_per_cu_offset_and_type *ofs = item;
+ const struct dwarf2_per_cu_offset_and_type *ofs
+ = (const struct dwarf2_per_cu_offset_and_type *) item;
return (uintptr_t) ofs->per_cu + ofs->offset.sect_off;
}
@@ -22278,8 +22300,10 @@ per_cu_offset_and_type_hash (const void *item)
static int
per_cu_offset_and_type_eq (const void *item_lhs, const void *item_rhs)
{
- const struct dwarf2_per_cu_offset_and_type *ofs_lhs = item_lhs;
- const struct dwarf2_per_cu_offset_and_type *ofs_rhs = item_rhs;
+ const struct dwarf2_per_cu_offset_and_type *ofs_lhs
+ = (const struct dwarf2_per_cu_offset_and_type *) item_lhs;
+ const struct dwarf2_per_cu_offset_and_type *ofs_rhs
+ = (const struct dwarf2_per_cu_offset_and_type *) item_rhs;
return (ofs_lhs->per_cu == ofs_rhs->per_cu
&& ofs_lhs->offset.sect_off == ofs_rhs->offset.sect_off);
@@ -22373,7 +22397,8 @@ get_die_type_at_offset (sect_offset offset,
ofs.per_cu = per_cu;
ofs.offset = offset;
- slot = htab_find (dwarf2_per_objfile->die_type_hash, &ofs);
+ slot = ((struct dwarf2_per_cu_offset_and_type *)
+ htab_find (dwarf2_per_objfile->die_type_hash, &ofs));
if (slot)
return slot->type;
else
@@ -22465,7 +22490,8 @@ dwarf2_clear_marks (struct dwarf2_per_cu_data *per_cu)
static hashval_t
partial_die_hash (const void *item)
{
- const struct partial_die_info *part_die = item;
+ const struct partial_die_info *part_die
+ = (const struct partial_die_info *) item;
return part_die->offset.sect_off;
}
@@ -22476,8 +22502,10 @@ partial_die_hash (const void *item)
static int
partial_die_eq (const void *item_lhs, const void *item_rhs)
{
- const struct partial_die_info *part_die_lhs = item_lhs;
- const struct partial_die_info *part_die_rhs = item_rhs;
+ const struct partial_die_info *part_die_lhs
+ = (const struct partial_die_info *) item_lhs;
+ const struct partial_die_info *part_die_rhs
+ = (const struct partial_die_info *) item_rhs;
return part_die_lhs->offset.sect_off == part_die_rhs->offset.sect_off;
}
@@ -22503,7 +22531,7 @@ show_dwarf_cmd (char *args, int from_tty)
static void
dwarf2_per_objfile_free (struct objfile *objfile, void *d)
{
- struct dwarf2_per_objfile *data = d;
+ struct dwarf2_per_objfile *data = (struct dwarf2_per_objfile *) d;
int ix;
/* Make sure we don't accidentally use dwarf2_per_objfile while
@@ -22548,7 +22576,7 @@ struct strtab_entry
static hashval_t
hash_strtab_entry (const void *e)
{
- const struct strtab_entry *entry = e;
+ const struct strtab_entry *entry = (const struct strtab_entry *) e;
return mapped_index_string_hash (INT_MAX, entry->str);
}
@@ -22557,8 +22585,8 @@ hash_strtab_entry (const void *e)
static int
eq_strtab_entry (const void *a, const void *b)
{
- const struct strtab_entry *ea = a;
- const struct strtab_entry *eb = b;
+ const struct strtab_entry *ea = (const struct strtab_entry *) a;
+ const struct strtab_entry *eb = (const struct strtab_entry *) b;
return !strcmp (ea->str, eb->str);
}
@@ -22584,7 +22612,7 @@ add_string (htab_t table, struct obstack *cpool, const char *str)
entry.str = str;
slot = htab_find_slot (table, &entry, INSERT);
if (*slot)
- result = *slot;
+ result = (struct strtab_entry *) *slot;
else
{
result = XNEW (struct strtab_entry);
@@ -22621,7 +22649,8 @@ struct mapped_symtab
static hashval_t
hash_symtab_entry (const void *e)
{
- const struct symtab_index_entry *entry = e;
+ const struct symtab_index_entry *entry
+ = (const struct symtab_index_entry *) e;
return iterative_hash (VEC_address (offset_type, entry->cu_indices),
sizeof (offset_type) * VEC_length (offset_type,
entry->cu_indices),
@@ -22633,8 +22662,8 @@ hash_symtab_entry (const void *e)
static int
eq_symtab_entry (const void *a, const void *b)
{
- const struct symtab_index_entry *ea = a;
- const struct symtab_index_entry *eb = b;
+ const struct symtab_index_entry *ea = (const struct symtab_index_entry *) a;
+ const struct symtab_index_entry *eb = (const struct symtab_index_entry *) b;
int len = VEC_length (offset_type, ea->cu_indices);
if (len != VEC_length (offset_type, eb->cu_indices))
return 0;
@@ -22648,7 +22677,7 @@ eq_symtab_entry (const void *a, const void *b)
static void
delete_symtab_entry (void *p)
{
- struct symtab_index_entry *entry = p;
+ struct symtab_index_entry *entry = (struct symtab_index_entry *) p;
VEC_free (offset_type, entry->cu_indices);
xfree (entry);
}
@@ -22679,7 +22708,7 @@ create_mapped_symtab (void)
static void
cleanup_mapped_symtab (void *p)
{
- struct mapped_symtab *symtab = p;
+ struct mapped_symtab *symtab = (struct mapped_symtab *) p;
/* The contents of the array are freed when the other hash table is
destroyed. */
xfree (symtab->data);
@@ -22856,7 +22885,8 @@ add_indices_to_cpool (htab_t symbol_hash_table, struct obstack *cpool,
}
else
{
- struct symtab_index_entry *old_entry = *slot;
+ struct symtab_index_entry *old_entry
+ = (struct symtab_index_entry *) *slot;
entry->index_offset = old_entry->index_offset;
entry = old_entry;
}
@@ -22924,7 +22954,8 @@ struct psymtab_cu_index_map
static hashval_t
hash_psymtab_cu_index (const void *item)
{
- const struct psymtab_cu_index_map *map = item;
+ const struct psymtab_cu_index_map *map
+ = (const struct psymtab_cu_index_map *) item;
return htab_hash_pointer (map->psymtab);
}
@@ -22932,8 +22963,10 @@ hash_psymtab_cu_index (const void *item)
static int
eq_psymtab_cu_index (const void *item_lhs, const void *item_rhs)
{
- const struct psymtab_cu_index_map *lhs = item_lhs;
- const struct psymtab_cu_index_map *rhs = item_rhs;
+ const struct psymtab_cu_index_map *lhs
+ = (const struct psymtab_cu_index_map *) item_lhs;
+ const struct psymtab_cu_index_map *rhs
+ = (const struct psymtab_cu_index_map *) item_rhs;
return lhs->psymtab == rhs->psymtab;
}
@@ -22980,8 +23013,8 @@ add_address_entry (struct objfile *objfile, struct obstack *obstack,
static int
add_address_entry_worker (void *datap, CORE_ADDR start_addr, void *obj)
{
- struct addrmap_index_data *data = datap;
- struct partial_symtab *pst = obj;
+ struct addrmap_index_data *data = (struct addrmap_index_data *) datap;
+ struct partial_symtab *pst = (struct partial_symtab *) obj;
if (data->previous_valid)
add_address_entry (data->objfile, data->addr_obstack,
@@ -22993,7 +23026,8 @@ add_address_entry_worker (void *datap, CORE_ADDR start_addr, void *obj)
{
struct psymtab_cu_index_map find_map, *map;
find_map.psymtab = pst;
- map = htab_find (data->cu_index_htab, &find_map);
+ map = ((struct psymtab_cu_index_map *)
+ htab_find (data->cu_index_htab, &find_map));
gdb_assert (map != NULL);
data->previous_cu_index = map->cu_index;
data->previous_valid = 1;
@@ -23123,7 +23157,7 @@ write_obstack (FILE *file, struct obstack *obstack)
static void
unlink_if_set (void *p)
{
- char **filename = p;
+ char **filename = (char **) p;
if (*filename)
unlink (*filename);
}
@@ -23144,7 +23178,8 @@ struct signatured_type_index_data
static int
write_one_signatured_type (void **slot, void *d)
{
- struct signatured_type_index_data *info = d;
+ struct signatured_type_index_data *info
+ = (struct signatured_type_index_data *) d;
struct signatured_type *entry = (struct signatured_type *) *slot;
struct partial_symtab *psymtab = entry->per_cu.v.psymtab;
gdb_byte val[8];
@@ -23411,7 +23446,9 @@ save_gdb_index_command (char *arg, int from_tty)
if (stat (objfile_name (objfile), &st) < 0)
continue;
- dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
+ dwarf2_per_objfile
+ = (struct dwarf2_per_objfile *) objfile_data (objfile,
+ dwarf2_objfile_data_key);
if (dwarf2_per_objfile)
{
diff --git a/gdb/elfread.c b/gdb/elfread.c
index a018cdd..138d316 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -338,8 +338,9 @@ elf_symtab_read (struct objfile *objfile, int type,
continue;
if (sym->flags & BSF_FILE)
{
- filesymname = bcache (sym->name, strlen (sym->name) + 1,
- objfile->per_bfd->filename_cache);
+ filesymname
+ = (const char *) bcache (sym->name, strlen (sym->name) + 1,
+ objfile->per_bfd->filename_cache);
}
else if (sym->flags & BSF_SECTION_SYM)
continue;
@@ -638,7 +639,8 @@ struct elf_gnu_ifunc_cache
static hashval_t
elf_gnu_ifunc_cache_hash (const void *a_voidp)
{
- const struct elf_gnu_ifunc_cache *a = a_voidp;
+ const struct elf_gnu_ifunc_cache *a
+ = (const struct elf_gnu_ifunc_cache *) a_voidp;
return htab_hash_string (a->name);
}
@@ -648,8 +650,10 @@ elf_gnu_ifunc_cache_hash (const void *a_voidp)
static int
elf_gnu_ifunc_cache_eq (const void *a_voidp, const void *b_voidp)
{
- const struct elf_gnu_ifunc_cache *a = a_voidp;
- const struct elf_gnu_ifunc_cache *b = b_voidp;
+ const struct elf_gnu_ifunc_cache *a
+ = (const struct elf_gnu_ifunc_cache *) a_voidp;
+ const struct elf_gnu_ifunc_cache *b
+ = (const struct elf_gnu_ifunc_cache *) b_voidp;
return strcmp (a->name, b->name) == 0;
}
@@ -687,7 +691,7 @@ elf_gnu_ifunc_record_cache (const char *name, CORE_ADDR addr)
if (strcmp (bfd_get_section_name (objfile->obfd, sect), ".plt") == 0)
return 0;
- htab = objfile_data (objfile, elf_objfile_gnu_ifunc_cache_data);
+ htab = (htab_t) objfile_data (objfile, elf_objfile_gnu_ifunc_cache_data);
if (htab == NULL)
{
htab = htab_create_alloc_ex (1, elf_gnu_ifunc_cache_hash,
@@ -708,7 +712,8 @@ elf_gnu_ifunc_record_cache (const char *name, CORE_ADDR addr)
slot = htab_find_slot (htab, entry_p, INSERT);
if (*slot != NULL)
{
- struct elf_gnu_ifunc_cache *entry_found_p = *slot;
+ struct elf_gnu_ifunc_cache *entry_found_p
+ = (struct elf_gnu_ifunc_cache *) *slot;
struct gdbarch *gdbarch = get_objfile_arch (objfile);
if (entry_found_p->addr != addr)
@@ -747,7 +752,7 @@ elf_gnu_ifunc_resolve_by_cache (const char *name, CORE_ADDR *addr_p)
struct elf_gnu_ifunc_cache *entry_p;
void **slot;
- htab = objfile_data (objfile, elf_objfile_gnu_ifunc_cache_data);
+ htab = (htab_t) objfile_data (objfile, elf_objfile_gnu_ifunc_cache_data);
if (htab == NULL)
continue;
@@ -758,7 +763,7 @@ elf_gnu_ifunc_resolve_by_cache (const char *name, CORE_ADDR *addr_p)
slot = htab_find_slot (htab, entry_p, NO_INSERT);
if (slot == NULL)
continue;
- entry_p = *slot;
+ entry_p = (struct elf_gnu_ifunc_cache *) *slot;
gdb_assert (entry_p != NULL);
if (addr_p)
@@ -1326,7 +1331,7 @@ elf_get_probes (struct objfile *objfile)
VEC (probe_p) *probes_per_bfd;
/* Have we parsed this objfile's probes already? */
- probes_per_bfd = bfd_data (objfile->obfd, probe_key);
+ probes_per_bfd = (VEC (probe_p) *) bfd_data (objfile->obfd, probe_key);
if (!probes_per_bfd)
{
@@ -1358,7 +1363,7 @@ static void
probe_key_free (bfd *abfd, void *d)
{
int ix;
- VEC (probe_p) *probes = d;
+ VEC (probe_p) *probes = (VEC (probe_p) *) d;
struct probe *probe;
for (ix = 0; VEC_iterate (probe_p, probes, ix, probe); ix++)
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index e4deeb9..9101330 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -343,7 +343,7 @@ static struct gdbarch_data *f_type_data;
const struct builtin_f_type *
builtin_f_type (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, f_type_data);
+ return (const struct builtin_f_type *) gdbarch_data (gdbarch, f_type_data);
}
void
diff --git a/gdb/frame-base.c b/gdb/frame-base.c
index 47327ca..d91cd42 100644
--- a/gdb/frame-base.c
+++ b/gdb/frame-base.c
@@ -82,7 +82,8 @@ void
frame_base_append_sniffer (struct gdbarch *gdbarch,
frame_base_sniffer_ftype *sniffer)
{
- struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data);
+ struct frame_base_table *table
+ = (struct frame_base_table *) gdbarch_data (gdbarch, frame_base_data);
(*table->tail)
= GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_base_table_entry);
@@ -94,7 +95,8 @@ void
frame_base_set_default (struct gdbarch *gdbarch,
const struct frame_base *default_base)
{
- struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data);
+ struct frame_base_table *table
+ = (struct frame_base_table *) gdbarch_data (gdbarch, frame_base_data);
table->default_base = default_base;
}
@@ -103,7 +105,8 @@ const struct frame_base *
frame_base_find_by_frame (struct frame_info *this_frame)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data);
+ struct frame_base_table *table
+ = (struct frame_base_table *) gdbarch_data (gdbarch, frame_base_data);
struct frame_base_table_entry *entry;
for (entry = table->head; entry != NULL; entry = entry->next)
diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c
index bba1ae7..586aa4f 100644
--- a/gdb/frame-unwind.c
+++ b/gdb/frame-unwind.c
@@ -64,7 +64,8 @@ void
frame_unwind_prepend_unwinder (struct gdbarch *gdbarch,
const struct frame_unwind *unwinder)
{
- struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
+ struct frame_unwind_table *table
+ = (struct frame_unwind_table *) gdbarch_data (gdbarch, frame_unwind_data);
struct frame_unwind_table_entry *entry;
/* Insert the new entry at the start of the list. */
@@ -78,7 +79,8 @@ void
frame_unwind_append_unwinder (struct gdbarch *gdbarch,
const struct frame_unwind *unwinder)
{
- struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
+ struct frame_unwind_table *table
+ = (struct frame_unwind_table *) gdbarch_data (gdbarch, frame_unwind_data);
struct frame_unwind_table_entry **ip;
/* Find the end of the list and insert the new entry there. */
@@ -140,7 +142,8 @@ void
frame_unwind_find_by_frame (struct frame_info *this_frame, void **this_cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
+ struct frame_unwind_table *table
+ = (struct frame_unwind_table *) gdbarch_data (gdbarch, frame_unwind_data);
struct frame_unwind_table_entry *entry;
const struct frame_unwind *unwinder_from_target;
diff --git a/gdb/frame.c b/gdb/frame.c
index 8b804cd..93bb7f6 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -162,7 +162,7 @@ static htab_t frame_stash;
static hashval_t
frame_addr_hash (const void *ap)
{
- const struct frame_info *frame = ap;
+ const struct frame_info *frame = (const struct frame_info *) ap;
const struct frame_id f_id = frame->this_id.value;
hashval_t hash = 0;
@@ -189,8 +189,8 @@ frame_addr_hash (const void *ap)
static int
frame_addr_hash_eq (const void *a, const void *b)
{
- const struct frame_info *f_entry = a;
- const struct frame_info *f_element = b;
+ const struct frame_info *f_entry = (const struct frame_info *) a;
+ const struct frame_info *f_element = (const struct frame_info *) b;
return frame_id_eq (f_entry->this_id.value,
f_element->this_id.value);
@@ -246,7 +246,7 @@ frame_stash_find (struct frame_id id)
struct frame_info *frame;
dummy.this_id.value = id;
- frame = htab_find (frame_stash, &dummy);
+ frame = (struct frame_info *) htab_find (frame_stash, &dummy);
return frame;
}
@@ -930,7 +930,7 @@ get_frame_func (struct frame_info *this_frame)
static enum register_status
do_frame_register_read (void *src, int regnum, gdb_byte *buf)
{
- if (!deprecated_frame_register_read (src, regnum, buf))
+ if (!deprecated_frame_register_read ((struct frame_info *) src, regnum, buf))
return REG_UNAVAILABLE;
else
return REG_VALID;
@@ -1447,7 +1447,7 @@ frame_obstack_zalloc (unsigned long size)
static int
unwind_to_current_frame (struct ui_out *ui_out, void *args)
{
- struct frame_info *frame = get_prev_frame (args);
+ struct frame_info *frame = get_prev_frame ((struct frame_info *) args);
/* A sentinel frame can fail to unwind, e.g., because its PC value
lands in somewhere like start. */
@@ -2703,7 +2703,7 @@ frame_stop_reason_symbol_string (enum unwind_stop_reason reason)
static void
frame_cleanup_after_sniffer (void *arg)
{
- struct frame_info *frame = arg;
+ struct frame_info *frame = (struct frame_info *) arg;
/* The sniffer should not allocate a prologue cache if it did not
match this frame. */
diff --git a/gdb/frv-linux-tdep.c b/gdb/frv-linux-tdep.c
index 8775d19..6950b6c 100644
--- a/gdb/frv-linux-tdep.c
+++ b/gdb/frv-linux-tdep.c
@@ -271,7 +271,7 @@ frv_linux_sigtramp_frame_cache (struct frame_info *this_frame,
struct frame_id this_id;
if (*this_cache)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 19ff87e..984c6e8 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -1099,7 +1099,7 @@ frv_frame_unwind_cache (struct frame_info *this_frame,
struct frv_unwind_cache *info;
if ((*this_prologue_cache))
- return (*this_prologue_cache);
+ return (struct frv_unwind_cache *) (*this_prologue_cache);
info = FRAME_OBSTACK_ZALLOC (struct frv_unwind_cache);
(*this_prologue_cache) = info;
diff --git a/gdb/ft32-tdep.c b/gdb/ft32-tdep.c
index 7c6efbb..e834279 100644
--- a/gdb/ft32-tdep.c
+++ b/gdb/ft32-tdep.c
@@ -436,7 +436,7 @@ ft32_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct ft32_frame_cache *) *this_cache;
cache = ft32_alloc_frame_cache ();
*this_cache = cache;
diff --git a/gdb/gcore.c b/gdb/gcore.c
index 44b9d0c..a883e89 100644
--- a/gdb/gcore.c
+++ b/gdb/gcore.c
@@ -137,10 +137,10 @@ write_gcore_file (bfd *obfd)
static void
do_bfd_delete_cleanup (void *arg)
{
- bfd *obfd = arg;
+ bfd *obfd = (bfd *) arg;
const char *filename = obfd->filename;
- gdb_bfd_unref (arg);
+ gdb_bfd_unref ((bfd *) arg);
unlink (filename);
}
@@ -417,7 +417,7 @@ static int
gcore_create_callback (CORE_ADDR vaddr, unsigned long size, int read,
int write, int exec, int modified, void *data)
{
- bfd *obfd = data;
+ bfd *obfd = (bfd *) data;
asection *osec;
flagword flags = SEC_ALLOC | SEC_HAS_CONTENTS | SEC_LOAD;
diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c
index af5560d..c45ebe3 100644
--- a/gdb/gdb_bfd.c
+++ b/gdb/gdb_bfd.c
@@ -155,7 +155,7 @@ struct gdb_bfd_cache_search
static hashval_t
hash_bfd (const void *b)
{
- const bfd *abfd = b;
+ const bfd *abfd = (const struct bfd *) b;
/* It is simplest to just hash the filename. */
return htab_hash_string (bfd_get_filename (abfd));
@@ -167,9 +167,10 @@ hash_bfd (const void *b)
static int
eq_bfd (const void *a, const void *b)
{
- const bfd *abfd = a;
- const struct gdb_bfd_cache_search *s = b;
- struct gdb_bfd_data *gdata = bfd_usrdata (abfd);
+ const bfd *abfd = (const struct bfd *) a;
+ const struct gdb_bfd_cache_search *s
+ = (const struct gdb_bfd_cache_search *) b;
+ struct gdb_bfd_data *gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
return (gdata->mtime == s->mtime
&& gdata->size == s->size
@@ -417,7 +418,7 @@ gdb_bfd_open (const char *name, const char *target, int fd)
/* Note that we cannot use htab_find_slot_with_hash here, because
opening the BFD may fail; and this would violate hashtab
invariants. */
- abfd = htab_find_with_hash (gdb_bfd_cache, &search, hash);
+ abfd = (struct bfd *) htab_find_with_hash (gdb_bfd_cache, &search, hash);
if (bfd_sharing && abfd != NULL)
{
if (debug_bfd_cache)
@@ -457,7 +458,8 @@ gdb_bfd_open (const char *name, const char *target, int fd)
static void
free_one_bfd_section (bfd *abfd, asection *sectp, void *ignore)
{
- struct gdb_bfd_section_data *sect = bfd_get_section_userdata (abfd, sectp);
+ struct gdb_bfd_section_data *sect
+ = (struct gdb_bfd_section_data *) bfd_get_section_userdata (abfd, sectp);
if (sect != NULL && sect->data != NULL)
{
@@ -506,7 +508,7 @@ gdb_bfd_ref (struct bfd *abfd)
if (abfd == NULL)
return;
- gdata = bfd_usrdata (abfd);
+ gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
if (debug_bfd_cache)
fprintf_unfiltered (gdb_stdlog,
@@ -563,7 +565,7 @@ gdb_bfd_unref (struct bfd *abfd)
if (abfd == NULL)
return;
- gdata = bfd_usrdata (abfd);
+ gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
gdb_assert (gdata->refc >= 1);
gdata->refc -= 1;
@@ -627,7 +629,8 @@ get_section_descriptor (asection *section)
{
struct gdb_bfd_section_data *result;
- result = bfd_get_section_userdata (section->owner, section);
+ result = ((struct gdb_bfd_section_data *)
+ bfd_get_section_userdata (section->owner, section));
if (result == NULL)
{
@@ -710,7 +713,7 @@ gdb_bfd_map_section (asection *sectp, bfd_size_type *size)
done:
gdb_assert (descriptor->data != NULL);
*size = descriptor->size;
- return descriptor->data;
+ return (const gdb_byte *) descriptor->data;
}
/* Return 32-bit CRC for ABFD. If successful store it to *FILE_CRC_RETURN and
@@ -755,7 +758,7 @@ get_file_crc (bfd *abfd, unsigned long *file_crc_return)
int
gdb_bfd_crc (struct bfd *abfd, unsigned long *crc_out)
{
- struct gdb_bfd_data *gdata = bfd_usrdata (abfd);
+ struct gdb_bfd_data *gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
if (!gdata->crc_computed)
gdata->crc_computed = get_file_crc (abfd, &gdata->crc);
@@ -846,7 +849,7 @@ gdb_bfd_mark_parent (bfd *child, bfd *parent)
/* No need to stash the filename here, because we also keep a
reference on the parent archive. */
- gdata = bfd_usrdata (child);
+ gdata = (struct gdb_bfd_data *) bfd_usrdata (child);
if (gdata->archive_bfd == NULL)
{
gdata->archive_bfd = parent;
@@ -877,7 +880,7 @@ gdb_bfd_record_inclusion (bfd *includer, bfd *includee)
struct gdb_bfd_data *gdata;
gdb_bfd_ref (includee);
- gdata = bfd_usrdata (includer);
+ gdata = (struct gdb_bfd_data *) bfd_usrdata (includer);
VEC_safe_push (bfdp, gdata->included_bfds, includee);
}
@@ -929,7 +932,7 @@ gdb_bfd_count_sections (bfd *abfd)
int
gdb_bfd_requires_relocations (bfd *abfd)
{
- struct gdb_bfd_data *gdata = bfd_usrdata (abfd);
+ struct gdb_bfd_data *gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
if (gdata->relocation_computed == 0)
{
@@ -955,9 +958,9 @@ gdb_bfd_requires_relocations (bfd *abfd)
static int
print_one_bfd (void **slot, void *data)
{
- bfd *abfd = *slot;
- struct gdb_bfd_data *gdata = bfd_usrdata (abfd);
- struct ui_out *uiout = data;
+ bfd *abfd = (struct bfd *) *slot;
+ struct gdb_bfd_data *gdata = (struct gdb_bfd_data *) bfd_usrdata (abfd);
+ struct ui_out *uiout = (struct ui_out *) data;
struct cleanup *inner;
inner = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index d6ce174..95e370c 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,23 @@
2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
+ * dll.c (match_dll): Add cast(s).
+ (unloaded_dll): Likewise.
+ * linux-low.c (second_thread_of_pid_p): Likewise.
+ (delete_lwp_callback): Likewise.
+ (count_events_callback): Likewise.
+ (select_event_lwp_callback): Likewise.
+ (linux_set_resume_request): Likewise.
+ * server.c (accumulate_file_name_length): Likewise.
+ (emit_dll_description): Likewise.
+ (handle_qxfer_threads_worker): Likewise.
+ (visit_actioned_threads): Likewise.
+ * thread-db.c (any_thread_of): Likewise.
+ * tracepoint.c (same_process_p): Likewise.
+ (match_blocktype): Likewise.
+ (build_traceframe_info_xml): Likewise.
+
+2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
+
* ax.c (gdb_parse_agent_expr): Add cast to allocation result
assignment.
(gdb_unparse_agent_expr): Likewise.
diff --git a/gdb/gdbserver/dll.c b/gdb/gdbserver/dll.c
index c4f838c..608cf23 100644
--- a/gdb/gdbserver/dll.c
+++ b/gdb/gdbserver/dll.c
@@ -41,8 +41,8 @@ free_one_dll (struct inferior_list_entry *inf)
static int
match_dll (struct inferior_list_entry *inf, void *arg)
{
- struct dll_info *iter = (void *) inf;
- struct dll_info *key = arg;
+ struct dll_info *iter = (struct dll_info *) inf;
+ struct dll_info *key = (struct dll_info *) arg;
if (key->base_addr != UNSPECIFIED_CORE_ADDR
&& iter->base_addr == key->base_addr)
@@ -83,7 +83,7 @@ unloaded_dll (const char *name, CORE_ADDR base_addr)
key_dll.name = (char *) name;
key_dll.base_addr = base_addr;
- dll = (void *) find_inferior (&all_dlls, match_dll, &key_dll);
+ dll = (struct dll_info *) find_inferior (&all_dlls, match_dll, &key_dll);
if (dll == NULL)
/* For some inferiors we might get unloaded_dll events without having
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 12a2332..3a1a6ae 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -1089,7 +1089,7 @@ struct counter
static int
second_thread_of_pid_p (struct inferior_list_entry *entry, void *args)
{
- struct counter *counter = args;
+ struct counter *counter = (struct counter *) args;
if (ptid_get_pid (entry->id) == counter->pid)
{
@@ -1429,7 +1429,7 @@ delete_lwp_callback (struct inferior_list_entry *entry, void *proc)
{
struct thread_info *thread = (struct thread_info *) entry;
struct lwp_info *lwp = get_thread_lwp (thread);
- struct process_info *process = proc;
+ struct process_info *process = (struct process_info *) proc;
if (pid_of (thread) == pid_of (process))
delete_lwp (lwp);
@@ -2633,7 +2633,7 @@ count_events_callback (struct inferior_list_entry *entry, void *data)
{
struct thread_info *thread = (struct thread_info *) entry;
struct lwp_info *lp = get_thread_lwp (thread);
- int *count = data;
+ int *count = (int *) data;
gdb_assert (count != NULL);
@@ -2668,7 +2668,7 @@ select_event_lwp_callback (struct inferior_list_entry *entry, void *data)
{
struct thread_info *thread = (struct thread_info *) entry;
struct lwp_info *lp = get_thread_lwp (thread);
- int *selector = data;
+ int *selector = (int *) data;
gdb_assert (selector != NULL);
@@ -4152,7 +4152,7 @@ linux_set_resume_request (struct inferior_list_entry *entry, void *arg)
int ndx;
struct thread_resume_array *r;
- r = arg;
+ r = (struct thread_resume_array *) arg;
for (ndx = 0; ndx < r->n; ndx++)
{
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 53763e5..e25b7c7 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -1280,7 +1280,7 @@ static void
accumulate_file_name_length (struct inferior_list_entry *inf, void *arg)
{
struct dll_info *dll = (struct dll_info *) inf;
- unsigned int *total_len = arg;
+ unsigned int *total_len = (unsigned int *) arg;
/* Over-estimate the necessary memory. Assume that every character
in the library name must be escaped. */
@@ -1294,7 +1294,7 @@ static void
emit_dll_description (struct inferior_list_entry *inf, void *arg)
{
struct dll_info *dll = (struct dll_info *) inf;
- char **p_ptr = arg;
+ char **p_ptr = (char **) arg;
char *p = *p_ptr;
char *name;
@@ -1450,7 +1450,7 @@ static void
handle_qxfer_threads_worker (struct inferior_list_entry *inf, void *arg)
{
struct thread_info *thread = (struct thread_info *) inf;
- struct buffer *buffer = arg;
+ struct buffer *buffer = (struct buffer *) arg;
ptid_t ptid = thread_to_gdb_id (thread);
char ptid_s[100];
int core = target_core_of_thread (ptid);
@@ -2459,7 +2459,8 @@ struct visit_actioned_threads_data
static int
visit_actioned_threads (struct inferior_list_entry *entry, void *datap)
{
- struct visit_actioned_threads_data *data = datap;
+ struct visit_actioned_threads_data *data
+ = (struct visit_actioned_threads_data *) datap;
const struct thread_resume *actions = data->actions;
size_t num_actions = data->num_actions;
visit_actioned_threads_callback_ftype *callback = data->callback;
diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c
index f5fdf10..ffe722d 100644
--- a/gdb/gdbserver/thread-db.c
+++ b/gdb/gdbserver/thread-db.c
@@ -874,7 +874,7 @@ thread_db_init (int use_events)
static int
any_thread_of (struct inferior_list_entry *entry, void *args)
{
- int *pid_p = args;
+ int *pid_p = (int *) args;
if (ptid_get_pid (entry->id) == *pid_p)
return 1;
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index 1b3a5d0..b6c70c9 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -3947,7 +3947,7 @@ cmd_qtstmat (char *packet)
static int
same_process_p (struct inferior_list_entry *entry, void *data)
{
- int *pid = data;
+ int *pid = (int *) data;
return ptid_get_pid (entry->id) == *pid;
}
@@ -5066,7 +5066,7 @@ agent_tsv_read (struct eval_agent_expr_context *ctx, int n)
static int
match_blocktype (char blocktype, unsigned char *dataptr, void *data)
{
- char *wantedp = data;
+ char *wantedp = (char *) data;
if (*wantedp == blocktype)
return 1;
@@ -5412,7 +5412,7 @@ traceframe_read_sdata (int tfnum, ULONGEST offset,
static int
build_traceframe_info_xml (char blocktype, unsigned char *dataptr, void *data)
{
- struct buffer *buffer = data;
+ struct buffer *buffer = (struct buffer *) data;
switch (blocktype)
{
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 063dcf2..b406550 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -4308,7 +4308,7 @@ struct type_pair
static hashval_t
type_pair_hash (const void *item)
{
- const struct type_pair *pair = item;
+ const struct type_pair *pair = (const struct type_pair *) item;
return htab_hash_pointer (pair->old);
}
@@ -4316,7 +4316,8 @@ type_pair_hash (const void *item)
static int
type_pair_eq (const void *item_lhs, const void *item_rhs)
{
- const struct type_pair *lhs = item_lhs, *rhs = item_rhs;
+ const struct type_pair *lhs = (const struct type_pair *) item_lhs;
+ const struct type_pair *rhs = (const struct type_pair *) item_rhs;
return lhs->old == rhs->old;
}
@@ -4780,7 +4781,7 @@ static struct gdbarch_data *gdbtypes_data;
const struct builtin_type *
builtin_type (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, gdbtypes_data);
+ return (const struct builtin_type *) gdbarch_data (gdbarch, gdbtypes_data);
}
static void *
@@ -4925,7 +4926,7 @@ objfile_type (struct objfile *objfile)
{
struct gdbarch *gdbarch;
struct objfile_type *objfile_type
- = objfile_data (objfile, objfile_type_data);
+ = (struct objfile_type *) objfile_data (objfile, objfile_type_data);
if (objfile_type)
return objfile_type;
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index b493112..b962cd3 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -174,7 +174,8 @@ build_gdb_vtable_type (struct gdbarch *arch)
static struct type *
vtable_ptrdiff_type (struct gdbarch *gdbarch)
{
- struct type *vtable_type = gdbarch_data (gdbarch, vtable_type_gdbarch_data);
+ struct type *vtable_type
+ = (struct type *) gdbarch_data (gdbarch, vtable_type_gdbarch_data);
/* The "offset_to_top" field has the appropriate (ptrdiff_t) type. */
return TYPE_FIELD_TYPE (vtable_type, vtable_field_offset_to_top);
@@ -186,7 +187,8 @@ vtable_ptrdiff_type (struct gdbarch *gdbarch)
static int
vtable_address_point_offset (struct gdbarch *gdbarch)
{
- struct type *vtable_type = gdbarch_data (gdbarch, vtable_type_gdbarch_data);
+ struct type *vtable_type
+ = (struct type *) gdbarch_data (gdbarch, vtable_type_gdbarch_data);
return (TYPE_FIELD_BITPOS (vtable_type, vtable_field_virtual_functions)
/ TARGET_CHAR_BIT);
@@ -246,8 +248,8 @@ static struct value *
gnuv3_get_vtable (struct gdbarch *gdbarch,
struct type *container_type, CORE_ADDR container_addr)
{
- struct type *vtable_type = gdbarch_data (gdbarch,
- vtable_type_gdbarch_data);
+ struct type *vtable_type
+ = (struct type *) gdbarch_data (gdbarch, vtable_type_gdbarch_data);
struct type *vtable_pointer_type;
struct value *vtable_pointer;
CORE_ADDR vtable_address;
@@ -778,7 +780,7 @@ DEF_VEC_P (value_and_voffset_p);
static hashval_t
hash_value_and_voffset (const void *p)
{
- const struct value_and_voffset *o = p;
+ const struct value_and_voffset *o = (const struct value_and_voffset *) p;
return value_address (o->value) + value_embedded_offset (o->value);
}
@@ -788,8 +790,8 @@ hash_value_and_voffset (const void *p)
static int
eq_value_and_voffset (const void *a, const void *b)
{
- const struct value_and_voffset *ova = a;
- const struct value_and_voffset *ovb = b;
+ const struct value_and_voffset *ova = (const struct value_and_voffset *) a;
+ const struct value_and_voffset *ovb = (const struct value_and_voffset *) b;
return (value_address (ova->value) + value_embedded_offset (ova->value)
== value_address (ovb->value) + value_embedded_offset (ovb->value));
@@ -800,10 +802,12 @@ eq_value_and_voffset (const void *a, const void *b)
static int
compare_value_and_voffset (const void *a, const void *b)
{
- const struct value_and_voffset * const *ova = a;
+ const struct value_and_voffset * const *ova
+ = (const struct value_and_voffset * const *) a;
CORE_ADDR addra = (value_address ((*ova)->value)
+ value_embedded_offset ((*ova)->value));
- const struct value_and_voffset * const *ovb = b;
+ const struct value_and_voffset * const *ovb
+ = (const struct value_and_voffset * const *) b;
CORE_ADDR addrb = (value_address ((*ovb)->value)
+ value_embedded_offset ((*ovb)->value));
@@ -841,7 +845,7 @@ compute_vtable_size (htab_t offset_hash,
search_vo.value = value;
slot = htab_find_slot (offset_hash, &search_vo, INSERT);
if (*slot)
- current_vo = *slot;
+ current_vo = (struct value_and_voffset *) *slot;
else
{
current_vo = XNEW (struct value_and_voffset);
@@ -1064,7 +1068,8 @@ gnuv3_get_typeid_type (struct gdbarch *gdbarch)
typeinfo = lookup_symbol ("std::type_info", NULL, STRUCT_DOMAIN,
NULL).symbol;
if (typeinfo == NULL)
- typeinfo_type = gdbarch_data (gdbarch, std_type_info_gdbarch_data);
+ typeinfo_type
+ = (struct type *) gdbarch_data (gdbarch, std_type_info_gdbarch_data);
else
typeinfo_type = SYMBOL_TYPE (typeinfo);
diff --git a/gdb/go-lang.c b/gdb/go-lang.c
index 509704c..f6d731b 100644
--- a/gdb/go-lang.c
+++ b/gdb/go-lang.c
@@ -655,7 +655,7 @@ static struct gdbarch_data *go_type_data;
const struct builtin_go_type *
builtin_go_type (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, go_type_data);
+ return (const struct builtin_go_type *) gdbarch_data (gdbarch, go_type_data);
}
extern initialize_file_ftype _initialize_go_language;
diff --git a/gdb/guile/scm-block.c b/gdb/guile/scm-block.c
index c4b367f..87dbd1a 100644
--- a/gdb/guile/scm-block.c
+++ b/gdb/guile/scm-block.c
@@ -85,7 +85,7 @@ static const struct objfile_data *bkscm_objfile_data_key;
static hashval_t
bkscm_hash_block_smob (const void *p)
{
- const block_smob *b_smob = p;
+ const block_smob *b_smob = (const block_smob *) p;
return htab_hash_pointer (b_smob->block);
}
@@ -95,8 +95,8 @@ bkscm_hash_block_smob (const void *p)
static int
bkscm_eq_block_smob (const void *ap, const void *bp)
{
- const block_smob *a = ap;
- const block_smob *b = bp;
+ const block_smob *a = (const block_smob *) ap;
+ const block_smob *b = (const block_smob *) bp;
return (a->block == b->block
&& a->block != NULL);
@@ -108,7 +108,7 @@ bkscm_eq_block_smob (const void *ap, const void *bp)
static htab_t
bkscm_objfile_block_map (struct objfile *objfile)
{
- htab_t htab = objfile_data (objfile, bkscm_objfile_data_key);
+ htab_t htab = (htab_t) objfile_data (objfile, bkscm_objfile_data_key);
if (htab == NULL)
{
@@ -347,7 +347,7 @@ bkscm_mark_block_invalid (void **slot, void *info)
static void
bkscm_del_objfile_blocks (struct objfile *objfile, void *datum)
{
- htab_t htab = datum;
+ htab_t htab = (htab_t) datum;
if (htab != NULL)
{
diff --git a/gdb/guile/scm-breakpoint.c b/gdb/guile/scm-breakpoint.c
index eea9b46..83574a3 100644
--- a/gdb/guile/scm-breakpoint.c
+++ b/gdb/guile/scm-breakpoint.c
@@ -509,7 +509,7 @@ gdbscm_delete_breakpoint_x (SCM self)
static int
bpscm_build_bp_list (struct breakpoint *bp, void *arg)
{
- SCM *list = arg;
+ SCM *list = (SCM *) arg;
breakpoint_smob *bp_smob = bp->scm_bp_object;
/* Lazily create wrappers for breakpoints created outside Scheme. */
diff --git a/gdb/guile/scm-disasm.c b/gdb/guile/scm-disasm.c
index fe37a38..d1572c7 100644
--- a/gdb/guile/scm-disasm.c
+++ b/gdb/guile/scm-disasm.c
@@ -79,9 +79,11 @@ dascm_make_insn (CORE_ADDR pc, const char *assembly, int insn_len)
static void *
gdbscm_disasm_read_memory_worker (void *datap)
{
- struct gdbscm_disasm_read_data *data = datap;
+ struct gdbscm_disasm_read_data *data
+ = (struct gdbscm_disasm_read_data *) datap;
struct disassemble_info *dinfo = data->dinfo;
- struct gdbscm_disasm_data *disasm_data = dinfo->application_data;
+ struct gdbscm_disasm_data *disasm_data
+ = (struct gdbscm_disasm_data *) dinfo->application_data;
SCM seekto, newpos, port = disasm_data->port;
size_t bytes_read;
@@ -141,10 +143,11 @@ gdbscm_disasm_memory_error (int status, bfd_vma memaddr,
static void
gdbscm_disasm_print_address (bfd_vma addr, struct disassemble_info *info)
{
- struct gdbscm_disasm_data *data = info->application_data;
+ struct gdbscm_disasm_data *data
+ = (struct gdbscm_disasm_data *) info->application_data;
struct gdbarch *gdbarch = data->gdbarch;
- print_address (gdbarch, addr, info->stream);
+ print_address (gdbarch, addr, (struct ui_file *) info->stream);
}
/* Subroutine of gdbscm_arch_disassemble to simplify it.
diff --git a/gdb/guile/scm-frame.c b/gdb/guile/scm-frame.c
index 38e1448..24e26e8 100644
--- a/gdb/guile/scm-frame.c
+++ b/gdb/guile/scm-frame.c
@@ -84,7 +84,7 @@ static const struct inferior_data *frscm_inferior_data_key;
static hashval_t
frscm_hash_frame_smob (const void *p)
{
- const frame_smob *f_smob = p;
+ const frame_smob *f_smob = (const frame_smob *) p;
const struct frame_id *fid = &f_smob->frame_id;
hashval_t hash = htab_hash_pointer (f_smob->inferior);
@@ -104,8 +104,8 @@ frscm_hash_frame_smob (const void *p)
static int
frscm_eq_frame_smob (const void *ap, const void *bp)
{
- const frame_smob *a = ap;
- const frame_smob *b = bp;
+ const frame_smob *a = (const frame_smob *) ap;
+ const frame_smob *b = (const frame_smob *) bp;
return (frame_id_eq (a->frame_id, b->frame_id)
&& a->inferior == b->inferior
@@ -118,7 +118,7 @@ frscm_eq_frame_smob (const void *ap, const void *bp)
static htab_t
frscm_inferior_frame_map (struct inferior *inferior)
{
- htab_t htab = inferior_data (inferior, frscm_inferior_data_key);
+ htab_t htab = (htab_t) inferior_data (inferior, frscm_inferior_data_key);
if (htab == NULL)
{
@@ -379,7 +379,7 @@ frscm_mark_frame_invalid (void **slot, void *info)
static void
frscm_del_inferior_frames (struct inferior *inferior, void *datum)
{
- htab_t htab = datum;
+ htab_t htab = (htab_t) datum;
if (htab != NULL)
{
diff --git a/gdb/guile/scm-gsmob.c b/gdb/guile/scm-gsmob.c
index 52368e9..504ea6c 100644
--- a/gdb/guile/scm-gsmob.c
+++ b/gdb/guile/scm-gsmob.c
@@ -193,7 +193,7 @@ gdbscm_add_objfile_ref (struct objfile *objfile,
g_smob->prev = NULL;
if (objfile != NULL)
{
- g_smob->next = objfile_data (objfile, data_key);
+ g_smob->next = (chained_gdb_smob *) objfile_data (objfile, data_key);
if (g_smob->next)
g_smob->next->prev = g_smob;
set_objfile_data (objfile, data_key, g_smob);
diff --git a/gdb/guile/scm-objfile.c b/gdb/guile/scm-objfile.c
index 0af151d..f85975e 100644
--- a/gdb/guile/scm-objfile.c
+++ b/gdb/guile/scm-objfile.c
@@ -116,7 +116,7 @@ ofscm_release_objfile (objfile_smob *o_smob)
static void
ofscm_handle_objfile_deleted (struct objfile *objfile, void *datum)
{
- objfile_smob *o_smob = datum;
+ objfile_smob *o_smob = (objfile_smob *) datum;
gdb_assert (o_smob->objfile == objfile);
@@ -148,7 +148,7 @@ ofscm_objfile_smob_from_objfile (struct objfile *objfile)
{
objfile_smob *o_smob;
- o_smob = objfile_data (objfile, ofscm_objfile_data_key);
+ o_smob = (objfile_smob *) objfile_data (objfile, ofscm_objfile_data_key);
if (o_smob == NULL)
{
SCM o_scm = ofscm_make_objfile_smob ();
diff --git a/gdb/guile/scm-ports.c b/gdb/guile/scm-ports.c
index 280e6d4..90bdb39 100644
--- a/gdb/guile/scm-ports.c
+++ b/gdb/guile/scm-ports.c
@@ -269,9 +269,9 @@ ioscm_write (SCM port, const void *data, size_t size)
TRY
{
if (scm_is_eq (port, error_port_scm))
- fputsn_filtered (data, size, gdb_stderr);
+ fputsn_filtered ((const char *) data, size, gdb_stderr);
else
- fputsn_filtered (data, size, gdb_stdout);
+ fputsn_filtered ((const char *) data, size, gdb_stdout);
}
CATCH (except, RETURN_MASK_ALL)
{
@@ -430,7 +430,7 @@ gdbscm_error_port (void)
static void
ioscm_file_port_delete (struct ui_file *file)
{
- ioscm_file_port *stream = ui_file_data (file);
+ ioscm_file_port *stream = (ioscm_file_port *) ui_file_data (file);
if (stream->magic != &file_port_magic)
internal_error (__FILE__, __LINE__,
@@ -441,7 +441,7 @@ ioscm_file_port_delete (struct ui_file *file)
static void
ioscm_file_port_rewind (struct ui_file *file)
{
- ioscm_file_port *stream = ui_file_data (file);
+ ioscm_file_port *stream = (ioscm_file_port *) ui_file_data (file);
if (stream->magic != &file_port_magic)
internal_error (__FILE__, __LINE__,
@@ -455,7 +455,7 @@ ioscm_file_port_put (struct ui_file *file,
ui_file_put_method_ftype *write,
void *dest)
{
- ioscm_file_port *stream = ui_file_data (file);
+ ioscm_file_port *stream = (ioscm_file_port *) ui_file_data (file);
if (stream->magic != &file_port_magic)
internal_error (__FILE__, __LINE__,
@@ -469,7 +469,7 @@ ioscm_file_port_write (struct ui_file *file,
const char *buffer,
long length_buffer)
{
- ioscm_file_port *stream = ui_file_data (file);
+ ioscm_file_port *stream = (ioscm_file_port *) ui_file_data (file);
if (stream->magic != &file_port_magic)
internal_error (__FILE__, __LINE__,
diff --git a/gdb/guile/scm-progspace.c b/gdb/guile/scm-progspace.c
index a95e834..32c3206 100644
--- a/gdb/guile/scm-progspace.c
+++ b/gdb/guile/scm-progspace.c
@@ -126,7 +126,7 @@ psscm_release_pspace (pspace_smob *p_smob)
static void
psscm_handle_pspace_deleted (struct program_space *pspace, void *datum)
{
- pspace_smob *p_smob = datum;
+ pspace_smob *p_smob = (pspace_smob *) datum;
gdb_assert (p_smob->pspace == pspace);
@@ -158,7 +158,7 @@ psscm_pspace_smob_from_pspace (struct program_space *pspace)
{
pspace_smob *p_smob;
- p_smob = program_space_data (pspace, psscm_pspace_data_key);
+ p_smob = (pspace_smob *) program_space_data (pspace, psscm_pspace_data_key);
if (p_smob == NULL)
{
SCM p_scm = psscm_make_pspace_smob ();
diff --git a/gdb/guile/scm-safe-call.c b/gdb/guile/scm-safe-call.c
index 6052214..62aec0f 100644
--- a/gdb/guile/scm-safe-call.c
+++ b/gdb/guile/scm-safe-call.c
@@ -97,7 +97,7 @@ scscm_nop_unwind_handler (void *data, SCM key, SCM args)
static SCM
scscm_recording_pre_unwind_handler (void *datap, SCM key, SCM args)
{
- struct with_catch_data *data = datap;
+ struct with_catch_data *data = (struct with_catch_data *) datap;
excp_matcher_func *matcher = data->excp_matcher;
if (matcher != NULL && matcher (key))
@@ -126,7 +126,7 @@ scscm_recording_pre_unwind_handler (void *datap, SCM key, SCM args)
static SCM
scscm_recording_unwind_handler (void *datap, SCM key, SCM args)
{
- struct with_catch_data *data = datap;
+ struct with_catch_data *data = (struct with_catch_data *) datap;
/* We need to record the stack in the exception since we're about to
throw and lose the location that got the exception. We do this by
@@ -147,7 +147,7 @@ scscm_recording_unwind_handler (void *datap, SCM key, SCM args)
static void *
gdbscm_with_catch (void *data)
{
- struct with_catch_data *d = data;
+ struct with_catch_data *d = (struct with_catch_data *) data;
d->catch_result
= scm_c_catch (SCM_BOOL_T,
@@ -230,7 +230,7 @@ gdbscm_call_guile (SCM (*func) (void *), void *data,
static SCM
scscm_call_0_body (void *argsp)
{
- SCM *args = argsp;
+ SCM *args = (SCM *) argsp;
return scm_call_0 (args[0]);
}
@@ -248,7 +248,7 @@ gdbscm_safe_call_0 (SCM proc, excp_matcher_func *ok_excps)
static SCM
scscm_call_1_body (void *argsp)
{
- SCM *args = argsp;
+ SCM *args = (SCM *) argsp;
return scm_call_1 (args[0], args[1]);
}
@@ -266,7 +266,7 @@ gdbscm_safe_call_1 (SCM proc, SCM arg0, excp_matcher_func *ok_excps)
static SCM
scscm_call_2_body (void *argsp)
{
- SCM *args = argsp;
+ SCM *args = (SCM *) argsp;
return scm_call_2 (args[0], args[1], args[2]);
}
@@ -284,7 +284,7 @@ gdbscm_safe_call_2 (SCM proc, SCM arg0, SCM arg1, excp_matcher_func *ok_excps)
static SCM
scscm_call_3_body (void *argsp)
{
- SCM *args = argsp;
+ SCM *args = (SCM *) argsp;
return scm_call_3 (args[0], args[1], args[2], args[3]);
}
@@ -303,7 +303,7 @@ gdbscm_safe_call_3 (SCM proc, SCM arg1, SCM arg2, SCM arg3,
static SCM
scscm_call_4_body (void *argsp)
{
- SCM *args = argsp;
+ SCM *args = (SCM *) argsp;
return scm_call_4 (args[0], args[1], args[2], args[3], args[4]);
}
@@ -322,7 +322,7 @@ gdbscm_safe_call_4 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4,
static SCM
scscm_apply_1_body (void *argsp)
{
- SCM *args = argsp;
+ SCM *args = (SCM *) argsp;
return scm_apply_1 (args[0], args[1], args[2]);
}
@@ -372,7 +372,8 @@ struct eval_scheme_string_data
static void *
scscm_eval_scheme_string (void *datap)
{
- struct eval_scheme_string_data *data = datap;
+ struct eval_scheme_string_data *data
+ = (struct eval_scheme_string_data *) datap;
SCM result = scm_c_eval_string (data->string);
if (data->display_result && !scm_is_eq (result, SCM_UNSPECIFIED))
@@ -402,7 +403,7 @@ gdbscm_safe_eval_string (const char *string, int display_result)
result = gdbscm_with_guile (scscm_eval_scheme_string, (void *) &data);
if (result != NULL)
- return xstrdup (result);
+ return xstrdup ((char *) result);
return NULL;
}
\f
@@ -413,7 +414,7 @@ gdbscm_safe_eval_string (const char *string, int display_result)
static void *
scscm_source_scheme_script (void *data)
{
- const char *filename = data;
+ const char *filename = (const char *) data;
/* The Guile docs don't specify what the result is.
Maybe it's SCM_UNSPECIFIED, but the docs should specify that. :-) */
@@ -451,7 +452,7 @@ gdbscm_safe_source_script (const char *filename)
xfree (abs_filename);
if (result != NULL)
- return xstrdup (result);
+ return xstrdup ((char *) result);
return NULL;
}
\f
diff --git a/gdb/guile/scm-string.c b/gdb/guile/scm-string.c
index c55da90..e6cb1d1 100644
--- a/gdb/guile/scm-string.c
+++ b/gdb/guile/scm-string.c
@@ -93,7 +93,7 @@ struct scm_to_stringn_data
static SCM
gdbscm_call_scm_to_stringn (void *datap)
{
- struct scm_to_stringn_data *data = datap;
+ struct scm_to_stringn_data *data = (struct scm_to_stringn_data *) datap;
data->result = scm_to_stringn (data->string, data->lenp, data->charset,
data->conversion_kind);
@@ -161,7 +161,7 @@ struct scm_from_stringn_data
static SCM
gdbscm_call_scm_from_stringn (void *datap)
{
- struct scm_from_stringn_data *data = datap;
+ struct scm_from_stringn_data *data = (struct scm_from_stringn_data *) datap;
data->result = scm_from_stringn (data->string, data->len, data->charset,
data->conversion_kind);
diff --git a/gdb/guile/scm-symbol.c b/gdb/guile/scm-symbol.c
index f711a02..81e4d50 100644
--- a/gdb/guile/scm-symbol.c
+++ b/gdb/guile/scm-symbol.c
@@ -65,7 +65,7 @@ struct syscm_gdbarch_data
static hashval_t
syscm_hash_symbol_smob (const void *p)
{
- const symbol_smob *s_smob = p;
+ const symbol_smob *s_smob = (const symbol_smob *) p;
return htab_hash_pointer (s_smob->symbol);
}
@@ -75,8 +75,8 @@ syscm_hash_symbol_smob (const void *p)
static int
syscm_eq_symbol_smob (const void *ap, const void *bp)
{
- const symbol_smob *a = ap;
- const symbol_smob *b = bp;
+ const symbol_smob *a = (const symbol_smob *) ap;
+ const symbol_smob *b = (const symbol_smob *) bp;
return (a->symbol == b->symbol
&& a->symbol != NULL);
@@ -105,7 +105,7 @@ syscm_get_symbol_map (struct symbol *symbol)
{
struct objfile *objfile = symbol_objfile (symbol);
- htab = objfile_data (objfile, syscm_objfile_data_key);
+ htab = (htab_t) objfile_data (objfile, syscm_objfile_data_key);
if (htab == NULL)
{
htab = gdbscm_create_eqable_gsmob_ptr_map (syscm_hash_symbol_smob,
@@ -116,7 +116,8 @@ syscm_get_symbol_map (struct symbol *symbol)
else
{
struct gdbarch *gdbarch = symbol_arch (symbol);
- struct syscm_gdbarch_data *data = gdbarch_data (gdbarch,
+ struct syscm_gdbarch_data *data
+ = (struct syscm_gdbarch_data *) gdbarch_data (gdbarch,
syscm_gdbarch_data_key);
htab = data->htab;
@@ -311,7 +312,7 @@ syscm_mark_symbol_invalid (void **slot, void *info)
static void
syscm_del_objfile_symbols (struct objfile *objfile, void *datum)
{
- htab_t htab = datum;
+ htab_t htab = (htab_t) datum;
if (htab != NULL)
{
diff --git a/gdb/guile/scm-symtab.c b/gdb/guile/scm-symtab.c
index 6d16b27..6b6edca 100644
--- a/gdb/guile/scm-symtab.c
+++ b/gdb/guile/scm-symtab.c
@@ -86,7 +86,7 @@ static const struct objfile_data *stscm_objfile_data_key;
static hashval_t
stscm_hash_symtab_smob (const void *p)
{
- const symtab_smob *st_smob = p;
+ const symtab_smob *st_smob = (const symtab_smob *) p;
return htab_hash_pointer (st_smob->symtab);
}
@@ -96,8 +96,8 @@ stscm_hash_symtab_smob (const void *p)
static int
stscm_eq_symtab_smob (const void *ap, const void *bp)
{
- const symtab_smob *a = ap;
- const symtab_smob *b = bp;
+ const symtab_smob *a = (const symtab_smob *) ap;
+ const symtab_smob *b = (const symtab_smob *) bp;
return (a->symtab == b->symtab
&& a->symtab != NULL);
@@ -110,7 +110,7 @@ static htab_t
stscm_objfile_symtab_map (struct symtab *symtab)
{
struct objfile *objfile = SYMTAB_OBJFILE (symtab);
- htab_t htab = objfile_data (objfile, stscm_objfile_data_key);
+ htab_t htab = (htab_t) objfile_data (objfile, stscm_objfile_data_key);
if (htab == NULL)
{
@@ -292,7 +292,7 @@ stscm_mark_symtab_invalid (void **slot, void *info)
static void
stscm_del_objfile_symtabs (struct objfile *objfile, void *datum)
{
- htab_t htab = datum;
+ htab_t htab = (htab_t) datum;
if (htab != NULL)
{
diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c
index 11b355d..642ce15 100644
--- a/gdb/guile/scm-type.c
+++ b/gdb/guile/scm-type.c
@@ -139,7 +139,7 @@ tyscm_type_name (struct type *type, SCM *excp)
static hashval_t
tyscm_hash_type_smob (const void *p)
{
- const type_smob *t_smob = p;
+ const type_smob *t_smob = (const type_smob *) p;
return htab_hash_pointer (t_smob->type);
}
@@ -149,8 +149,8 @@ tyscm_hash_type_smob (const void *p)
static int
tyscm_eq_type_smob (const void *ap, const void *bp)
{
- const type_smob *a = ap;
- const type_smob *b = bp;
+ const type_smob *a = (const type_smob *) ap;
+ const type_smob *b = (const type_smob *) bp;
return (a->type == b->type
&& a->type != NULL);
@@ -170,7 +170,7 @@ tyscm_type_map (struct type *type)
if (objfile == NULL)
return global_types_map;
- htab = objfile_data (objfile, tyscm_objfile_data_key);
+ htab = (htab_t) objfile_data (objfile, tyscm_objfile_data_key);
if (htab == NULL)
{
htab = gdbscm_create_eqable_gsmob_ptr_map (tyscm_hash_type_smob,
@@ -353,7 +353,7 @@ static int
tyscm_copy_type_recursive (void **slot, void *info)
{
type_smob *t_smob = (type_smob *) *slot;
- htab_t copied_types = info;
+ htab_t copied_types = (htab_t) info;
struct objfile *objfile = TYPE_OBJFILE (t_smob->type);
htab_t htab;
eqable_gdb_smob **new_slot;
@@ -388,7 +388,7 @@ tyscm_copy_type_recursive (void **slot, void *info)
static void
save_objfile_types (struct objfile *objfile, void *datum)
{
- htab_t htab = datum;
+ htab_t htab = (htab_t) datum;
htab_t copied_types;
if (!gdb_scheme_initialized)
diff --git a/gdb/guile/scm-utils.c b/gdb/guile/scm-utils.c
index da45a05..872a1ee 100644
--- a/gdb/guile/scm-utils.c
+++ b/gdb/guile/scm-utils.c
@@ -201,7 +201,7 @@ extract_arg (char format_char, SCM arg, void *argp,
{
case 's':
{
- char **arg_ptr = argp;
+ char **arg_ptr = (char **) argp;
CHECK_TYPE (gdbscm_is_true (scm_string_p (arg)), arg, position,
func_name, _("string"));
@@ -210,7 +210,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 't':
{
- int *arg_ptr = argp;
+ int *arg_ptr = (int *) argp;
/* While in Scheme, anything non-#f is "true", we're strict. */
CHECK_TYPE (gdbscm_is_bool (arg), arg, position, func_name,
@@ -220,7 +220,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 'i':
{
- int *arg_ptr = argp;
+ int *arg_ptr = (int *) argp;
CHECK_TYPE (scm_is_signed_integer (arg, INT_MIN, INT_MAX),
arg, position, func_name, _("int"));
@@ -229,7 +229,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 'u':
{
- int *arg_ptr = argp;
+ int *arg_ptr = (int *) argp;
CHECK_TYPE (scm_is_unsigned_integer (arg, 0, UINT_MAX),
arg, position, func_name, _("unsigned int"));
@@ -238,7 +238,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 'l':
{
- long *arg_ptr = argp;
+ long *arg_ptr = (long *) argp;
CHECK_TYPE (scm_is_signed_integer (arg, LONG_MIN, LONG_MAX),
arg, position, func_name, _("long"));
@@ -247,7 +247,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 'n':
{
- unsigned long *arg_ptr = argp;
+ unsigned long *arg_ptr = (unsigned long *) argp;
CHECK_TYPE (scm_is_unsigned_integer (arg, 0, ULONG_MAX),
arg, position, func_name, _("unsigned long"));
@@ -256,7 +256,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 'L':
{
- LONGEST *arg_ptr = argp;
+ LONGEST *arg_ptr = (LONGEST *) argp;
CHECK_TYPE (scm_is_signed_integer (arg, INT64_MIN, INT64_MAX),
arg, position, func_name, _("LONGEST"));
@@ -265,7 +265,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 'U':
{
- ULONGEST *arg_ptr = argp;
+ ULONGEST *arg_ptr = (ULONGEST *) argp;
CHECK_TYPE (scm_is_unsigned_integer (arg, 0, UINT64_MAX),
arg, position, func_name, _("ULONGEST"));
@@ -274,7 +274,7 @@ extract_arg (char format_char, SCM arg, void *argp,
}
case 'O':
{
- SCM *arg_ptr = argp;
+ SCM *arg_ptr = (SCM *) argp;
*arg_ptr = arg;
break;
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index a8cfc52..f4b97c1 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -432,7 +432,7 @@ h8300_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR current_pc;
if (*this_cache)
- return *this_cache;
+ return (struct h8300_frame_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct h8300_frame_cache);
h8300_init_frame_cache (gdbarch, cache);
diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c
index 6dc2e84..0b05c37 100644
--- a/gdb/hppa-linux-tdep.c
+++ b/gdb/hppa-linux-tdep.c
@@ -205,7 +205,7 @@ hppa_linux_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
int i;
if (*this_cache)
- return *this_cache;
+ return (struct hppa_linux_sigtramp_unwind_cache *) *this_cache;
info = FRAME_OBSTACK_ZALLOC (struct hppa_linux_sigtramp_unwind_cache);
*this_cache = info;
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index cf894ee..78462d3 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -223,8 +223,8 @@ hppa_init_objfile_priv_data (struct objfile *objfile)
static int
compare_unwind_entries (const void *arg1, const void *arg2)
{
- const struct unwind_table_entry *a = arg1;
- const struct unwind_table_entry *b = arg2;
+ const struct unwind_table_entry *a = (const struct unwind_table_entry *) arg1;
+ const struct unwind_table_entry *b = (const struct unwind_table_entry *) arg2;
if (a->region_start > b->region_start)
return 1;
@@ -504,14 +504,16 @@ find_unwind_entry (CORE_ADDR pc)
{
struct hppa_unwind_info *ui;
ui = NULL;
- priv = objfile_data (objfile, hppa_objfile_priv_data);
+ priv = ((struct hppa_objfile_private *)
+ objfile_data (objfile, hppa_objfile_priv_data));
if (priv)
ui = ((struct hppa_objfile_private *) priv)->unwind_info;
if (!ui)
{
read_unwind_info (objfile);
- priv = objfile_data (objfile, hppa_objfile_priv_data);
+ priv = ((struct hppa_objfile_private *)
+ objfile_data (objfile, hppa_objfile_priv_data));
if (priv == NULL)
error (_("Internal error reading unwind information."));
ui = ((struct hppa_objfile_private *) priv)->unwind_info;
@@ -1904,7 +1906,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache)
if (hppa_debug)
fprintf_unfiltered (gdb_stdlog, "base=%s (cached) }",
paddress (gdbarch, ((struct hppa_frame_cache *)*this_cache)->base));
- return (*this_cache);
+ return (struct hppa_frame_cache *) (*this_cache);
}
cache = FRAME_OBSTACK_ZALLOC (struct hppa_frame_cache);
(*this_cache) = cache;
@@ -1916,7 +1918,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache)
{
if (hppa_debug)
fprintf_unfiltered (gdb_stdlog, "base=NULL (no unwind entry) }");
- return (*this_cache);
+ return (struct hppa_frame_cache *) (*this_cache);
}
/* Turn the Entry_GR field into a bitmask. */
@@ -2006,7 +2008,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache)
{
error (_("Cannot read instruction at %s."),
paddress (gdbarch, pc));
- return (*this_cache);
+ return (struct hppa_frame_cache *) (*this_cache);
}
inst = extract_unsigned_integer (buf4, sizeof buf4, byte_order);
@@ -2279,7 +2281,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache)
if (hppa_debug)
fprintf_unfiltered (gdb_stdlog, "base=%s }",
paddress (gdbarch, ((struct hppa_frame_cache *)*this_cache)->base));
- return (*this_cache);
+ return (struct hppa_frame_cache *) (*this_cache);
}
static void
@@ -2453,7 +2455,7 @@ hppa_stub_frame_unwind_cache (struct frame_info *this_frame,
struct unwind_table_entry *u;
if (*this_cache)
- return *this_cache;
+ return (struct hppa_stub_unwind_cache *) *this_cache;
info = FRAME_OBSTACK_ZALLOC (struct hppa_stub_unwind_cache);
*this_cache = info;
diff --git a/gdb/hppanbsd-tdep.c b/gdb/hppanbsd-tdep.c
index 767db62..33ae55a 100644
--- a/gdb/hppanbsd-tdep.c
+++ b/gdb/hppanbsd-tdep.c
@@ -165,7 +165,7 @@ hppanbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
gdb_assert (len >= HPPANBSD_SIZEOF_GREGS);
diff --git a/gdb/hppaobsd-tdep.c b/gdb/hppaobsd-tdep.c
index c9bc1bf..1f5278d 100644
--- a/gdb/hppaobsd-tdep.c
+++ b/gdb/hppaobsd-tdep.c
@@ -44,7 +44,7 @@ hppaobsd_supply_gregset (const struct regset *regset,
int regnum, const void *gregs, size_t len)
{
gdb_byte zero[4] = { 0 };
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
size_t offset;
int i;
@@ -114,7 +114,7 @@ hppaobsd_supply_fpregset (const struct regset *regset,
int regnum, const void *fpregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- const gdb_byte *regs = fpregs;
+ const gdb_byte *regs = (const gdb_byte *) fpregs;
int i;
gdb_assert (len >= HPPAOBSD_SIZEOF_FPREGS);
diff --git a/gdb/i386-cygwin-tdep.c b/gdb/i386-cygwin-tdep.c
index cb70258..1c9dc91 100644
--- a/gdb/i386-cygwin-tdep.c
+++ b/gdb/i386-cygwin-tdep.c
@@ -98,7 +98,7 @@ struct cpms_data
static void
core_process_module_section (bfd *abfd, asection *sect, void *obj)
{
- struct cpms_data *data = obj;
+ struct cpms_data *data = (struct cpms_data *) obj;
enum bfd_endian byte_order = gdbarch_byte_order (data->gdbarch);
char *module_name;
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 898beda..d02c527 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -745,7 +745,8 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
const struct target_desc *tdesc = info.target_desc;
- struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info;
+ struct tdesc_arch_data *tdesc_data
+ = (struct tdesc_arch_data *) info.tdep_info;
const struct tdesc_feature *feature;
int valid_p;
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index d4df18e..2ac2f15 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -2050,7 +2050,7 @@ i386_frame_cache (struct frame_info *this_frame, void **this_cache)
struct i386_frame_cache *cache;
if (*this_cache)
- return *this_cache;
+ return (struct i386_frame_cache *) *this_cache;
cache = i386_alloc_frame_cache ();
*this_cache = cache;
@@ -2220,7 +2220,7 @@ i386_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR sp;
if (*this_cache)
- return *this_cache;
+ return (struct i386_frame_cache *) *this_cache;
cache = i386_alloc_frame_cache ();
*this_cache = cache;
@@ -2407,7 +2407,7 @@ i386_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
gdb_byte buf[4];
if (*this_cache)
- return *this_cache;
+ return (struct i386_frame_cache *) *this_cache;
cache = i386_alloc_frame_cache ();
@@ -3732,7 +3732,7 @@ i386_supply_gregset (const struct regset *regset, struct regcache *regcache,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
gdb_assert (len >= tdep->sizeof_gregset);
@@ -3757,7 +3757,7 @@ i386_collect_gregset (const struct regset *regset,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- gdb_byte *regs = gregs;
+ gdb_byte *regs = (gdb_byte *) gregs;
int i;
gdb_assert (len >= tdep->sizeof_gregset);
@@ -8478,7 +8478,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_insn_is_jump (gdbarch, i386_insn_is_jump);
/* Hook in ABI-specific overrides, if they have been registered. */
- info.tdep_info = (void *) tdesc_data;
+ info.tdep_info = (struct gdbarch_tdep_info *) tdesc_data;
gdbarch_init_osabi (info, gdbarch);
if (!i386_validate_tdesc_p (tdep, tdesc_data))
diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c
index f344a97..8684b07 100644
--- a/gdb/i386obsd-tdep.c
+++ b/gdb/i386obsd-tdep.c
@@ -141,7 +141,7 @@ i386obsd_aout_supply_regset (const struct regset *regset,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- const gdb_byte *gregs = regs;
+ const gdb_byte *gregs = (const gdb_byte *) regs;
gdb_assert (len >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE);
@@ -348,7 +348,7 @@ i386obsd_trapframe_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
*this_cache = cache;
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index ad9fa08..9bc45fb 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -449,7 +449,7 @@ i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- const gdb_byte *regs = fsave;
+ const gdb_byte *regs = (const gdb_byte *) fsave;
int i;
gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
@@ -502,7 +502,7 @@ void
i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
- gdb_byte *regs = fsave;
+ gdb_byte *regs = (gdb_byte *) fsave;
int i;
gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
@@ -595,7 +595,7 @@ void
i387_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
- const gdb_byte *regs = fxsave;
+ const gdb_byte *regs = (const gdb_byte *) fxsave;
int i;
gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
@@ -678,7 +678,7 @@ void
i387_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
- gdb_byte *regs = fxsave;
+ gdb_byte *regs = (gdb_byte *) fxsave;
int i;
gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
@@ -896,7 +896,7 @@ i387_supply_xsave (struct regcache *regcache, int regnum,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- const gdb_byte *regs = xsave;
+ const gdb_byte *regs = (const gdb_byte *) xsave;
int i;
unsigned int clear_bv;
static const gdb_byte zero[MAX_REGISTER_SIZE] = { 0 };
@@ -1269,7 +1269,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- gdb_byte *regs = xsave;
+ gdb_byte *regs = (gdb_byte *) xsave;
int i;
enum
{
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index a468be9..46a114c 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -1853,7 +1853,7 @@ ia64_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR cfm, psr;
if (*this_cache)
- return *this_cache;
+ return (struct ia64_frame_cache *) *this_cache;
cache = ia64_alloc_frame_cache ();
*this_cache = cache;
@@ -2240,7 +2240,7 @@ ia64_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
gdb_byte buf[8];
if (*this_cache)
- return *this_cache;
+ return (struct ia64_frame_cache *) *this_cache;
cache = ia64_alloc_frame_cache ();
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 4713490..c4d7d8b 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -2690,7 +2690,8 @@ struct attach_command_continuation_args
static void
attach_command_continuation (void *args, int err)
{
- struct attach_command_continuation_args *a = args;
+ struct attach_command_continuation_args *a
+ = (struct attach_command_continuation_args *) args;
if (err)
return;
@@ -2701,7 +2702,8 @@ attach_command_continuation (void *args, int err)
static void
attach_command_continuation_free_args (void *args)
{
- struct attach_command_continuation_args *a = args;
+ struct attach_command_continuation_args *a
+ = (struct attach_command_continuation_args *) args;
xfree (a->args);
xfree (a);
diff --git a/gdb/inferior.c b/gdb/inferior.c
index 04e9a28..ae8b2a1 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -74,7 +74,7 @@ set_current_inferior (struct inferior *inf)
static void
restore_inferior (void *arg)
{
- struct inferior *saved_inferior = arg;
+ struct inferior *saved_inferior = (struct inferior *) arg;
set_current_inferior (saved_inferior);
}
@@ -171,7 +171,8 @@ struct delete_thread_of_inferior_arg
static int
delete_thread_of_inferior (struct thread_info *tp, void *data)
{
- struct delete_thread_of_inferior_arg *arg = data;
+ struct delete_thread_of_inferior_arg *arg
+ = (struct delete_thread_of_inferior_arg *) data;
if (ptid_get_pid (tp->ptid) == arg->pid)
{
diff --git a/gdb/inflow.c b/gdb/inflow.c
index cdc47a0..d38a43d 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -506,7 +506,7 @@ static const struct inferior_data *inflow_inferior_data;
static void
inflow_inferior_data_cleanup (struct inferior *inf, void *arg)
{
- struct terminal_info *info = arg;
+ struct terminal_info *info = (struct terminal_info *) arg;
xfree (info->run_terminal);
xfree (info->ttystate);
@@ -521,7 +521,7 @@ get_inflow_inferior_data (struct inferior *inf)
{
struct terminal_info *info;
- info = inferior_data (inf, inflow_inferior_data);
+ info = (struct terminal_info *) inferior_data (inf, inflow_inferior_data);
if (info == NULL)
{
info = XCNEW (struct terminal_info);
@@ -542,7 +542,7 @@ inflow_inferior_exit (struct inferior *inf)
{
struct terminal_info *info;
- info = inferior_data (inf, inflow_inferior_data);
+ info = (struct terminal_info *) inferior_data (inf, inflow_inferior_data);
if (info != NULL)
{
xfree (info->run_terminal);
diff --git a/gdb/infrun.c b/gdb/infrun.c
index ec88621..cf91370 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1692,7 +1692,8 @@ displaced_step_clear (struct displaced_step_inferior_state *displaced)
static void
displaced_step_clear_cleanup (void *arg)
{
- struct displaced_step_inferior_state *state = arg;
+ struct displaced_step_inferior_state *state
+ = (struct displaced_step_inferior_state *) arg;
displaced_step_clear (state);
}
@@ -7835,7 +7836,7 @@ print_stop_location (struct target_waitstatus *ws)
static void
restore_current_uiout_cleanup (void *arg)
{
- struct ui_out *saved_uiout = arg;
+ struct ui_out *saved_uiout = (struct ui_out *) arg;
current_uiout = saved_uiout;
}
@@ -7941,7 +7942,7 @@ save_stop_context (void)
static void
release_stop_context_cleanup (void *arg)
{
- struct stop_context *sc = arg;
+ struct stop_context *sc = (struct stop_context *) arg;
if (sc->thread != NULL)
sc->thread->refcount--;
@@ -8727,7 +8728,7 @@ restore_infcall_suspend_state (struct infcall_suspend_state *inf_state)
static void
do_restore_infcall_suspend_state_cleanup (void *state)
{
- restore_infcall_suspend_state (state);
+ restore_infcall_suspend_state ((struct infcall_suspend_state *) state);
}
struct cleanup *
@@ -8869,7 +8870,7 @@ restore_infcall_control_state (struct infcall_control_state *inf_status)
static void
do_restore_infcall_control_state_cleanup (void *sts)
{
- restore_infcall_control_state (sts);
+ restore_infcall_control_state ((struct infcall_control_state *) sts);
}
struct cleanup *
@@ -8903,7 +8904,7 @@ discard_infcall_control_state (struct infcall_control_state *inf_status)
static void
restore_inferior_ptid (void *arg)
{
- ptid_t *saved_ptid_ptr = arg;
+ ptid_t *saved_ptid_ptr = (ptid_t *) arg;
inferior_ptid = *saved_ptid_ptr;
xfree (arg);
diff --git a/gdb/inline-frame.c b/gdb/inline-frame.c
index e5d7360..aa041d9 100644
--- a/gdb/inline-frame.c
+++ b/gdb/inline-frame.c
@@ -283,7 +283,7 @@ block_starting_point_at (CORE_ADDR pc, const struct block *block)
if (BLOCKVECTOR_MAP (bv) == NULL)
return 0;
- new_block = addrmap_find (BLOCKVECTOR_MAP (bv), pc - 1);
+ new_block = (struct block *) addrmap_find (BLOCKVECTOR_MAP (bv), pc - 1);
if (new_block == NULL)
return 1;
diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c
index f979591..efeb244 100644
--- a/gdb/iq2000-tdep.c
+++ b/gdb/iq2000-tdep.c
@@ -372,7 +372,7 @@ iq2000_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct iq2000_frame_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct iq2000_frame_cache);
iq2000_init_frame_cache (cache);
diff --git a/gdb/jit.c b/gdb/jit.c
index 6302052..fbc0d02 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -285,7 +285,7 @@ get_jit_objfile_data (struct objfile *objf)
{
struct jit_objfile_data *objf_data;
- objf_data = objfile_data (objf, jit_objfile_data);
+ objf_data = (struct jit_objfile_data *) objfile_data (objf, jit_objfile_data);
if (objf_data == NULL)
{
objf_data = XCNEW (struct jit_objfile_data);
@@ -315,7 +315,9 @@ get_jit_program_space_data (void)
{
struct jit_program_space_data *ps_data;
- ps_data = program_space_data (current_program_space, jit_program_space_data);
+ ps_data
+ = ((struct jit_program_space_data *)
+ program_space_data (current_program_space, jit_program_space_data));
if (ps_data == NULL)
{
ps_data = XCNEW (struct jit_program_space_data);
@@ -791,7 +793,7 @@ jit_object_close_impl (struct gdb_symbol_callbacks *cb,
struct objfile *objfile;
jit_dbg_reader_data *priv_data;
- priv_data = cb->priv_data;
+ priv_data = (jit_dbg_reader_data *) cb->priv_data;
objfile = allocate_objfile (NULL, "<< JIT compiled code >>",
OBJF_NOT_FILENAME);
@@ -989,7 +991,8 @@ jit_find_objf_with_entry_addr (CORE_ADDR entry_addr)
{
struct jit_objfile_data *objf_data;
- objf_data = objfile_data (objf, jit_objfile_data);
+ objf_data
+ = (struct jit_objfile_data *) objfile_data (objf, jit_objfile_data);
if (objf_data != NULL && objf_data->addr == entry_addr)
return objf;
}
@@ -1011,7 +1014,8 @@ jit_breakpoint_deleted (struct breakpoint *b)
{
struct jit_program_space_data *ps_data;
- ps_data = program_space_data (iter->pspace, jit_program_space_data);
+ ps_data = ((struct jit_program_space_data *)
+ program_space_data (iter->pspace, jit_program_space_data));
if (ps_data != NULL && ps_data->jit_breakpoint == iter->owner)
{
ps_data->cached_code_address = 0;
@@ -1100,7 +1104,7 @@ jit_unwind_reg_set_impl (struct gdb_unwind_callbacks *cb, int dwarf_regnum,
struct jit_unwind_private *priv;
int gdb_reg;
- priv = cb->priv_data;
+ priv = (struct jit_unwind_private *) cb->priv_data;
gdb_reg = gdbarch_dwarf2_reg_to_regnum (get_frame_arch (priv->this_frame),
dwarf_regnum);
@@ -1133,7 +1137,7 @@ jit_unwind_reg_get_impl (struct gdb_unwind_callbacks *cb, int regnum)
int gdb_reg, size;
struct gdbarch *frame_arch;
- priv = cb->priv_data;
+ priv = (struct jit_unwind_private *) cb->priv_data;
frame_arch = get_frame_arch (priv->this_frame);
gdb_reg = gdbarch_dwarf2_reg_to_regnum (frame_arch, regnum);
@@ -1153,7 +1157,7 @@ jit_unwind_reg_get_impl (struct gdb_unwind_callbacks *cb, int regnum)
static void
jit_dealloc_cache (struct frame_info *this_frame, void *cache)
{
- struct jit_unwind_private *priv_data = cache;
+ struct jit_unwind_private *priv_data = (struct jit_unwind_private *) cache;
struct gdbarch *frame_arch;
int i;
@@ -1196,7 +1200,7 @@ jit_frame_sniffer (const struct frame_unwind *self,
gdb_assert (!*cache);
*cache = XCNEW (struct jit_unwind_private);
- priv_data = *cache;
+ priv_data = (struct jit_unwind_private *) *cache;
priv_data->registers =
XCNEWVEC (struct gdb_reg_value *,
gdbarch_num_regs (get_frame_arch (this_frame)));
@@ -1258,7 +1262,7 @@ jit_frame_this_id (struct frame_info *this_frame, void **cache,
static struct value *
jit_frame_prev_register (struct frame_info *this_frame, void **cache, int reg)
{
- struct jit_unwind_private *priv = *cache;
+ struct jit_unwind_private *priv = (struct jit_unwind_private *) *cache;
struct gdb_reg_value *value;
if (priv == NULL)
@@ -1303,7 +1307,8 @@ jit_prepend_unwinder (struct gdbarch *gdbarch)
{
struct jit_gdbarch_data_type *data;
- data = gdbarch_data (gdbarch, jit_gdbarch_data);
+ data
+ = (struct jit_gdbarch_data_type *) gdbarch_data (gdbarch, jit_gdbarch_data);
if (!data->unwinder_registered)
{
frame_unwind_prepend_unwinder (gdbarch, &jit_frame_unwind);
@@ -1391,8 +1396,8 @@ jit_inferior_exit_hook (struct inferior *inf)
ALL_OBJFILES_SAFE (objf, temp)
{
- struct jit_objfile_data *objf_data = objfile_data (objf,
- jit_objfile_data);
+ struct jit_objfile_data *objf_data
+ = (struct jit_objfile_data *) objfile_data (objf, jit_objfile_data);
if (objf_data != NULL && objf_data->addr != 0)
jit_unregister_code (objf);
@@ -1443,13 +1448,15 @@ jit_event_handler (struct gdbarch *gdbarch)
static void
free_objfile_data (struct objfile *objfile, void *data)
{
- struct jit_objfile_data *objf_data = data;
+ struct jit_objfile_data *objf_data = (struct jit_objfile_data *) data;
if (objf_data->register_code != NULL)
{
struct jit_program_space_data *ps_data;
- ps_data = program_space_data (objfile->pspace, jit_program_space_data);
+ ps_data
+ = ((struct jit_program_space_data *)
+ program_space_data (objfile->pspace, jit_program_space_data));
if (ps_data != NULL && ps_data->objfile == objfile)
ps_data->objfile = NULL;
}
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c
index 43e2c6b..b8432e3 100644
--- a/gdb/jv-lang.c
+++ b/gdb/jv-lang.c
@@ -79,11 +79,12 @@ struct jv_per_objfile_data
static void
jv_per_objfile_free (struct objfile *objfile, void *data)
{
- struct jv_per_objfile_data *jv_data = data;
+ struct jv_per_objfile_data *jv_data = (struct jv_per_objfile_data *) data;
struct objfile *dynamics_objfile;
- dynamics_objfile = program_space_data (current_program_space,
- jv_dynamics_progspace_key);
+ dynamics_objfile
+ = (struct objfile *) program_space_data (current_program_space,
+ jv_dynamics_progspace_key);
gdb_assert (objfile == dynamics_objfile);
if (jv_data->dict)
@@ -106,8 +107,9 @@ get_dynamics_objfile (struct gdbarch *gdbarch)
{
struct objfile *dynamics_objfile;
- dynamics_objfile = program_space_data (current_program_space,
- jv_dynamics_progspace_key);
+ dynamics_objfile
+ = (struct objfile *) program_space_data (current_program_space,
+ jv_dynamics_progspace_key);
if (dynamics_objfile == NULL)
{
@@ -165,7 +167,8 @@ get_java_class_symtab (struct gdbarch *gdbarch)
BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK) = bl;
/* Arrange to free the dict. */
- jv_data = objfile_data (objfile, jv_dynamics_objfile_data_key);
+ jv_data = ((struct jv_per_objfile_data *)
+ objfile_data (objfile, jv_dynamics_objfile_data_key));
jv_data->dict = BLOCK_DICT (bl);
}
return class_symtab;
@@ -1236,7 +1239,8 @@ static struct gdbarch_data *java_type_data;
const struct builtin_java_type *
builtin_java_type (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, java_type_data);
+ return ((const struct builtin_java_type *)
+ gdbarch_data (gdbarch, java_type_data));
}
void
diff --git a/gdb/language.c b/gdb/language.c
index b6fe77e..6a10539 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -975,8 +975,8 @@ struct type *
language_string_char_type (const struct language_defn *la,
struct gdbarch *gdbarch)
{
- struct language_gdbarch *ld = gdbarch_data (gdbarch,
- language_gdbarch_data);
+ struct language_gdbarch *ld
+ = (struct language_gdbarch *) gdbarch_data (gdbarch, language_gdbarch_data);
return ld->arch_info[la->la_language].string_char_type;
}
@@ -985,8 +985,8 @@ struct type *
language_bool_type (const struct language_defn *la,
struct gdbarch *gdbarch)
{
- struct language_gdbarch *ld = gdbarch_data (gdbarch,
- language_gdbarch_data);
+ struct language_gdbarch *ld
+ = (struct language_gdbarch *) gdbarch_data (gdbarch, language_gdbarch_data);
if (ld->arch_info[la->la_language].bool_type_symbol)
{
@@ -1029,8 +1029,8 @@ language_lookup_primitive_type (const struct language_defn *la,
struct gdbarch *gdbarch,
const char *name)
{
- struct language_gdbarch *ld = gdbarch_data (gdbarch,
- language_gdbarch_data);
+ struct language_gdbarch *ld =
+ (struct language_gdbarch *) gdbarch_data (gdbarch, language_gdbarch_data);
struct type **typep;
typep = language_lookup_primitive_type_1 (&ld->arch_info[la->la_language],
@@ -1106,8 +1106,8 @@ language_lookup_primitive_type_as_symbol (const struct language_defn *la,
struct gdbarch *gdbarch,
const char *name)
{
- struct language_gdbarch *ld = gdbarch_data (gdbarch,
- language_gdbarch_data);
+ struct language_gdbarch *ld
+ = (struct language_gdbarch *) gdbarch_data (gdbarch, language_gdbarch_data);
struct language_arch_info *lai = &ld->arch_info[la->la_language];
struct type **typep;
struct symbol *sym;
diff --git a/gdb/linespec.c b/gdb/linespec.c
index a61b08a..b2233b9 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -868,7 +868,7 @@ add_sal_to_sals (struct linespec_state *self,
static hashval_t
hash_address_entry (const void *p)
{
- const struct address_entry *aep = p;
+ const struct address_entry *aep = (const struct address_entry *) p;
hashval_t hash;
hash = iterative_hash_object (aep->pspace, 0);
@@ -880,8 +880,8 @@ hash_address_entry (const void *p)
static int
eq_address_entry (const void *a, const void *b)
{
- const struct address_entry *aea = a;
- const struct address_entry *aeb = b;
+ const struct address_entry *aea = (const struct address_entry *) a;
+ const struct address_entry *aeb = (const struct address_entry *) b;
return aea->pspace == aeb->pspace && aea->addr == aeb->addr;
}
@@ -929,7 +929,8 @@ iterate_inline_only (struct symbol *sym, void *d)
{
if (SYMBOL_INLINED (sym))
{
- struct symbol_and_data_callback *cad = d;
+ struct symbol_and_data_callback *cad
+ = (struct symbol_and_data_callback *) d;
return cad->callback (sym, cad->data);
}
@@ -953,7 +954,8 @@ struct symbol_matcher_data
static int
iterate_name_matcher (const char *name, void *d)
{
- const struct symbol_matcher_data *data = d;
+ const struct symbol_matcher_data *data
+ = (const struct symbol_matcher_data *) d;
if (data->symbol_name_cmp (name, data->lookup_name) == 0)
return 1; /* Expand this symbol's symbol table. */
@@ -1294,8 +1296,8 @@ struct decode_line_2_item
static int
decode_line_2_compare_items (const void *ap, const void *bp)
{
- const struct decode_line_2_item *a = ap;
- const struct decode_line_2_item *b = bp;
+ const struct decode_line_2_item *a = (const struct decode_line_2_item *) ap;
+ const struct decode_line_2_item *b = (const struct decode_line_2_item *) bp;
int retval;
retval = strcmp (a->displayform, b->displayform);
@@ -2809,7 +2811,8 @@ struct decode_compound_collector
static int
collect_one_symbol (struct symbol *sym, void *d)
{
- struct decode_compound_collector *collector = d;
+ struct decode_compound_collector *collector
+ = (struct decode_compound_collector *) d;
void **slot;
struct type *t;
@@ -2889,8 +2892,8 @@ lookup_prefix_sym (struct linespec_state *state, VEC (symtab_ptr) *file_symtabs,
static int
compare_symbols (const void *a, const void *b)
{
- struct symbol * const *sa = a;
- struct symbol * const *sb = b;
+ struct symbol * const *sa = (struct symbol * const*) a;
+ struct symbol * const *sb = (struct symbol * const*) b;
uintptr_t uia, uib;
uia = (uintptr_t) SYMTAB_PSPACE (symbol_symtab (*sa));
@@ -2917,8 +2920,10 @@ compare_symbols (const void *a, const void *b)
static int
compare_msymbols (const void *a, const void *b)
{
- const struct bound_minimal_symbol *sa = a;
- const struct bound_minimal_symbol *sb = b;
+ const struct bound_minimal_symbol *sa
+ = (const struct bound_minimal_symbol *) a;
+ const struct bound_minimal_symbol *sb
+ = (const struct bound_minimal_symbol *) b;
uintptr_t uia, uib;
uia = (uintptr_t) sa->objfile->pspace;
@@ -3099,7 +3104,7 @@ struct symtab_collector
static int
add_symtabs_to_list (struct symtab *symtab, void *d)
{
- struct symtab_collector *data = d;
+ struct symtab_collector *data = (struct symtab_collector *) d;
void **slot;
slot = htab_find_slot (data->symtab_table, symtab, INSERT);
@@ -3522,7 +3527,7 @@ linespec_parse_variable (struct linespec_state *self, const char *variable)
static int
collect_symbols (struct symbol *sym, void *data)
{
- struct collect_info *info = data;
+ struct collect_info *info = (struct collect_info *) data;
/* In list mode, add all matching symbols, regardless of class.
This allows the user to type "list a_global_variable". */
@@ -3630,8 +3635,8 @@ classify_mtype (enum minimal_symbol_type t)
static int
compare_msyms (const void *a, const void *b)
{
- const bound_minimal_symbol_d *moa = a;
- const bound_minimal_symbol_d *mob = b;
+ const bound_minimal_symbol_d *moa = (const bound_minimal_symbol_d *) a;
+ const bound_minimal_symbol_d *mob = (const bound_minimal_symbol_d *) b;
enum minimal_symbol_type ta = MSYMBOL_TYPE (moa->minsym);
enum minimal_symbol_type tb = MSYMBOL_TYPE (mob->minsym);
@@ -3644,7 +3649,7 @@ compare_msyms (const void *a, const void *b)
static void
add_minsym (struct minimal_symbol *minsym, void *d)
{
- struct collect_minsyms *info = d;
+ struct collect_minsyms *info = (struct collect_minsyms *) d;
bound_minimal_symbol_d mo;
mo.minsym = minsym;
@@ -3898,7 +3903,7 @@ destroy_linespec_result (struct linespec_result *ls)
static void
cleanup_linespec_result (void *a)
{
- destroy_linespec_result (a);
+ destroy_linespec_result ((struct linespec_result *) a);
}
/* See the comment in linespec.h. */
diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c
index fdea247..9a469d4 100644
--- a/gdb/linux-fork.c
+++ b/gdb/linux-fork.c
@@ -415,7 +415,7 @@ linux_fork_detach (const char *args, int from_tty)
static void
inferior_call_waitpid_cleanup (void *fp)
{
- struct fork_info *oldfp = fp;
+ struct fork_info *oldfp = (struct fork_info *) fp;
if (oldfp)
{
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index c6dbc01..6423ecc 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -438,7 +438,7 @@ num_lwps (int pid)
static void
delete_lwp_cleanup (void *lp_voidp)
{
- struct lwp_info *lp = lp_voidp;
+ struct lwp_info *lp = (struct lwp_info *) lp_voidp;
delete_lwp (lp->ptid);
}
@@ -2719,7 +2719,7 @@ running_callback (struct lwp_info *lp, void *data)
static int
count_events_callback (struct lwp_info *lp, void *data)
{
- int *count = data;
+ int *count = (int *) data;
gdb_assert (count != NULL);
@@ -2758,7 +2758,7 @@ lwp_status_pending_p (struct lwp_info *lp)
static int
select_event_lwp_callback (struct lwp_info *lp, void *data)
{
- int *selector = data;
+ int *selector = (int *) data;
gdb_assert (selector != NULL);
@@ -3641,7 +3641,7 @@ linux_nat_wait_1 (struct target_ops *ops,
static int
resume_stopped_resumed_lwps (struct lwp_info *lp, void *data)
{
- ptid_t *wait_ptid_p = data;
+ ptid_t *wait_ptid_p = (ptid_t *) data;
if (!lp->stopped)
{
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index 86d9eef..9dc342d 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -171,7 +171,8 @@ init_linux_gdbarch_data (struct gdbarch *gdbarch)
static struct linux_gdbarch_data *
get_linux_gdbarch_data (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, linux_gdbarch_data_handle);
+ return ((struct linux_gdbarch_data *)
+ gdbarch_data (gdbarch, linux_gdbarch_data_handle));
}
/* Per-inferior data key. */
@@ -203,7 +204,7 @@ invalidate_linux_cache_inf (struct inferior *inf)
{
struct linux_info *info;
- info = inferior_data (inf, linux_inferior_data);
+ info = (struct linux_info *) inferior_data (inf, linux_inferior_data);
if (info != NULL)
{
xfree (info);
@@ -230,7 +231,7 @@ get_linux_inferior_data (void)
struct linux_info *info;
struct inferior *inf = current_inferior ();
- info = inferior_data (inf, linux_inferior_data);
+ info = (struct linux_info *) inferior_data (inf, linux_inferior_data);
if (info == NULL)
{
info = XCNEW (struct linux_info);
@@ -1306,7 +1307,8 @@ linux_find_memory_regions_thunk (ULONGEST vaddr, ULONGEST size,
int read, int write, int exec, int modified,
const char *filename, void *arg)
{
- struct linux_find_memory_regions_data *data = arg;
+ struct linux_find_memory_regions_data *data
+ = (struct linux_find_memory_regions_data *) arg;
return data->func (vaddr, size, read, write, exec, modified, data->obfd);
}
@@ -1454,7 +1456,8 @@ linux_make_mappings_callback (ULONGEST vaddr, ULONGEST size,
int read, int write, int exec, int modified,
const char *filename, void *data)
{
- struct linux_make_mappings_data *map_data = data;
+ struct linux_make_mappings_data *map_data
+ = (struct linux_make_mappings_data *) data;
gdb_byte buf[sizeof (ULONGEST)];
if (*filename == '\0' || inode == 0)
@@ -1665,7 +1668,8 @@ struct linux_corefile_thread_data
static int
linux_corefile_thread_callback (struct thread_info *info, void *data)
{
- struct linux_corefile_thread_data *args = data;
+ struct linux_corefile_thread_data *args
+ = (struct linux_corefile_thread_data *) data;
/* It can be current thread
which cannot be removed by update_thread_list. */
@@ -2252,7 +2256,7 @@ find_mapping_size (CORE_ADDR vaddr, unsigned long size,
int read, int write, int exec, int modified,
void *data)
{
- struct mem_range *range = data;
+ struct mem_range *range = (struct mem_range *) data;
if (vaddr == range->start)
{
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 91bd0dc..66e9595 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1566,7 +1566,7 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
td_err_e err;
ptid_t ptid;
struct thread_info *tp;
- struct callback_data *cb_data = data;
+ struct callback_data *cb_data = (struct callback_data *) data;
struct thread_db_info *info = cb_data->info;
err = info->td_thr_get_info_p (th_p, &ti);
diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c
index 779575c..25a7e1e 100644
--- a/gdb/lm32-tdep.c
+++ b/gdb/lm32-tdep.c
@@ -422,7 +422,7 @@ lm32_frame_cache (struct frame_info *this_frame, void **this_prologue_cache)
int i;
if ((*this_prologue_cache))
- return (*this_prologue_cache);
+ return (struct lm32_frame_cache *) (*this_prologue_cache);
info = FRAME_OBSTACK_ZALLOC (struct lm32_frame_cache);
(*this_prologue_cache) = info;
diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c
index fb93c64..2a1e166 100644
--- a/gdb/m2-lang.c
+++ b/gdb/m2-lang.c
@@ -425,7 +425,7 @@ static struct gdbarch_data *m2_type_data;
const struct builtin_m2_type *
builtin_m2_type (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, m2_type_data);
+ return (const struct builtin_m2_type *) gdbarch_data (gdbarch, m2_type_data);
}
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c
index 3b7a585..f2d060a 100644
--- a/gdb/m32c-tdep.c
+++ b/gdb/m32c-tdep.c
@@ -1875,10 +1875,11 @@ m32c_analyze_frame_prologue (struct frame_info *this_frame,
*this_prologue_cache = FRAME_OBSTACK_ZALLOC (struct m32c_prologue);
m32c_analyze_prologue (get_frame_arch (this_frame),
- func_start, stop_addr, *this_prologue_cache);
+ func_start, stop_addr,
+ (struct m32c_prologue *) *this_prologue_cache);
}
- return *this_prologue_cache;
+ return (struct m32c_prologue *) *this_prologue_cache;
}
diff --git a/gdb/m32r-linux-tdep.c b/gdb/m32r-linux-tdep.c
index 83d31fd..4abda5e 100644
--- a/gdb/m32r-linux-tdep.c
+++ b/gdb/m32r-linux-tdep.c
@@ -230,7 +230,7 @@ m32r_linux_sigtramp_frame_cache (struct frame_info *this_frame,
int regnum;
if ((*this_cache) != NULL)
- return (*this_cache);
+ return (struct m32r_frame_cache *) (*this_cache);
cache = FRAME_OBSTACK_ZALLOC (struct m32r_frame_cache);
(*this_cache) = cache;
cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -351,7 +351,7 @@ m32r_linux_supply_gregset (const struct regset *regset,
struct regcache *regcache, int regnum,
const void *gregs, size_t size)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
enum bfd_endian byte_order =
gdbarch_byte_order (get_regcache_arch (regcache));
ULONGEST psw, bbpsw;
@@ -394,7 +394,7 @@ m32r_linux_collect_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs, size_t size)
{
- gdb_byte *regs = gregs;
+ gdb_byte *regs = (gdb_byte *) gregs;
int i;
enum bfd_endian byte_order =
gdbarch_byte_order (get_regcache_arch (regcache));
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index ba93322..9b89ad9 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -540,7 +540,7 @@ m32r_frame_unwind_cache (struct frame_info *this_frame,
if ((*this_prologue_cache))
- return (*this_prologue_cache);
+ return (struct m32r_unwind_cache *) (*this_prologue_cache);
info = FRAME_OBSTACK_ZALLOC (struct m32r_unwind_cache);
(*this_prologue_cache) = info;
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index df7cd0c..a9c425c 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -792,7 +792,7 @@ m68hc11_frame_unwind_cache (struct frame_info *this_frame,
int i;
if ((*this_prologue_cache))
- return (*this_prologue_cache);
+ return (struct m68hc11_unwind_cache *) (*this_prologue_cache);
info = FRAME_OBSTACK_ZALLOC (struct m68hc11_unwind_cache);
(*this_prologue_cache) = info;
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 285a831..01e67b9 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -882,7 +882,7 @@ m68k_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct m68k_frame_cache *) *this_cache;
cache = m68k_alloc_frame_cache ();
*this_cache = cache;
diff --git a/gdb/m68kbsd-tdep.c b/gdb/m68kbsd-tdep.c
index ae0cecf..ff1da70 100644
--- a/gdb/m68kbsd-tdep.c
+++ b/gdb/m68kbsd-tdep.c
@@ -59,7 +59,7 @@ m68kbsd_supply_fpregset (const struct regset *regset,
int regnum, const void *fpregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- const gdb_byte *regs = fpregs;
+ const gdb_byte *regs = (const gdb_byte *) fpregs;
int i;
gdb_assert (len >= M68KBSD_SIZEOF_FPREGS);
@@ -81,7 +81,7 @@ m68kbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
gdb_assert (len >= M68KBSD_SIZEOF_GREGS);
diff --git a/gdb/m68klinux-tdep.c b/gdb/m68klinux-tdep.c
index c60a879..02579b1 100644
--- a/gdb/m68klinux-tdep.c
+++ b/gdb/m68klinux-tdep.c
@@ -263,7 +263,7 @@ m68k_linux_sigtramp_frame_cache (struct frame_info *this_frame,
int i;
if (*this_cache)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c
index abfd082..94ea409 100644
--- a/gdb/m88k-tdep.c
+++ b/gdb/m88k-tdep.c
@@ -652,7 +652,7 @@ m88k_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR frame_sp;
if (*this_cache)
- return *this_cache;
+ return (struct m88k_frame_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct m88k_frame_cache);
cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -782,7 +782,7 @@ m88k_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
for (i = 0; i < M88K_NUM_REGS; i++)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 85b6126..7d52ba0 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
+
+ * gdb.gdb/selftest.exp (do_steps_and_nexts): Adjust expected
+ source line.
+
2015-09-24 Sandra Loosemore <sandra@codesourcery.com>
* gdb.cp/classes.exp (test_enums): Generalize regexp to allow
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
index a170f73..8b1298f 100644
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -40,7 +40,7 @@ proc do_steps_and_nexts {} {
# me with GCC 3.1 on i686-pc-linux-gnu when I compile with
# optimization.
gdb_test_multiple "list" "list" {
- -re ".*context = data.*$gdb_prompt $" {
+ -re ".*context = \\(struct captured_main_args \\*\\) data.*$gdb_prompt $" {
set description "step over context initialization"
set command "step"
}
--
2.5.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/2] Add some more casts (2/2)
2015-09-25 13:20 ` Yao Qi
@ 2015-09-25 18:19 ` Simon Marchi
2015-09-28 15:45 ` Ulrich Weigand
0 siblings, 1 reply; 12+ messages in thread
From: Simon Marchi @ 2015-09-25 18:19 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
On 15-09-25 09:20 AM, Yao Qi wrote:
> Simon Marchi <simon.marchi@ericsson.com> writes:
>
>> - const struct ppc_reg_offsets *offsets = regset->regmap;
>> + const struct ppc_reg_offsets *offsets =
>> + (const struct ppc_reg_offsets *) regset->regmap;
>
> The same nit I pointed out in patch 2/2, here and elsewhere.
>
> Patch is OK otherwise.
Pushed with formatting fixed, thanks.
From 19ba03f49581e407097a3e4821a957c422551ae5 Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@ericsson.com>
Date: Fri, 25 Sep 2015 14:08:07 -0400
Subject: [PATCH 3/3] Add some more casts (2/2)
See previous patch's description.
gdb/ChangeLog:
* macrocmd.c (print_macro_callback): Add cast(s).
* macrotab.c (macro_bcache_str): Likewise.
(new_macro_definition): Likewise.
* main.c (captured_main): Likewise.
* maint.c (print_bfd_section_info): Likewise.
* mdebugread.c (mdebug_build_psymtabs): Likewise.
(basic_type): Likewise.
* memattr.c (mem_region_cmp): Likewise.
* memory-map.c (memory_map_start_memory): Likewise.
(memory_map_end_memory): Likewise.
(memory_map_start_property): Likewise.
(memory_map_end_property): Likewise.
(clear_result): Likewise.
* memrange.c (compare_mem_ranges): Likewise.
* mep-tdep.c (mep_analyze_frame_prologue): Likewise.
* mi/mi-cmd-var.c (mi_cmd_var_update_iter): Likewise.
* mi/mi-console.c (mi_console_file_delete): Likewise.
(mi_console_file_fputs): Likewise.
(mi_console_raw_packet): Likewise.
(mi_console_file_flush): Likewise.
(mi_console_set_raw): Likewise.
* mi/mi-interp.c (mi_interpreter_resume): Likewise.
(mi_new_thread): Likewise.
(mi_thread_exit): Likewise.
(mi_record_changed): Likewise.
(mi_inferior_added): Likewise.
(mi_inferior_appeared): Likewise.
(mi_inferior_exit): Likewise.
(mi_inferior_removed): Likewise.
(mi_interp_data): Likewise.
(mi_on_normal_stop): Likewise.
(mi_traceframe_changed): Likewise.
(mi_tsv_created): Likewise.
(mi_tsv_deleted): Likewise.
(mi_tsv_modified): Likewise.
(mi_breakpoint_created): Likewise.
(mi_breakpoint_deleted): Likewise.
(mi_breakpoint_modified): Likewise.
(mi_output_running_pid): Likewise.
(mi_inferior_count): Likewise.
(mi_solib_loaded): Likewise.
(mi_solib_unloaded): Likewise.
(mi_command_param_changed): Likewise.
(mi_memory_changed): Likewise.
(report_initial_inferior): Likewise.
(mi_ui_out): Likewise.
(mi_set_logging): Likewise.
* mi/mi-main.c (collect_cores): Likewise.
(print_one_inferior): Likewise.
(free_vector_of_ints): Likewise.
(free_splay_tree): Likewise.
(mi_execute_command): Likewise.
* mi/mi-out.c (mi_table_body): Likewise.
(mi_table_end): Likewise.
(mi_table_header): Likewise.
(mi_begin): Likewise.
(mi_end): Likewise.
(mi_field_int): Likewise.
(mi_field_string): Likewise.
(mi_field_fmt): Likewise.
(mi_flush): Likewise.
(mi_redirect): Likewise.
(field_separator): Likewise.
(mi_open): Likewise.
(mi_close): Likewise.
(mi_out_buffered): Likewise.
(mi_out_rewind): Likewise.
(mi_out_put): Likewise.
(mi_version): Likewise.
(mi_out_data_dtor): Likewise.
* mi/mi-parse.c (mi_parse_cleanup): Likewise.
* microblaze-tdep.c (microblaze_frame_cache): Likewise.
* minidebug.c (lzma_open): Likewise.
(lzma_pread): Likewise.
(lzma_close): Likewise.
(lzma_stat): Likewise.
* mips-linux-tdep.c (mips_linux_init_abi): Likewise.
* mips-sde-tdep.c (mips_sde_frame_cache): Likewise.
(mips_sde_elf_osabi_sniff_abi_tag_sections): Likewise.
* mips-tdep.c (mips_insn16_frame_cache): Likewise.
(mips_micro_frame_cache): Likewise.
(mips_insn32_frame_cache): Likewise.
(mips_stub_frame_cache): Likewise.
(gdb_print_insn_mips): Likewise.
(value_of_mips_user_reg): Likewise.
(mips_gdbarch_init): Likewise.
* mips64obsd-tdep.c (mips64obsd_supply_gregset): Likewise.
* mipsnbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
(mipsnbsd_supply_gregset): Likewise.
* mn10300-linux-tdep.c (am33_supply_fpregset_method): Likewise.
(am33_collect_gregset_method): Likewise.
(am33_collect_fpregset_method): Likewise.
* mn10300-tdep.c (mn10300_analyze_frame_prologue): Likewise.
* moxie-tdep.c (moxie_frame_cache): Likewise.
* msp430-tdep.c (msp430_get_opcode_byte): Likewise.
(msp430_analyze_frame_prologue): Likewise.
* mt-tdep.c (mt_frame_unwind_cache): Likewise.
* nios2-linux-tdep.c (nios2_supply_gregset): Likewise.
(nios2_collect_gregset): Likewise.
* nios2-tdep.c (nios2_frame_unwind_cache): Likewise.
(nios2_stub_frame_cache): Likewise.
* objc-lang.c (find_methods): Likewise.
* objfiles.c (objfiles_pspace_data_cleanup): Likewise.
(get_objfile_pspace_data): Likewise.
(get_objfile_bfd_data): Likewise.
(objfile_bfd_data_free): Likewise.
(add_to_objfile_sections): Likewise.
(do_free_objfile_cleanup): Likewise.
(resume_section_map_updates_cleanup): Likewise.
* opencl-lang.c (builtin_opencl_type): Likewise.
* osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Likewise.
* osdata.c (osdata_start_osdata): Likewise.
(osdata_start_item): Likewise.
(osdata_start_column): Likewise.
(osdata_end_column): Likewise.
(clear_parsing_data): Likewise.
(osdata_free_cleanup): Likewise.
* parse.c (type_stack_cleanup): Likewise.
(exp_uses_objfile_iter): Likewise.
* ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
(ppc_linux_collect_gregset): Likewise.
(ppu2spu_prev_arch): Likewise.
(ppu2spu_this_id): Likewise.
(ppu2spu_prev_register): Likewise.
(ppu2spu_unwind_register): Likewise.
(ppu2spu_sniffer): Likewise.
(ppu2spu_dealloc_cache): Likewise.
(ppc_linux_init_abi): Likewise.
* ppcfbsd-tdep.c (ppcfbsd_sigtramp_frame_cache): Likewise.
* ppcobsd-tdep.c (ppcobsd_sigtramp_frame_cache): Likewise.
* progspace.c (restore_program_space): Likewise.
* psymtab.c (find_pc_sect_psymtab): Likewise.
(compare_psymbols): Likewise.
(psymbol_bcache_full): Likewise.
(allocate_psymtab): Likewise.
(discard_psymtabs_upto): Likewise.
* python/py-block.c (set_block): Likewise.
(del_objfile_blocks): Likewise.
* python/py-breakpoint.c (build_bp_list): Likewise.
* python/py-inferior.c (inferior_to_inferior_object): Likewise.
(build_inferior_list): Likewise.
(py_free_inferior): Likewise.
* python/py-objfile.c (py_free_objfile): Likewise.
(objfile_to_objfile_object): Likewise.
* python/py-prettyprint.c (py_restore_tstate): Likewise.
* python/py-progspace.c (py_free_pspace): Likewise.
(pspace_to_pspace_object): Likewise.
* python/py-symbol.c (set_symbol): Likewise.
(del_objfile_symbols): Likewise.
* python/py-symtab.c (set_sal): Likewise.
(set_symtab): Likewise.
(del_objfile_symtab): Likewise.
(del_objfile_sal): Likewise.
* python/py-type.c (save_objfile_types): Likewise.
(set_type): Likewise.
* python/py-unwind.c (pyuw_prev_register): Likewise.
(pyuw_on_new_gdbarch): Likewise.
* python/py-utils.c (py_decref): Likewise.
(py_xdecref): Likewise.
(gdb_py_generic_dict): Likewise.
* python/py-xmethods.c (gdbpy_free_xmethod_worker_data): Likewise.
(gdbpy_clone_xmethod_worker_data): Likewise.
(gdbpy_get_xmethod_arg_types): Likewise.
(gdbpy_get_xmethod_result_type): Likewise.
(gdbpy_invoke_xmethod): Likewise.
* python/python.c (gdbpy_apply_type_printers): Likewise.
(gdbpy_free_type_printers): Likewise.
* record-btrace.c (record_btrace_disable_callback): Likewise.
(bfcache_hash): Likewise.
(bfcache_eq): Likewise.
(btrace_get_frame_function): Likewise.
(record_btrace_frame_unwind_stop_reason): Likewise.
(record_btrace_frame_this_id): Likewise.
(record_btrace_frame_prev_register): Likewise.
(record_btrace_frame_dealloc_cache): Likewise.
* record-full.c (record_full_message_wrapper): Likewise.
(record_full_save_cleanups): Likewise.
* regcache.c (regcache_descr): Likewise.
(do_regcache_xfree): Likewise.
(do_regcache_invalidate): Likewise.
(do_cooked_read): Likewise.
(regcache_transfer_regset): Likewise.
* reggroups.c (reggroup_add): Likewise.
(reggroup_next): Likewise.
(reggroup_prev): Likewise.
* remote-fileio.c (do_remote_fileio_request): Likewise.
* remote-notif.c (remote_async_get_pending_events_handler): Likewise.
(do_notif_event_xfree): Likewise.
* remote.c (get_remote_arch_state): Likewise.
(remote_pspace_data_cleanup): Likewise.
(get_remote_exec_file): Likewise.
(set_pspace_remote_exec_file): Likewise.
(compare_pnums): Likewise.
(clear_threads_listing_context): Likewise.
(remote_newthread_step): Likewise.
(start_thread): Likewise.
(end_thread): Likewise.
(remove_child_of_pending_fork): Likewise.
(remove_stop_reply_for_inferior): Likewise.
(remove_stop_reply_of_remote_state): Likewise.
(remote_notif_remove_once_on_match): Likewise.
(stop_reply_match_ptid_and_ws): Likewise.
(kill_child_of_pending_fork): Likewise.
(register_remote_g_packet_guess): Likewise.
(remote_read_description_p): Likewise.
(remote_read_description): Likewise.
(free_actions_list_cleanup_wrapper): Likewise.
(remote_async_serial_handler): Likewise.
* rl78-tdep.c (rl78_get_opcode_byte): Likewise.
(rl78_analyze_frame_prologue): Likewise.
* rs6000-tdep.c (ppc_supply_gregset): Likewise.
(ppc_supply_fpregset): Likewise.
(ppc_supply_vsxregset): Likewise.
(ppc_supply_vrregset): Likewise.
(ppc_collect_gregset): Likewise.
(ppc_collect_fpregset): Likewise.
(ppc_collect_vsxregset): Likewise.
(ppc_collect_vrregset): Likewise.
(e500_move_ev_register): Likewise.
(do_regcache_raw_write): Likewise.
(rs6000_frame_cache): Likewise.
(rs6000_epilogue_frame_cache): Likewise.
(rs6000_gdbarch_init): Likewise.
* rx-tdep.c (rx_get_opcode_byte): Likewise.
(rx_analyze_frame_prologue): Likewise.
(rx_frame_type): Likewise.
(rx_frame_sniffer_common): Likewise.
* s390-linux-tdep.c (s390_check_for_saved): Likewise.
(s390_frame_unwind_cache): Likewise.
(s390_stub_frame_unwind_cache): Likewise.
(s390_sigtramp_frame_unwind_cache): Likewise.
* score-tdep.c (score_make_prologue_cache): Likewise.
* sentinel-frame.c (sentinel_frame_prev_register): Likewise.
(sentinel_frame_prev_arch): Likewise.
* ser-base.c (fd_event): Likewise.
(push_event): Likewise.
(ser_base_write): Likewise.
* ser-pipe.c (pipe_close): Likewise.
* serial.c (serial_write): Likewise.
* sh-tdep.c (sh_frame_cache): Likewise.
(sh_stub_this_id): Likewise.
* sh64-tdep.c (sh64_frame_cache): Likewise.
* solib-aix.c (get_solib_aix_inferior_data): Likewise.
(library_list_start_library): Likewise.
(library_list_start_list): Likewise.
(solib_aix_free_library_list): Likewise.
* solib-darwin.c (get_darwin_info): Likewise.
* solib-dsbt.c (get_dsbt_info): Likewise.
* solib-spu.c (append_ocl_sos): Likewise.
* solib-svr4.c (svr4_pspace_data_cleanup): Likewise.
(get_svr4_info): Likewise.
(library_list_start_library): Likewise.
(svr4_library_list_start_list): Likewise.
(hash_probe_and_action): Likewise.
(equal_probe_and_action): Likewise.
(svr4_update_solib_event_breakpoint): Likewise.
(set_solib_svr4_fetch_link_map_offsets): Likewise.
(svr4_fetch_link_map_offsets): Likewise.
(svr4_have_link_map_offsets): Likewise.
* solib-target.c (library_list_start_segment): Likewise.
(library_list_start_section): Likewise.
(library_list_start_library): Likewise.
(library_list_end_library): Likewise.
(library_list_start_list): Likewise.
(solib_target_free_library_list): Likewise.
* solib.c (solib_ops): Likewise.
(set_solib_ops): Likewise.
* sparc-sol2-tdep.c (sparc32_sol2_sigtramp_frame_cache): Likewise.
* sparc-tdep.c (sparc_frame_cache): Likewise.
(sparc32_frame_cache): Likewise.
(sparc32_supply_gregset): Likewise.
(sparc32_collect_gregset): Likewise.
(sparc32_supply_fpregset): Likewise.
(sparc32_collect_fpregset): Likewise.
* sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_cache): Likewise.
* sparc64-tdep.c (sparc64_supply_gregset): Likewise.
(sparc64_collect_gregset): Likewise.
(sparc64_supply_fpregset): Likewise.
(sparc64_collect_fpregset): Likewise.
* sparc64fbsd-tdep.c (sparc64fbsd_sigtramp_frame_cache): Likewise.
* sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_frame_cache): Likewise.
* sparc64obsd-tdep.c (sparc64obsd_frame_cache): Likewise.
(sparc64obsd_trapframe_cache): Likewise.
* sparcnbsd-tdep.c (sparc32nbsd_sigcontext_frame_cache): Likewise.
* sparcobsd-tdep.c (sparc32obsd_sigtramp_frame_cache): Likewise.
* spu-multiarch.c (spu_gdbarch): Likewise.
* spu-tdep.c (spu_frame_unwind_cache): Likewise.
(spu2ppu_prev_arch): Likewise.
(spu2ppu_this_id): Likewise.
(spu2ppu_prev_register): Likewise.
(spu2ppu_dealloc_cache): Likewise.
(spu_dis_asm_print_address): Likewise.
(gdb_print_insn_spu): Likewise.
(spu_get_overlay_table): Likewise.
* stabsread.c (rs6000_builtin_type): Likewise.
* stack.c (do_print_variable_and_value): Likewise.
* stap-probe.c (get_stap_base_address_1): Likewise.
* symfile-debug.c (debug_qf_has_symbols): Likewise.
(debug_qf_find_last_source_symtab): Likewise.
(debug_qf_forget_cached_source_info): Likewise.
(debug_qf_map_symtabs_matching_filename): Likewise.
(debug_qf_lookup_symbol): Likewise.
(debug_qf_print_stats): Likewise.
(debug_qf_dump): Likewise.
(debug_qf_relocate): Likewise.
(debug_qf_expand_symtabs_for_function): Likewise.
(debug_qf_expand_all_symtabs): Likewise.
(debug_qf_expand_symtabs_with_fullname): Likewise.
(debug_qf_map_matching_symbols): Likewise.
(debug_qf_expand_symtabs_matching): Likewise.
(debug_qf_find_pc_sect_compunit_symtab): Likewise.
(debug_qf_map_symbol_filenames): Likewise.
(debug_sym_get_probes): Likewise.
(debug_sym_new_init): Likewise.
(debug_sym_init): Likewise.
(debug_sym_read): Likewise.
(debug_sym_read_psymbols): Likewise.
(debug_sym_finish): Likewise.
(debug_sym_offsets): Likewise.
(debug_sym_read_linetable): Likewise.
(debug_sym_relocate): Likewise.
(uninstall_symfile_debug_logging): Likewise.
* symfile-mem.c (symbol_file_add_from_memory_wrapper): Likewise.
* symfile.c (place_section): Likewise.
(add_section_size_callback): Likewise.
(load_progress): Likewise.
(load_section_callback): Likewise.
(clear_memory_write_data): Likewise.
(allocate_symtab): Likewise.
* symmisc.c (maintenance_expand_file_matcher): Likewise.
* symtab.c (lookup_symtab_callback): Likewise.
(hash_demangled_name_entry): Likewise.
(eq_demangled_name_entry): Likewise.
(get_symbol_cache): Likewise.
(symbol_cache_cleanup): Likewise.
(set_symbol_cache_size): Likewise.
(symbol_cache_flush): Likewise.
(maintenance_print_symbol_cache): Likewise.
(maintenance_print_symbol_cache_statistics): Likewise.
(delete_filename_seen_cache): Likewise.
(output_partial_symbol_filename): Likewise.
(search_symbols_file_matches): Likewise.
(search_symbols_name_matches): Likewise.
(do_free_completion_list): Likewise.
(maybe_add_partial_symtab_filename): Likewise.
(get_main_info): Likewise.
(main_info_cleanup): Likewise.
* target-dcache.c (target_dcache_cleanup): Likewise.
(target_dcache_init_p): Likewise.
(target_dcache_invalidate): Likewise.
(target_dcache_get): Likewise.
(target_dcache_get_or_init): Likewise.
* target-descriptions.c (target_find_description): Likewise.
(tdesc_find_type): Likewise.
(tdesc_data_cleanup): Likewise.
(tdesc_find_arch_register): Likewise.
(tdesc_register_name): Likewise.
(tdesc_register_type): Likewise.
(tdesc_register_reggroup_p): Likewise.
(set_tdesc_pseudo_register_name): Likewise.
(set_tdesc_pseudo_register_type): Likewise.
(set_tdesc_pseudo_register_reggroup_p): Likewise.
(tdesc_use_registers): Likewise.
(free_target_description): Likewise.
* target-memory.c (compare_block_starting_address): Likewise.
(cleanup_request_data): Likewise.
(cleanup_write_requests_vector): Likewise.
* target.c (open_target): Likewise.
(cleanup_restore_target_terminal): Likewise.
(free_memory_read_result_vector): Likewise.
* thread.c (disable_thread_stack_temporaries): Likewise.
(finish_thread_state_cleanup): Likewise.
(do_restore_current_thread_cleanup): Likewise.
(restore_current_thread_cleanup_dtor): Likewise.
(set_thread_refcount): Likewise.
(tp_array_compar): Likewise.
(do_captured_thread_select): Likewise.
* tic6x-tdep.c (tic6x_frame_unwind_cache): Likewise.
(tic6x_stub_this_id): Likewise.
* tilegx-tdep.c (tilegx_frame_cache): Likewise.
* top.c (do_restore_instream_cleanup): Likewise.
(gdb_readline_wrapper_cleanup): Likewise.
(kill_or_detach): Likewise.
(print_inferior_quit_action): Likewise.
* tracefile-tfile.c (match_blocktype): Likewise.
(build_traceframe_info): Likewise.
* tracefile.c (trace_file_writer_xfree): Likewise.
* tracepoint.c (memrange_cmp): Likewise.
(do_collect_symbol): Likewise.
(do_clear_collection_list): Likewise.
(do_restore_current_traceframe_cleanup): Likewise.
(restore_current_traceframe_cleanup_dtor): Likewise.
(free_current_marker): Likewise.
(traceframe_info_start_memory): Likewise.
(traceframe_info_start_tvar): Likewise.
(free_result): Likewise.
* tramp-frame.c (tramp_frame_cache): Likewise.
* tui/tui-file.c (tui_file_delete): Likewise.
(tui_fileopen): Likewise.
(tui_sfileopen): Likewise.
(tui_file_isatty): Likewise.
(tui_file_rewind): Likewise.
(tui_file_put): Likewise.
(tui_file_fputs): Likewise.
(tui_file_get_strbuf): Likewise.
(tui_file_adjust_strbuf): Likewise.
(tui_file_flush): Likewise.
* tui/tui-layout.c (make_command_window): Likewise.
(make_data_window): Likewise.
(show_source_disasm_command): Likewise.
(show_data): Likewise.
(make_source_or_disasm_window): Likewise.
(show_source_or_disasm_and_command): Likewise.
* tui/tui-out.c (tui_field_int): Likewise.
(tui_field_string): Likewise.
(tui_field_fmt): Likewise.
(tui_text): Likewise.
* typeprint.c (hash_typedef_field): Likewise.
(eq_typedef_field): Likewise.
(do_free_typedef_hash): Likewise.
(copy_typedef_hash_element): Likewise.
(do_free_global_table): Likewise.
(find_global_typedef): Likewise.
(find_typedef_in_hash): Likewise.
* ui-file.c (ui_file_write_for_put): Likewise.
(do_ui_file_xstrdup): Likewise.
(mem_file_delete): Likewise.
(mem_file_rewind): Likewise.
(mem_file_put): Likewise.
(mem_file_write): Likewise.
(stdio_file_delete): Likewise.
(stdio_file_flush): Likewise.
(stdio_file_read): Likewise.
(stdio_file_write): Likewise.
(stdio_file_write_async_safe): Likewise.
(stdio_file_fputs): Likewise.
(stdio_file_isatty): Likewise.
(stdio_file_fseek): Likewise.
(tee_file_delete): Likewise.
(tee_file_flush): Likewise.
(tee_file_write): Likewise.
(tee_file_fputs): Likewise.
(tee_file_isatty): Likewise.
* ui-out.c (do_cleanup_table_end): Likewise.
(do_cleanup_end): Likewise.
* user-regs.c (user_reg_add): Likewise.
(user_reg_map_name_to_regnum): Likewise.
(usernum_to_user_reg): Likewise.
(maintenance_print_user_registers): Likewise.
* utils.c (do_bfd_close_cleanup): Likewise.
(do_fclose_cleanup): Likewise.
(do_obstack_free): Likewise.
(do_ui_file_delete): Likewise.
(do_ui_out_redirect_pop): Likewise.
(do_free_section_addr_info): Likewise.
(restore_integer): Likewise.
(do_unpush_target): Likewise.
(do_htab_delete_cleanup): Likewise.
(do_restore_ui_file): Likewise.
(do_value_free): Likewise.
(do_free_so): Likewise.
(free_current_contents): Likewise.
(do_regfree_cleanup): Likewise.
(core_addr_hash): Likewise.
(core_addr_eq): Likewise.
(do_free_char_ptr_vec): Likewise.
* v850-tdep.c (v850_frame_cache): Likewise.
* varobj.c (do_free_variable_cleanup): Likewise.
* vax-tdep.c (vax_supply_gregset): Likewise.
(vax_frame_cache): Likewise.
* vaxobsd-tdep.c (vaxobsd_sigtramp_frame_cache): Likewise.
* xml-support.c (gdb_xml_body_text): Likewise.
(gdb_xml_values_cleanup): Likewise.
(gdb_xml_start_element): Likewise.
(gdb_xml_start_element_wrapper): Likewise.
(gdb_xml_end_element): Likewise.
(gdb_xml_end_element_wrapper): Likewise.
(gdb_xml_cleanup): Likewise.
(gdb_xml_fetch_external_entity): Likewise.
(gdb_xml_parse_attr_enum): Likewise.
(xinclude_start_include): Likewise.
(xinclude_end_include): Likewise.
(xml_xinclude_default): Likewise.
(xml_xinclude_start_doctype): Likewise.
(xml_xinclude_end_doctype): Likewise.
(xml_xinclude_cleanup): Likewise.
(xml_fetch_content_from_file): Likewise.
* xml-syscall.c (free_syscalls_info): Likewise.
(syscall_start_syscall): Likewise.
* xml-tdesc.c (tdesc_end_arch): Likewise.
(tdesc_end_osabi): Likewise.
(tdesc_end_compatible): Likewise.
(tdesc_start_target): Likewise.
(tdesc_start_feature): Likewise.
(tdesc_start_reg): Likewise.
(tdesc_start_union): Likewise.
(tdesc_start_struct): Likewise.
(tdesc_start_flags): Likewise.
(tdesc_start_field): Likewise.
(tdesc_start_vector): Likewise.
(fetch_available_features_from_target): Likewise.
* xstormy16-tdep.c (xstormy16_frame_cache): Likewise.
* xtensa-tdep.c (xtensa_supply_gregset): Likewise.
(xtensa_frame_cache): Likewise.
(xtensa_frame_prev_register): Likewise.
(xtensa_extract_return_value): Likewise.
---
gdb/ChangeLog | 509 ++++++++++++++++++++++++++++++++++++++++++++
gdb/macrocmd.c | 2 +-
gdb/macrotab.c | 5 +-
gdb/main.c | 2 +-
gdb/maint.c | 2 +-
gdb/mdebugread.c | 5 +-
gdb/memattr.c | 4 +-
gdb/memory-map.c | 25 ++-
gdb/memrange.c | 4 +-
gdb/mep-tdep.c | 5 +-
gdb/mi/mi-cmd-var.c | 2 +-
gdb/mi/mi-console.c | 14 +-
gdb/mi/mi-interp.c | 53 ++---
gdb/mi/mi-main.c | 12 +-
gdb/mi/mi-out.c | 36 ++--
gdb/mi/mi-parse.c | 2 +-
gdb/microblaze-tdep.c | 2 +-
gdb/minidebug.c | 8 +-
gdb/mips-linux-tdep.c | 3 +-
gdb/mips-sde-tdep.c | 4 +-
gdb/mips-tdep.c | 29 +--
gdb/mips64obsd-tdep.c | 2 +-
gdb/mipsnbsd-tdep.c | 4 +-
gdb/mn10300-linux-tdep.c | 7 +-
gdb/mn10300-tdep.c | 6 +-
gdb/moxie-tdep.c | 2 +-
gdb/msp430-tdep.c | 8 +-
gdb/mt-tdep.c | 2 +-
gdb/nios2-linux-tdep.c | 4 +-
gdb/nios2-tdep.c | 4 +-
gdb/objc-lang.c | 2 +-
gdb/objfiles.c | 16 +-
gdb/opencl-lang.c | 2 +-
gdb/osabi.c | 2 +-
gdb/osdata.c | 17 +-
gdb/parse.c | 4 +-
gdb/ppc-linux-tdep.c | 29 +--
gdb/ppcfbsd-tdep.c | 2 +-
gdb/ppcobsd-tdep.c | 2 +-
gdb/progspace.c | 2 +-
gdb/psymtab.c | 21 +-
gdb/python/py-block.c | 5 +-
gdb/python/py-breakpoint.c | 2 +-
gdb/python/py-inferior.c | 6 +-
gdb/python/py-objfile.c | 4 +-
gdb/python/py-prettyprint.c | 2 +-
gdb/python/py-progspace.c | 4 +-
gdb/python/py-symbol.c | 5 +-
gdb/python/py-symtab.c | 15 +-
gdb/python/py-type.c | 5 +-
gdb/python/py-unwind.c | 9 +-
gdb/python/py-utils.c | 6 +-
gdb/python/py-xmethods.c | 14 +-
gdb/python/python.c | 4 +-
gdb/record-btrace.c | 23 +-
gdb/record-full.c | 5 +-
gdb/regcache.c | 13 +-
gdb/reggroups.c | 9 +-
gdb/remote-fileio.c | 2 +-
gdb/remote-notif.c | 4 +-
gdb/remote.c | 66 +++---
gdb/rl78-tdep.c | 8 +-
gdb/rs6000-tdep.c | 111 +++++-----
gdb/rx-tdep.c | 11 +-
gdb/s390-linux-tdep.c | 8 +-
gdb/score-tdep.c | 10 +-
gdb/sentinel-frame.c | 6 +-
gdb/ser-base.c | 6 +-
gdb/ser-pipe.c | 2 +-
gdb/serial.c | 4 +-
gdb/sh-tdep.c | 4 +-
gdb/sh64-tdep.c | 2 +-
gdb/solib-aix.c | 13 +-
gdb/solib-darwin.c | 3 +-
gdb/solib-dsbt.c | 3 +-
gdb/solib-spu.c | 3 +-
gdb/solib-svr4.c | 44 ++--
gdb/solib-target.c | 21 +-
gdb/solib.c | 6 +-
gdb/sparc-sol2-tdep.c | 2 +-
gdb/sparc-tdep.c | 12 +-
gdb/sparc64-sol2-tdep.c | 2 +-
gdb/sparc64-tdep.c | 8 +-
gdb/sparc64fbsd-tdep.c | 2 +-
gdb/sparc64nbsd-tdep.c | 2 +-
gdb/sparc64obsd-tdep.c | 4 +-
gdb/sparcnbsd-tdep.c | 2 +-
gdb/sparcobsd-tdep.c | 2 +-
gdb/spu-multiarch.c | 2 +-
gdb/spu-tdep.c | 20 +-
gdb/stabsread.c | 4 +-
gdb/stack.c | 3 +-
gdb/stap-probe.c | 2 +-
gdb/symfile-debug.c | 123 ++++++-----
gdb/symfile-mem.c | 3 +-
gdb/symfile.c | 14 +-
gdb/symmisc.c | 2 +-
gdb/symtab.c | 46 ++--
gdb/target-dcache.c | 22 +-
gdb/target-descriptions.c | 31 +--
gdb/target-memory.c | 10 +-
gdb/target.c | 6 +-
gdb/thread.c | 19 +-
gdb/tic6x-tdep.c | 4 +-
gdb/tilegx-tdep.c | 2 +-
gdb/top.c | 9 +-
gdb/tracefile-tfile.c | 4 +-
gdb/tracefile.c | 2 +-
gdb/tracepoint.c | 31 +--
gdb/tramp-frame.c | 3 +-
gdb/tui/tui-file.c | 20 +-
gdb/tui/tui-layout.c | 110 +++++-----
gdb/tui/tui-out.c | 8 +-
gdb/typeprint.c | 17 +-
gdb/ui-file.c | 38 ++--
gdb/ui-out.c | 5 +-
gdb/user-regs.c | 13 +-
gdb/utils.c | 38 ++--
gdb/v850-tdep.c | 2 +-
gdb/varobj.c | 2 +-
gdb/vax-tdep.c | 4 +-
gdb/vaxobsd-tdep.c | 2 +-
gdb/xml-support.c | 50 +++--
gdb/xml-syscall.c | 6 +-
gdb/xml-tdesc.c | 46 ++--
gdb/xstormy16-tdep.c | 2 +-
gdb/xtensa-tdep.c | 10 +-
127 files changed, 1404 insertions(+), 701 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1baed6a..26266c6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,514 @@
2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
+ * macrocmd.c (print_macro_callback): Add cast(s).
+ * macrotab.c (macro_bcache_str): Likewise.
+ (new_macro_definition): Likewise.
+ * main.c (captured_main): Likewise.
+ * maint.c (print_bfd_section_info): Likewise.
+ * mdebugread.c (mdebug_build_psymtabs): Likewise.
+ (basic_type): Likewise.
+ * memattr.c (mem_region_cmp): Likewise.
+ * memory-map.c (memory_map_start_memory): Likewise.
+ (memory_map_end_memory): Likewise.
+ (memory_map_start_property): Likewise.
+ (memory_map_end_property): Likewise.
+ (clear_result): Likewise.
+ * memrange.c (compare_mem_ranges): Likewise.
+ * mep-tdep.c (mep_analyze_frame_prologue): Likewise.
+ * mi/mi-cmd-var.c (mi_cmd_var_update_iter): Likewise.
+ * mi/mi-console.c (mi_console_file_delete): Likewise.
+ (mi_console_file_fputs): Likewise.
+ (mi_console_raw_packet): Likewise.
+ (mi_console_file_flush): Likewise.
+ (mi_console_set_raw): Likewise.
+ * mi/mi-interp.c (mi_interpreter_resume): Likewise.
+ (mi_new_thread): Likewise.
+ (mi_thread_exit): Likewise.
+ (mi_record_changed): Likewise.
+ (mi_inferior_added): Likewise.
+ (mi_inferior_appeared): Likewise.
+ (mi_inferior_exit): Likewise.
+ (mi_inferior_removed): Likewise.
+ (mi_interp_data): Likewise.
+ (mi_on_normal_stop): Likewise.
+ (mi_traceframe_changed): Likewise.
+ (mi_tsv_created): Likewise.
+ (mi_tsv_deleted): Likewise.
+ (mi_tsv_modified): Likewise.
+ (mi_breakpoint_created): Likewise.
+ (mi_breakpoint_deleted): Likewise.
+ (mi_breakpoint_modified): Likewise.
+ (mi_output_running_pid): Likewise.
+ (mi_inferior_count): Likewise.
+ (mi_solib_loaded): Likewise.
+ (mi_solib_unloaded): Likewise.
+ (mi_command_param_changed): Likewise.
+ (mi_memory_changed): Likewise.
+ (report_initial_inferior): Likewise.
+ (mi_ui_out): Likewise.
+ (mi_set_logging): Likewise.
+ * mi/mi-main.c (collect_cores): Likewise.
+ (print_one_inferior): Likewise.
+ (free_vector_of_ints): Likewise.
+ (free_splay_tree): Likewise.
+ (mi_execute_command): Likewise.
+ * mi/mi-out.c (mi_table_body): Likewise.
+ (mi_table_end): Likewise.
+ (mi_table_header): Likewise.
+ (mi_begin): Likewise.
+ (mi_end): Likewise.
+ (mi_field_int): Likewise.
+ (mi_field_string): Likewise.
+ (mi_field_fmt): Likewise.
+ (mi_flush): Likewise.
+ (mi_redirect): Likewise.
+ (field_separator): Likewise.
+ (mi_open): Likewise.
+ (mi_close): Likewise.
+ (mi_out_buffered): Likewise.
+ (mi_out_rewind): Likewise.
+ (mi_out_put): Likewise.
+ (mi_version): Likewise.
+ (mi_out_data_dtor): Likewise.
+ * mi/mi-parse.c (mi_parse_cleanup): Likewise.
+ * microblaze-tdep.c (microblaze_frame_cache): Likewise.
+ * minidebug.c (lzma_open): Likewise.
+ (lzma_pread): Likewise.
+ (lzma_close): Likewise.
+ (lzma_stat): Likewise.
+ * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
+ * mips-sde-tdep.c (mips_sde_frame_cache): Likewise.
+ (mips_sde_elf_osabi_sniff_abi_tag_sections): Likewise.
+ * mips-tdep.c (mips_insn16_frame_cache): Likewise.
+ (mips_micro_frame_cache): Likewise.
+ (mips_insn32_frame_cache): Likewise.
+ (mips_stub_frame_cache): Likewise.
+ (gdb_print_insn_mips): Likewise.
+ (value_of_mips_user_reg): Likewise.
+ (mips_gdbarch_init): Likewise.
+ * mips64obsd-tdep.c (mips64obsd_supply_gregset): Likewise.
+ * mipsnbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
+ (mipsnbsd_supply_gregset): Likewise.
+ * mn10300-linux-tdep.c (am33_supply_fpregset_method): Likewise.
+ (am33_collect_gregset_method): Likewise.
+ (am33_collect_fpregset_method): Likewise.
+ * mn10300-tdep.c (mn10300_analyze_frame_prologue): Likewise.
+ * moxie-tdep.c (moxie_frame_cache): Likewise.
+ * msp430-tdep.c (msp430_get_opcode_byte): Likewise.
+ (msp430_analyze_frame_prologue): Likewise.
+ * mt-tdep.c (mt_frame_unwind_cache): Likewise.
+ * nios2-linux-tdep.c (nios2_supply_gregset): Likewise.
+ (nios2_collect_gregset): Likewise.
+ * nios2-tdep.c (nios2_frame_unwind_cache): Likewise.
+ (nios2_stub_frame_cache): Likewise.
+ * objc-lang.c (find_methods): Likewise.
+ * objfiles.c (objfiles_pspace_data_cleanup): Likewise.
+ (get_objfile_pspace_data): Likewise.
+ (get_objfile_bfd_data): Likewise.
+ (objfile_bfd_data_free): Likewise.
+ (add_to_objfile_sections): Likewise.
+ (do_free_objfile_cleanup): Likewise.
+ (resume_section_map_updates_cleanup): Likewise.
+ * opencl-lang.c (builtin_opencl_type): Likewise.
+ * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Likewise.
+ * osdata.c (osdata_start_osdata): Likewise.
+ (osdata_start_item): Likewise.
+ (osdata_start_column): Likewise.
+ (osdata_end_column): Likewise.
+ (clear_parsing_data): Likewise.
+ (osdata_free_cleanup): Likewise.
+ * parse.c (type_stack_cleanup): Likewise.
+ (exp_uses_objfile_iter): Likewise.
+ * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
+ (ppc_linux_collect_gregset): Likewise.
+ (ppu2spu_prev_arch): Likewise.
+ (ppu2spu_this_id): Likewise.
+ (ppu2spu_prev_register): Likewise.
+ (ppu2spu_unwind_register): Likewise.
+ (ppu2spu_sniffer): Likewise.
+ (ppu2spu_dealloc_cache): Likewise.
+ (ppc_linux_init_abi): Likewise.
+ * ppcfbsd-tdep.c (ppcfbsd_sigtramp_frame_cache): Likewise.
+ * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_cache): Likewise.
+ * progspace.c (restore_program_space): Likewise.
+ * psymtab.c (find_pc_sect_psymtab): Likewise.
+ (compare_psymbols): Likewise.
+ (psymbol_bcache_full): Likewise.
+ (allocate_psymtab): Likewise.
+ (discard_psymtabs_upto): Likewise.
+ * python/py-block.c (set_block): Likewise.
+ (del_objfile_blocks): Likewise.
+ * python/py-breakpoint.c (build_bp_list): Likewise.
+ * python/py-inferior.c (inferior_to_inferior_object): Likewise.
+ (build_inferior_list): Likewise.
+ (py_free_inferior): Likewise.
+ * python/py-objfile.c (py_free_objfile): Likewise.
+ (objfile_to_objfile_object): Likewise.
+ * python/py-prettyprint.c (py_restore_tstate): Likewise.
+ * python/py-progspace.c (py_free_pspace): Likewise.
+ (pspace_to_pspace_object): Likewise.
+ * python/py-symbol.c (set_symbol): Likewise.
+ (del_objfile_symbols): Likewise.
+ * python/py-symtab.c (set_sal): Likewise.
+ (set_symtab): Likewise.
+ (del_objfile_symtab): Likewise.
+ (del_objfile_sal): Likewise.
+ * python/py-type.c (save_objfile_types): Likewise.
+ (set_type): Likewise.
+ * python/py-unwind.c (pyuw_prev_register): Likewise.
+ (pyuw_on_new_gdbarch): Likewise.
+ * python/py-utils.c (py_decref): Likewise.
+ (py_xdecref): Likewise.
+ (gdb_py_generic_dict): Likewise.
+ * python/py-xmethods.c (gdbpy_free_xmethod_worker_data): Likewise.
+ (gdbpy_clone_xmethod_worker_data): Likewise.
+ (gdbpy_get_xmethod_arg_types): Likewise.
+ (gdbpy_get_xmethod_result_type): Likewise.
+ (gdbpy_invoke_xmethod): Likewise.
+ * python/python.c (gdbpy_apply_type_printers): Likewise.
+ (gdbpy_free_type_printers): Likewise.
+ * record-btrace.c (record_btrace_disable_callback): Likewise.
+ (bfcache_hash): Likewise.
+ (bfcache_eq): Likewise.
+ (btrace_get_frame_function): Likewise.
+ (record_btrace_frame_unwind_stop_reason): Likewise.
+ (record_btrace_frame_this_id): Likewise.
+ (record_btrace_frame_prev_register): Likewise.
+ (record_btrace_frame_dealloc_cache): Likewise.
+ * record-full.c (record_full_message_wrapper): Likewise.
+ (record_full_save_cleanups): Likewise.
+ * regcache.c (regcache_descr): Likewise.
+ (do_regcache_xfree): Likewise.
+ (do_regcache_invalidate): Likewise.
+ (do_cooked_read): Likewise.
+ (regcache_transfer_regset): Likewise.
+ * reggroups.c (reggroup_add): Likewise.
+ (reggroup_next): Likewise.
+ (reggroup_prev): Likewise.
+ * remote-fileio.c (do_remote_fileio_request): Likewise.
+ * remote-notif.c (remote_async_get_pending_events_handler): Likewise.
+ (do_notif_event_xfree): Likewise.
+ * remote.c (get_remote_arch_state): Likewise.
+ (remote_pspace_data_cleanup): Likewise.
+ (get_remote_exec_file): Likewise.
+ (set_pspace_remote_exec_file): Likewise.
+ (compare_pnums): Likewise.
+ (clear_threads_listing_context): Likewise.
+ (remote_newthread_step): Likewise.
+ (start_thread): Likewise.
+ (end_thread): Likewise.
+ (remove_child_of_pending_fork): Likewise.
+ (remove_stop_reply_for_inferior): Likewise.
+ (remove_stop_reply_of_remote_state): Likewise.
+ (remote_notif_remove_once_on_match): Likewise.
+ (stop_reply_match_ptid_and_ws): Likewise.
+ (kill_child_of_pending_fork): Likewise.
+ (register_remote_g_packet_guess): Likewise.
+ (remote_read_description_p): Likewise.
+ (remote_read_description): Likewise.
+ (free_actions_list_cleanup_wrapper): Likewise.
+ (remote_async_serial_handler): Likewise.
+ * rl78-tdep.c (rl78_get_opcode_byte): Likewise.
+ (rl78_analyze_frame_prologue): Likewise.
+ * rs6000-tdep.c (ppc_supply_gregset): Likewise.
+ (ppc_supply_fpregset): Likewise.
+ (ppc_supply_vsxregset): Likewise.
+ (ppc_supply_vrregset): Likewise.
+ (ppc_collect_gregset): Likewise.
+ (ppc_collect_fpregset): Likewise.
+ (ppc_collect_vsxregset): Likewise.
+ (ppc_collect_vrregset): Likewise.
+ (e500_move_ev_register): Likewise.
+ (do_regcache_raw_write): Likewise.
+ (rs6000_frame_cache): Likewise.
+ (rs6000_epilogue_frame_cache): Likewise.
+ (rs6000_gdbarch_init): Likewise.
+ * rx-tdep.c (rx_get_opcode_byte): Likewise.
+ (rx_analyze_frame_prologue): Likewise.
+ (rx_frame_type): Likewise.
+ (rx_frame_sniffer_common): Likewise.
+ * s390-linux-tdep.c (s390_check_for_saved): Likewise.
+ (s390_frame_unwind_cache): Likewise.
+ (s390_stub_frame_unwind_cache): Likewise.
+ (s390_sigtramp_frame_unwind_cache): Likewise.
+ * score-tdep.c (score_make_prologue_cache): Likewise.
+ * sentinel-frame.c (sentinel_frame_prev_register): Likewise.
+ (sentinel_frame_prev_arch): Likewise.
+ * ser-base.c (fd_event): Likewise.
+ (push_event): Likewise.
+ (ser_base_write): Likewise.
+ * ser-pipe.c (pipe_close): Likewise.
+ * serial.c (serial_write): Likewise.
+ * sh-tdep.c (sh_frame_cache): Likewise.
+ (sh_stub_this_id): Likewise.
+ * sh64-tdep.c (sh64_frame_cache): Likewise.
+ * solib-aix.c (get_solib_aix_inferior_data): Likewise.
+ (library_list_start_library): Likewise.
+ (library_list_start_list): Likewise.
+ (solib_aix_free_library_list): Likewise.
+ * solib-darwin.c (get_darwin_info): Likewise.
+ * solib-dsbt.c (get_dsbt_info): Likewise.
+ * solib-spu.c (append_ocl_sos): Likewise.
+ * solib-svr4.c (svr4_pspace_data_cleanup): Likewise.
+ (get_svr4_info): Likewise.
+ (library_list_start_library): Likewise.
+ (svr4_library_list_start_list): Likewise.
+ (hash_probe_and_action): Likewise.
+ (equal_probe_and_action): Likewise.
+ (svr4_update_solib_event_breakpoint): Likewise.
+ (set_solib_svr4_fetch_link_map_offsets): Likewise.
+ (svr4_fetch_link_map_offsets): Likewise.
+ (svr4_have_link_map_offsets): Likewise.
+ * solib-target.c (library_list_start_segment): Likewise.
+ (library_list_start_section): Likewise.
+ (library_list_start_library): Likewise.
+ (library_list_end_library): Likewise.
+ (library_list_start_list): Likewise.
+ (solib_target_free_library_list): Likewise.
+ * solib.c (solib_ops): Likewise.
+ (set_solib_ops): Likewise.
+ * sparc-sol2-tdep.c (sparc32_sol2_sigtramp_frame_cache): Likewise.
+ * sparc-tdep.c (sparc_frame_cache): Likewise.
+ (sparc32_frame_cache): Likewise.
+ (sparc32_supply_gregset): Likewise.
+ (sparc32_collect_gregset): Likewise.
+ (sparc32_supply_fpregset): Likewise.
+ (sparc32_collect_fpregset): Likewise.
+ * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_cache): Likewise.
+ * sparc64-tdep.c (sparc64_supply_gregset): Likewise.
+ (sparc64_collect_gregset): Likewise.
+ (sparc64_supply_fpregset): Likewise.
+ (sparc64_collect_fpregset): Likewise.
+ * sparc64fbsd-tdep.c (sparc64fbsd_sigtramp_frame_cache): Likewise.
+ * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_frame_cache): Likewise.
+ * sparc64obsd-tdep.c (sparc64obsd_frame_cache): Likewise.
+ (sparc64obsd_trapframe_cache): Likewise.
+ * sparcnbsd-tdep.c (sparc32nbsd_sigcontext_frame_cache): Likewise.
+ * sparcobsd-tdep.c (sparc32obsd_sigtramp_frame_cache): Likewise.
+ * spu-multiarch.c (spu_gdbarch): Likewise.
+ * spu-tdep.c (spu_frame_unwind_cache): Likewise.
+ (spu2ppu_prev_arch): Likewise.
+ (spu2ppu_this_id): Likewise.
+ (spu2ppu_prev_register): Likewise.
+ (spu2ppu_dealloc_cache): Likewise.
+ (spu_dis_asm_print_address): Likewise.
+ (gdb_print_insn_spu): Likewise.
+ (spu_get_overlay_table): Likewise.
+ * stabsread.c (rs6000_builtin_type): Likewise.
+ * stack.c (do_print_variable_and_value): Likewise.
+ * stap-probe.c (get_stap_base_address_1): Likewise.
+ * symfile-debug.c (debug_qf_has_symbols): Likewise.
+ (debug_qf_find_last_source_symtab): Likewise.
+ (debug_qf_forget_cached_source_info): Likewise.
+ (debug_qf_map_symtabs_matching_filename): Likewise.
+ (debug_qf_lookup_symbol): Likewise.
+ (debug_qf_print_stats): Likewise.
+ (debug_qf_dump): Likewise.
+ (debug_qf_relocate): Likewise.
+ (debug_qf_expand_symtabs_for_function): Likewise.
+ (debug_qf_expand_all_symtabs): Likewise.
+ (debug_qf_expand_symtabs_with_fullname): Likewise.
+ (debug_qf_map_matching_symbols): Likewise.
+ (debug_qf_expand_symtabs_matching): Likewise.
+ (debug_qf_find_pc_sect_compunit_symtab): Likewise.
+ (debug_qf_map_symbol_filenames): Likewise.
+ (debug_sym_get_probes): Likewise.
+ (debug_sym_new_init): Likewise.
+ (debug_sym_init): Likewise.
+ (debug_sym_read): Likewise.
+ (debug_sym_read_psymbols): Likewise.
+ (debug_sym_finish): Likewise.
+ (debug_sym_offsets): Likewise.
+ (debug_sym_read_linetable): Likewise.
+ (debug_sym_relocate): Likewise.
+ (uninstall_symfile_debug_logging): Likewise.
+ * symfile-mem.c (symbol_file_add_from_memory_wrapper): Likewise.
+ * symfile.c (place_section): Likewise.
+ (add_section_size_callback): Likewise.
+ (load_progress): Likewise.
+ (load_section_callback): Likewise.
+ (clear_memory_write_data): Likewise.
+ (allocate_symtab): Likewise.
+ * symmisc.c (maintenance_expand_file_matcher): Likewise.
+ * symtab.c (lookup_symtab_callback): Likewise.
+ (hash_demangled_name_entry): Likewise.
+ (eq_demangled_name_entry): Likewise.
+ (get_symbol_cache): Likewise.
+ (symbol_cache_cleanup): Likewise.
+ (set_symbol_cache_size): Likewise.
+ (symbol_cache_flush): Likewise.
+ (maintenance_print_symbol_cache): Likewise.
+ (maintenance_print_symbol_cache_statistics): Likewise.
+ (delete_filename_seen_cache): Likewise.
+ (output_partial_symbol_filename): Likewise.
+ (search_symbols_file_matches): Likewise.
+ (search_symbols_name_matches): Likewise.
+ (do_free_completion_list): Likewise.
+ (maybe_add_partial_symtab_filename): Likewise.
+ (get_main_info): Likewise.
+ (main_info_cleanup): Likewise.
+ * target-dcache.c (target_dcache_cleanup): Likewise.
+ (target_dcache_init_p): Likewise.
+ (target_dcache_invalidate): Likewise.
+ (target_dcache_get): Likewise.
+ (target_dcache_get_or_init): Likewise.
+ * target-descriptions.c (target_find_description): Likewise.
+ (tdesc_find_type): Likewise.
+ (tdesc_data_cleanup): Likewise.
+ (tdesc_find_arch_register): Likewise.
+ (tdesc_register_name): Likewise.
+ (tdesc_register_type): Likewise.
+ (tdesc_register_reggroup_p): Likewise.
+ (set_tdesc_pseudo_register_name): Likewise.
+ (set_tdesc_pseudo_register_type): Likewise.
+ (set_tdesc_pseudo_register_reggroup_p): Likewise.
+ (tdesc_use_registers): Likewise.
+ (free_target_description): Likewise.
+ * target-memory.c (compare_block_starting_address): Likewise.
+ (cleanup_request_data): Likewise.
+ (cleanup_write_requests_vector): Likewise.
+ * target.c (open_target): Likewise.
+ (cleanup_restore_target_terminal): Likewise.
+ (free_memory_read_result_vector): Likewise.
+ * thread.c (disable_thread_stack_temporaries): Likewise.
+ (finish_thread_state_cleanup): Likewise.
+ (do_restore_current_thread_cleanup): Likewise.
+ (restore_current_thread_cleanup_dtor): Likewise.
+ (set_thread_refcount): Likewise.
+ (tp_array_compar): Likewise.
+ (do_captured_thread_select): Likewise.
+ * tic6x-tdep.c (tic6x_frame_unwind_cache): Likewise.
+ (tic6x_stub_this_id): Likewise.
+ * tilegx-tdep.c (tilegx_frame_cache): Likewise.
+ * top.c (do_restore_instream_cleanup): Likewise.
+ (gdb_readline_wrapper_cleanup): Likewise.
+ (kill_or_detach): Likewise.
+ (print_inferior_quit_action): Likewise.
+ * tracefile-tfile.c (match_blocktype): Likewise.
+ (build_traceframe_info): Likewise.
+ * tracefile.c (trace_file_writer_xfree): Likewise.
+ * tracepoint.c (memrange_cmp): Likewise.
+ (do_collect_symbol): Likewise.
+ (do_clear_collection_list): Likewise.
+ (do_restore_current_traceframe_cleanup): Likewise.
+ (restore_current_traceframe_cleanup_dtor): Likewise.
+ (free_current_marker): Likewise.
+ (traceframe_info_start_memory): Likewise.
+ (traceframe_info_start_tvar): Likewise.
+ (free_result): Likewise.
+ * tramp-frame.c (tramp_frame_cache): Likewise.
+ * tui/tui-file.c (tui_file_delete): Likewise.
+ (tui_fileopen): Likewise.
+ (tui_sfileopen): Likewise.
+ (tui_file_isatty): Likewise.
+ (tui_file_rewind): Likewise.
+ (tui_file_put): Likewise.
+ (tui_file_fputs): Likewise.
+ (tui_file_get_strbuf): Likewise.
+ (tui_file_adjust_strbuf): Likewise.
+ (tui_file_flush): Likewise.
+ * tui/tui-layout.c (make_command_window): Likewise.
+ (make_data_window): Likewise.
+ (show_source_disasm_command): Likewise.
+ (show_data): Likewise.
+ (make_source_or_disasm_window): Likewise.
+ (show_source_or_disasm_and_command): Likewise.
+ * tui/tui-out.c (tui_field_int): Likewise.
+ (tui_field_string): Likewise.
+ (tui_field_fmt): Likewise.
+ (tui_text): Likewise.
+ * typeprint.c (hash_typedef_field): Likewise.
+ (eq_typedef_field): Likewise.
+ (do_free_typedef_hash): Likewise.
+ (copy_typedef_hash_element): Likewise.
+ (do_free_global_table): Likewise.
+ (find_global_typedef): Likewise.
+ (find_typedef_in_hash): Likewise.
+ * ui-file.c (ui_file_write_for_put): Likewise.
+ (do_ui_file_xstrdup): Likewise.
+ (mem_file_delete): Likewise.
+ (mem_file_rewind): Likewise.
+ (mem_file_put): Likewise.
+ (mem_file_write): Likewise.
+ (stdio_file_delete): Likewise.
+ (stdio_file_flush): Likewise.
+ (stdio_file_read): Likewise.
+ (stdio_file_write): Likewise.
+ (stdio_file_write_async_safe): Likewise.
+ (stdio_file_fputs): Likewise.
+ (stdio_file_isatty): Likewise.
+ (stdio_file_fseek): Likewise.
+ (tee_file_delete): Likewise.
+ (tee_file_flush): Likewise.
+ (tee_file_write): Likewise.
+ (tee_file_fputs): Likewise.
+ (tee_file_isatty): Likewise.
+ * ui-out.c (do_cleanup_table_end): Likewise.
+ (do_cleanup_end): Likewise.
+ * user-regs.c (user_reg_add): Likewise.
+ (user_reg_map_name_to_regnum): Likewise.
+ (usernum_to_user_reg): Likewise.
+ (maintenance_print_user_registers): Likewise.
+ * utils.c (do_bfd_close_cleanup): Likewise.
+ (do_fclose_cleanup): Likewise.
+ (do_obstack_free): Likewise.
+ (do_ui_file_delete): Likewise.
+ (do_ui_out_redirect_pop): Likewise.
+ (do_free_section_addr_info): Likewise.
+ (restore_integer): Likewise.
+ (do_unpush_target): Likewise.
+ (do_htab_delete_cleanup): Likewise.
+ (do_restore_ui_file): Likewise.
+ (do_value_free): Likewise.
+ (do_free_so): Likewise.
+ (free_current_contents): Likewise.
+ (do_regfree_cleanup): Likewise.
+ (core_addr_hash): Likewise.
+ (core_addr_eq): Likewise.
+ (do_free_char_ptr_vec): Likewise.
+ * v850-tdep.c (v850_frame_cache): Likewise.
+ * varobj.c (do_free_variable_cleanup): Likewise.
+ * vax-tdep.c (vax_supply_gregset): Likewise.
+ (vax_frame_cache): Likewise.
+ * vaxobsd-tdep.c (vaxobsd_sigtramp_frame_cache): Likewise.
+ * xml-support.c (gdb_xml_body_text): Likewise.
+ (gdb_xml_values_cleanup): Likewise.
+ (gdb_xml_start_element): Likewise.
+ (gdb_xml_start_element_wrapper): Likewise.
+ (gdb_xml_end_element): Likewise.
+ (gdb_xml_end_element_wrapper): Likewise.
+ (gdb_xml_cleanup): Likewise.
+ (gdb_xml_fetch_external_entity): Likewise.
+ (gdb_xml_parse_attr_enum): Likewise.
+ (xinclude_start_include): Likewise.
+ (xinclude_end_include): Likewise.
+ (xml_xinclude_default): Likewise.
+ (xml_xinclude_start_doctype): Likewise.
+ (xml_xinclude_end_doctype): Likewise.
+ (xml_xinclude_cleanup): Likewise.
+ (xml_fetch_content_from_file): Likewise.
+ * xml-syscall.c (free_syscalls_info): Likewise.
+ (syscall_start_syscall): Likewise.
+ * xml-tdesc.c (tdesc_end_arch): Likewise.
+ (tdesc_end_osabi): Likewise.
+ (tdesc_end_compatible): Likewise.
+ (tdesc_start_target): Likewise.
+ (tdesc_start_feature): Likewise.
+ (tdesc_start_reg): Likewise.
+ (tdesc_start_union): Likewise.
+ (tdesc_start_struct): Likewise.
+ (tdesc_start_flags): Likewise.
+ (tdesc_start_field): Likewise.
+ (tdesc_start_vector): Likewise.
+ (fetch_available_features_from_target): Likewise.
+ * xstormy16-tdep.c (xstormy16_frame_cache): Likewise.
+ * xtensa-tdep.c (xtensa_supply_gregset): Likewise.
+ (xtensa_frame_cache): Likewise.
+ (xtensa_frame_prev_register): Likewise.
+ (xtensa_extract_return_value): Likewise.
+
+2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
+
* aarch64-tdep.c (aarch64_make_prologue_cache): Add cast(s).
(aarch64_make_stub_cache): Likewise.
(value_of_aarch64_user_reg): Likewise.
diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c
index 2eb9dff..aca4fdc 100644
--- a/gdb/macrocmd.c
+++ b/gdb/macrocmd.c
@@ -196,7 +196,7 @@ print_macro_callback (const char *name, const struct macro_definition *macro,
struct macro_source_file *source, int line,
void *user_data)
{
- if (! user_data || strcmp (user_data, name) == 0)
+ if (! user_data || strcmp ((const char *) user_data, name) == 0)
print_macro_definition (name, macro, source, line);
}
diff --git a/gdb/macrotab.c b/gdb/macrotab.c
index 9245c7c..435b3f1 100644
--- a/gdb/macrotab.c
+++ b/gdb/macrotab.c
@@ -130,7 +130,7 @@ macro_bcache (struct macro_table *t, const void *addr, int len)
static const char *
macro_bcache_str (struct macro_table *t, const char *s)
{
- return macro_bcache (t, s, strlen (s) + 1);
+ return (const char *) macro_bcache (t, s, strlen (s) + 1);
}
@@ -575,7 +575,8 @@ new_macro_definition (struct macro_table *t,
cached_argv[i] = macro_bcache_str (t, argv[i]);
/* Now bcache the array of argument pointers itself. */
- d->argv = macro_bcache (t, cached_argv, cached_argv_size);
+ d->argv = ((const char * const *)
+ macro_bcache (t, cached_argv, cached_argv_size));
}
/* We don't bcache the entire definition structure because it's got
diff --git a/gdb/main.c b/gdb/main.c
index aecd60a..49c9b68 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -437,7 +437,7 @@ DEF_VEC_O (cmdarg_s);
static int
captured_main (void *data)
{
- struct captured_main_args *context = data;
+ struct captured_main_args *context = (struct captured_main_args *) data;
int argc = context->argc;
char **argv = context->argv;
static int quiet = 0;
diff --git a/gdb/maint.c b/gdb/maint.c
index 5d7fca5..c95f645 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -303,7 +303,7 @@ print_bfd_section_info (bfd *abfd,
{
flagword flags = bfd_get_section_flags (abfd, asect);
const char *name = bfd_section_name (abfd, asect);
- const char *arg = datum;
+ const char *arg = (const char *) datum;
if (arg == NULL || *arg == '\0'
|| match_substring (arg, name)
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 7a81592..8109ee3 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -359,7 +359,7 @@ mdebug_build_psymtabs (struct objfile *objfile,
info->fdr = (FDR *) obstack_alloc (&objfile->objfile_obstack,
(info->symbolic_header.ifdMax
* sizeof (FDR)));
- fdr_src = info->external_fdr;
+ fdr_src = (char *) info->external_fdr;
fdr_end = (fdr_src
+ info->symbolic_header.ifdMax * swap->external_fdr_size);
fdr_ptr = info->fdr;
@@ -1348,7 +1348,8 @@ static struct type *
basic_type (int bt, struct objfile *objfile)
{
struct gdbarch *gdbarch = get_objfile_arch (objfile);
- struct type **map_bt = objfile_data (objfile, basic_type_data);
+ struct type **map_bt
+ = (struct type **) objfile_data (objfile, basic_type_data);
struct type *tp;
if (bt >= btMax)
diff --git a/gdb/memattr.c b/gdb/memattr.c
index a2aac07..40381c5 100644
--- a/gdb/memattr.c
+++ b/gdb/memattr.c
@@ -98,8 +98,8 @@ mem_region_lessthan (const struct mem_region *lhs,
int
mem_region_cmp (const void *untyped_lhs, const void *untyped_rhs)
{
- const struct mem_region *lhs = untyped_lhs;
- const struct mem_region *rhs = untyped_rhs;
+ const struct mem_region *lhs = (const struct mem_region *) untyped_lhs;
+ const struct mem_region *rhs = (const struct mem_region *) untyped_rhs;
if (lhs->lo < rhs->lo)
return -1;
diff --git a/gdb/memory-map.c b/gdb/memory-map.c
index 77eb93e..d56b14c 100644
--- a/gdb/memory-map.c
+++ b/gdb/memory-map.c
@@ -55,13 +55,17 @@ memory_map_start_memory (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct memory_map_parsing_data *data = user_data;
+ struct memory_map_parsing_data *data
+ = (struct memory_map_parsing_data *) user_data;
struct mem_region *r = VEC_safe_push (mem_region_s, *data->memory_map, NULL);
ULONGEST *start_p, *length_p, *type_p;
- start_p = xml_find_attribute (attributes, "start")->value;
- length_p = xml_find_attribute (attributes, "length")->value;
- type_p = xml_find_attribute (attributes, "type")->value;
+ start_p
+ = (long unsigned int *) xml_find_attribute (attributes, "start")->value;
+ length_p
+ = (long unsigned int *) xml_find_attribute (attributes, "length")->value;
+ type_p
+ = (long unsigned int *) xml_find_attribute (attributes, "type")->value;
mem_region_init (r);
r->lo = *start_p;
@@ -78,7 +82,8 @@ memory_map_end_memory (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct memory_map_parsing_data *data = user_data;
+ struct memory_map_parsing_data *data
+ = (struct memory_map_parsing_data *) user_data;
struct mem_region *r = VEC_last (mem_region_s, *data->memory_map);
if (r->attrib.mode == MEM_FLASH && r->attrib.blocksize == -1)
@@ -93,10 +98,11 @@ memory_map_start_property (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct memory_map_parsing_data *data = user_data;
+ struct memory_map_parsing_data *data
+ = (struct memory_map_parsing_data *) user_data;
char *name;
- name = xml_find_attribute (attributes, "name")->value;
+ name = (char *) xml_find_attribute (attributes, "name")->value;
snprintf (data->property_name, sizeof (data->property_name), "%s", name);
}
@@ -107,7 +113,8 @@ memory_map_end_property (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct memory_map_parsing_data *data = user_data;
+ struct memory_map_parsing_data *data
+ = (struct memory_map_parsing_data *) user_data;
char *name = data->property_name;
if (strcmp (name, "blocksize") == 0)
@@ -125,7 +132,7 @@ memory_map_end_property (struct gdb_xml_parser *parser,
static void
clear_result (void *p)
{
- VEC(mem_region_s) **result = p;
+ VEC(mem_region_s) **result = (VEC(mem_region_s) **) p;
VEC_free (mem_region_s, *result);
*result = NULL;
}
diff --git a/gdb/memrange.c b/gdb/memrange.c
index e4fbb52..04db5da 100644
--- a/gdb/memrange.c
+++ b/gdb/memrange.c
@@ -46,8 +46,8 @@ address_in_mem_range (CORE_ADDR address, const struct mem_range *r)
static int
compare_mem_ranges (const void *ap, const void *bp)
{
- const struct mem_range *r1 = ap;
- const struct mem_range *r2 = bp;
+ const struct mem_range *r1 = (const struct mem_range *) ap;
+ const struct mem_range *r2 = (const struct mem_range *) bp;
if (r1->start > r2->start)
return 1;
diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c
index d602576..b3c1f77 100644
--- a/gdb/mep-tdep.c
+++ b/gdb/mep-tdep.c
@@ -1950,10 +1950,11 @@ mep_analyze_frame_prologue (struct frame_info *this_frame,
stop_addr = func_start;
mep_analyze_prologue (get_frame_arch (this_frame),
- func_start, stop_addr, *this_prologue_cache);
+ func_start, stop_addr,
+ (struct mep_prologue *) *this_prologue_cache);
}
- return *this_prologue_cache;
+ return (struct mep_prologue *) *this_prologue_cache;
}
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index ee0bbc6..e316812 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -649,7 +649,7 @@ struct mi_cmd_var_update
static void
mi_cmd_var_update_iter (struct varobj *var, void *data_pointer)
{
- struct mi_cmd_var_update *data = data_pointer;
+ struct mi_cmd_var_update *data = (struct mi_cmd_var_update *) data_pointer;
int thread_id, thread_stopped;
thread_id = varobj_get_thread_id (var);
diff --git a/gdb/mi/mi-console.c b/gdb/mi/mi-console.c
index 257f452..e0947e0 100644
--- a/gdb/mi/mi-console.c
+++ b/gdb/mi/mi-console.c
@@ -67,7 +67,8 @@ mi_console_file_new (struct ui_file *raw, const char *prefix, char quote)
static void
mi_console_file_delete (struct ui_file *file)
{
- struct mi_console_file *mi_console = ui_file_data (file);
+ struct mi_console_file *mi_console
+ = (struct mi_console_file *) ui_file_data (file);
if (mi_console->magic != &mi_console_file_magic)
internal_error (__FILE__, __LINE__,
@@ -79,7 +80,8 @@ mi_console_file_delete (struct ui_file *file)
static void
mi_console_file_fputs (const char *buf, struct ui_file *file)
{
- struct mi_console_file *mi_console = ui_file_data (file);
+ struct mi_console_file *mi_console
+ = (struct mi_console_file *) ui_file_data (file);
if (mi_console->magic != &mi_console_file_magic)
internal_error (__FILE__, __LINE__,
@@ -97,7 +99,7 @@ mi_console_file_fputs (const char *buf, struct ui_file *file)
static void
mi_console_raw_packet (void *data, const char *buf, long length_buf)
{
- struct mi_console_file *mi_console = data;
+ struct mi_console_file *mi_console = (struct mi_console_file *) data;
if (mi_console->magic != &mi_console_file_magic)
internal_error (__FILE__, __LINE__,
@@ -126,7 +128,8 @@ mi_console_raw_packet (void *data, const char *buf, long length_buf)
static void
mi_console_file_flush (struct ui_file *file)
{
- struct mi_console_file *mi_console = ui_file_data (file);
+ struct mi_console_file *mi_console
+ = (struct mi_console_file *) ui_file_data (file);
if (mi_console->magic != &mi_console_file_magic)
internal_error (__FILE__, __LINE__,
@@ -144,7 +147,8 @@ mi_console_file_flush (struct ui_file *file)
void
mi_console_set_raw (struct ui_file *file, struct ui_file *raw)
{
- struct mi_console_file *mi_console = ui_file_data (file);
+ struct mi_console_file *mi_console
+ = (struct mi_console_file *) ui_file_data (file);
if (mi_console->magic != &mi_console_file_magic)
internal_error (__FILE__, __LINE__,
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 385b975..b349df2 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -173,7 +173,7 @@ mi_interpreter_init (struct interp *interp, int top_level)
static int
mi_interpreter_resume (void *data)
{
- struct mi_interp *mi = data;
+ struct mi_interp *mi = (struct mi_interp *) data;
/* As per hack note in mi_interpreter_init, swap in the output
channels... */
@@ -355,7 +355,7 @@ mi_command_loop (void *data)
static void
mi_new_thread (struct thread_info *t)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct inferior *inf = find_inferior_ptid (t->ptid);
gdb_assert (inf);
@@ -378,7 +378,7 @@ mi_thread_exit (struct thread_info *t, int silent)
inf = find_inferior_ptid (t->ptid);
- mi = top_level_interpreter_data ();
+ mi = (struct mi_interp *) top_level_interpreter_data ();
old_chain = make_cleanup_restore_target_terminal ();
target_terminal_ours ();
fprintf_unfiltered (mi->event_channel,
@@ -394,7 +394,7 @@ mi_thread_exit (struct thread_info *t, int silent)
static void
mi_record_changed (struct inferior *inferior, int started)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
fprintf_unfiltered (mi->event_channel, "record-%s,thread-group=\"i%d\"",
started ? "started" : "stopped", inferior->num);
@@ -405,7 +405,7 @@ mi_record_changed (struct inferior *inferior, int started)
static void
mi_inferior_added (struct inferior *inf)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
target_terminal_ours ();
fprintf_unfiltered (mi->event_channel,
@@ -417,7 +417,7 @@ mi_inferior_added (struct inferior *inf)
static void
mi_inferior_appeared (struct inferior *inf)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
target_terminal_ours ();
fprintf_unfiltered (mi->event_channel,
@@ -429,7 +429,7 @@ mi_inferior_appeared (struct inferior *inf)
static void
mi_inferior_exit (struct inferior *inf)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
target_terminal_ours ();
if (inf->has_exit_code)
@@ -446,7 +446,7 @@ mi_inferior_exit (struct inferior *inf)
static void
mi_inferior_removed (struct inferior *inf)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
target_terminal_ours ();
fprintf_unfiltered (mi->event_channel,
@@ -484,7 +484,7 @@ mi_interp_data (void)
struct interp *interp = find_mi_interpreter ();
if (interp != NULL)
- return interp_data (interp);
+ return (struct mi_interp *) interp_data (interp);
return NULL;
}
@@ -611,7 +611,8 @@ mi_on_normal_stop (struct bpstats *bs, int print_frame)
|| (tp->control.command_interp != NULL
&& tp->control.command_interp != top_level_interpreter ()))
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi
+ = (struct mi_interp *) top_level_interpreter_data ();
print_stop_event (mi->cli_uiout);
}
@@ -674,7 +675,7 @@ struct mi_suppress_notification mi_suppress_notification =
static void
mi_traceframe_changed (int tfnum, int tpnum)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
if (mi_suppress_notification.traceframe)
return;
@@ -696,7 +697,7 @@ mi_traceframe_changed (int tfnum, int tpnum)
static void
mi_tsv_created (const struct trace_state_variable *tsv)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
target_terminal_ours ();
@@ -712,7 +713,7 @@ mi_tsv_created (const struct trace_state_variable *tsv)
static void
mi_tsv_deleted (const struct trace_state_variable *tsv)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
target_terminal_ours ();
@@ -730,7 +731,7 @@ mi_tsv_deleted (const struct trace_state_variable *tsv)
static void
mi_tsv_modified (const struct trace_state_variable *tsv)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
target_terminal_ours ();
@@ -756,7 +757,7 @@ mi_tsv_modified (const struct trace_state_variable *tsv)
static void
mi_breakpoint_created (struct breakpoint *b)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
if (mi_suppress_notification.breakpoint)
@@ -795,7 +796,7 @@ mi_breakpoint_created (struct breakpoint *b)
static void
mi_breakpoint_deleted (struct breakpoint *b)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
if (mi_suppress_notification.breakpoint)
return;
@@ -816,7 +817,7 @@ mi_breakpoint_deleted (struct breakpoint *b)
static void
mi_breakpoint_modified (struct breakpoint *b)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
if (mi_suppress_notification.breakpoint)
@@ -853,7 +854,7 @@ mi_breakpoint_modified (struct breakpoint *b)
static int
mi_output_running_pid (struct thread_info *info, void *arg)
{
- ptid_t *ptid = arg;
+ ptid_t *ptid = (ptid_t *) arg;
if (ptid_get_pid (*ptid) == ptid_get_pid (info->ptid))
fprintf_unfiltered (raw_stdout,
@@ -868,7 +869,7 @@ mi_inferior_count (struct inferior *inf, void *arg)
{
if (inf->pid != 0)
{
- int *count_p = arg;
+ int *count_p = (int *) arg;
(*count_p)++;
}
@@ -944,7 +945,7 @@ mi_on_resume (ptid_t ptid)
static void
mi_solib_loaded (struct so_list *solib)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct ui_out *uiout = interp_ui_out (top_level_interpreter ());
target_terminal_ours ();
@@ -970,7 +971,7 @@ mi_solib_loaded (struct so_list *solib)
static void
mi_solib_unloaded (struct so_list *solib)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct ui_out *uiout = interp_ui_out (top_level_interpreter ());
target_terminal_ours ();
@@ -997,7 +998,7 @@ mi_solib_unloaded (struct so_list *solib)
static void
mi_command_param_changed (const char *param, const char *value)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
if (mi_suppress_notification.cmd_param_changed)
@@ -1024,7 +1025,7 @@ static void
mi_memory_changed (struct inferior *inferior, CORE_ADDR memaddr,
ssize_t len, const bfd_byte *myaddr)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi = (struct mi_interp *) top_level_interpreter_data ();
struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
struct obj_section *sec;
@@ -1066,7 +1067,7 @@ report_initial_inferior (struct inferior *inf, void *closure)
mi_inferior_added assumes that inferior is fully initialized
and top_level_interpreter_data is set, we cannot call
it here. */
- struct mi_interp *mi = closure;
+ struct mi_interp *mi = (struct mi_interp *) closure;
target_terminal_ours ();
fprintf_unfiltered (mi->event_channel,
@@ -1079,7 +1080,7 @@ report_initial_inferior (struct inferior *inf, void *closure)
static struct ui_out *
mi_ui_out (struct interp *interp)
{
- struct mi_interp *mi = interp_data (interp);
+ struct mi_interp *mi = (struct mi_interp *) interp_data (interp);
return mi->mi_uiout;
}
@@ -1096,7 +1097,7 @@ static int
mi_set_logging (struct interp *interp, int start_log,
struct ui_file *out, struct ui_file *logfile)
{
- struct mi_interp *mi = interp_data (interp);
+ struct mi_interp *mi = (struct mi_interp *) interp_data (interp);
if (!mi)
return 0;
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 8712a7f..3ad11bb 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -610,7 +610,7 @@ struct collect_cores_data
static int
collect_cores (struct thread_info *ti, void *xdata)
{
- struct collect_cores_data *data = xdata;
+ struct collect_cores_data *data = (struct collect_cores_data *) xdata;
if (ptid_get_pid (ti->ptid) == data->pid)
{
@@ -643,7 +643,8 @@ struct print_one_inferior_data
static int
print_one_inferior (struct inferior *inferior, void *xdata)
{
- struct print_one_inferior_data *top_data = xdata;
+ struct print_one_inferior_data *top_data
+ = (struct print_one_inferior_data *) xdata;
struct ui_out *uiout = current_uiout;
if (VEC_empty (int, top_data->inferiors)
@@ -728,7 +729,7 @@ output_cores (struct ui_out *uiout, const char *field_name, const char *xcores)
static void
free_vector_of_ints (void *xvector)
{
- VEC (int) **vector = xvector;
+ VEC (int) **vector = (VEC (int) **) xvector;
VEC_free (int, *vector);
}
@@ -759,7 +760,7 @@ splay_tree_int_comparator (splay_tree_key xa, splay_tree_key xb)
static void
free_splay_tree (void *xt)
{
- splay_tree t = xt;
+ splay_tree t = (splay_tree) xt;
splay_tree_delete (t);
}
@@ -2150,7 +2151,8 @@ mi_execute_command (const char *cmd, int from_tty)
=thread-selected is supposed to indicate user's intentions. */
&& strcmp (command->command, "thread-select") != 0)
{
- struct mi_interp *mi = top_level_interpreter_data ();
+ struct mi_interp *mi
+ = (struct mi_interp *) top_level_interpreter_data ();
int report_change = 0;
if (command->thread == -1)
diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c
index ef0a2df..b234bba 100644
--- a/gdb/mi/mi-out.c
+++ b/gdb/mi/mi-out.c
@@ -120,7 +120,7 @@ mi_table_begin (struct ui_out *uiout,
void
mi_table_body (struct ui_out *uiout)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -134,7 +134,7 @@ mi_table_body (struct ui_out *uiout)
void
mi_table_end (struct ui_out *uiout)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
data->suppress_output = 0;
mi_close (uiout, ui_out_type_list); /* body */
@@ -147,7 +147,7 @@ void
mi_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
const char *col_name, const char *colhdr)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -166,7 +166,7 @@ void
mi_begin (struct ui_out *uiout, enum ui_out_type type, int level,
const char *id)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -179,7 +179,7 @@ mi_begin (struct ui_out *uiout, enum ui_out_type type, int level,
void
mi_end (struct ui_out *uiout, enum ui_out_type type, int level)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -194,7 +194,7 @@ mi_field_int (struct ui_out *uiout, int fldno, int width,
enum ui_align alignment, const char *fldname, int value)
{
char buffer[20]; /* FIXME: how many chars long a %d can become? */
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
if (data->suppress_output)
return;
@@ -218,7 +218,7 @@ void
mi_field_string (struct ui_out *uiout, int fldno, int width,
enum ui_align align, const char *fldname, const char *string)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream;
if (data->suppress_output)
@@ -241,7 +241,7 @@ mi_field_fmt (struct ui_out *uiout, int fldno, int width,
enum ui_align align, const char *fldname,
const char *format, va_list args)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream;
if (data->suppress_output)
@@ -282,7 +282,7 @@ mi_wrap_hint (struct ui_out *uiout, char *identstring)
void
mi_flush (struct ui_out *uiout)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
gdb_flush (stream);
@@ -291,7 +291,7 @@ mi_flush (struct ui_out *uiout)
int
mi_redirect (struct ui_out *uiout, struct ui_file *outstream)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
if (outstream != NULL)
VEC_safe_push (ui_filep, data->streams, outstream);
@@ -308,7 +308,7 @@ mi_redirect (struct ui_out *uiout, struct ui_file *outstream)
static void
field_separator (struct ui_out *uiout)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
if (data->suppress_field_separator)
@@ -320,7 +320,7 @@ field_separator (struct ui_out *uiout)
static void
mi_open (struct ui_out *uiout, const char *name, enum ui_out_type type)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
field_separator (uiout);
@@ -343,7 +343,7 @@ mi_open (struct ui_out *uiout, const char *name, enum ui_out_type type)
static void
mi_close (struct ui_out *uiout, enum ui_out_type type)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
switch (type)
@@ -365,7 +365,7 @@ mi_close (struct ui_out *uiout, enum ui_out_type type)
void
mi_out_buffered (struct ui_out *uiout, char *string)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
fprintf_unfiltered (stream, "%s", string);
@@ -376,7 +376,7 @@ mi_out_buffered (struct ui_out *uiout, char *string)
void
mi_out_rewind (struct ui_out *uiout)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *stream = VEC_last (ui_filep, data->streams);
ui_file_rewind (stream);
@@ -387,7 +387,7 @@ mi_out_rewind (struct ui_out *uiout)
void
mi_out_put (struct ui_out *uiout, struct ui_file *stream)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
struct ui_file *outstream = VEC_last (ui_filep, data->streams);
ui_file_put (outstream, ui_file_write_for_put, stream);
@@ -399,7 +399,7 @@ mi_out_put (struct ui_out *uiout, struct ui_file *stream)
int
mi_version (struct ui_out *uiout)
{
- mi_out_data *data = ui_out_data (uiout);
+ mi_out_data *data = (mi_out_data *) ui_out_data (uiout);
return data->mi_version;
}
@@ -424,7 +424,7 @@ mi_out_data_ctor (mi_out_data *self, int mi_version, struct ui_file *stream)
static void
mi_out_data_dtor (struct ui_out *ui_out)
{
- mi_out_data *data = ui_out_data (ui_out);
+ mi_out_data *data = (mi_out_data *) ui_out_data (ui_out);
VEC_free (ui_filep, data->streams);
xfree (data);
diff --git a/gdb/mi/mi-parse.c b/gdb/mi/mi-parse.c
index 92efe26..55ac3a5 100644
--- a/gdb/mi/mi-parse.c
+++ b/gdb/mi/mi-parse.c
@@ -229,7 +229,7 @@ mi_parse_free (struct mi_parse *parse)
static void
mi_parse_cleanup (void *arg)
{
- mi_parse_free (arg);
+ mi_parse_free ((struct mi_parse *) arg);
}
struct mi_parse *
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index 8cc1df2..02dfd2d 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -441,7 +441,7 @@ microblaze_frame_cache (struct frame_info *next_frame, void **this_cache)
int rn;
if (*this_cache)
- return *this_cache;
+ return (struct microblaze_frame_cache *) *this_cache;
cache = microblaze_alloc_frame_cache ();
*this_cache = cache;
diff --git a/gdb/minidebug.c b/gdb/minidebug.c
index 8610a15..b5cf45a 100644
--- a/gdb/minidebug.c
+++ b/gdb/minidebug.c
@@ -76,7 +76,7 @@ struct gdb_lzma_stream
static void *
lzma_open (struct bfd *nbfd, void *open_closure)
{
- asection *section = open_closure;
+ asection *section = (asection *) open_closure;
bfd_size_type size, offset;
lzma_stream_flags options;
gdb_byte footer[LZMA_STREAM_HEADER_SIZE];
@@ -133,7 +133,7 @@ static file_ptr
lzma_pread (struct bfd *nbfd, void *stream, void *buf, file_ptr nbytes,
file_ptr offset)
{
- struct gdb_lzma_stream *lstream = stream;
+ struct gdb_lzma_stream *lstream = (struct gdb_lzma_stream *) stream;
bfd_size_type chunk_size;
lzma_index_iter iter;
gdb_byte *compressed, *uncompressed;
@@ -220,7 +220,7 @@ static int
lzma_close (struct bfd *nbfd,
void *stream)
{
- struct gdb_lzma_stream *lstream = stream;
+ struct gdb_lzma_stream *lstream = (struct gdb_lzma_stream *) stream;
lzma_index_end (lstream->index, &gdb_lzma_allocator);
xfree (lstream->data);
@@ -239,7 +239,7 @@ lzma_stat (struct bfd *abfd,
void *stream,
struct stat *sb)
{
- struct gdb_lzma_stream *lstream = stream;
+ struct gdb_lzma_stream *lstream = (struct gdb_lzma_stream *) stream;
memset (sb, 0, sizeof (struct stat));
sb->st_size = lzma_index_uncompressed_size (lstream->index);
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index fe45dcc..a8c86bb 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -1642,7 +1642,8 @@ mips_linux_init_abi (struct gdbarch_info info,
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum mips_abi abi = mips_abi (gdbarch);
- struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info;
+ struct tdesc_arch_data *tdesc_data
+ = (struct tdesc_arch_data *) info.tdep_info;
linux_init_abi (info, gdbarch);
diff --git a/gdb/mips-sde-tdep.c b/gdb/mips-sde-tdep.c
index 0246b27..8e4690e 100644
--- a/gdb/mips-sde-tdep.c
+++ b/gdb/mips-sde-tdep.c
@@ -48,7 +48,7 @@ mips_sde_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache != NULL)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
*this_cache = cache;
@@ -205,7 +205,7 @@ static void
mips_sde_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect,
void *obj)
{
- enum gdb_osabi *os_ident_ptr = obj;
+ enum gdb_osabi *os_ident_ptr = (enum gdb_osabi *) obj;
const char *name;
name = bfd_get_section_name (abfd, sect);
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index c0f84ee..388513e 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -2818,7 +2818,7 @@ mips_insn16_frame_cache (struct frame_info *this_frame, void **this_cache)
struct mips_frame_cache *cache;
if ((*this_cache) != NULL)
- return (*this_cache);
+ return (struct mips_frame_cache *) (*this_cache);
cache = FRAME_OBSTACK_ZALLOC (struct mips_frame_cache);
(*this_cache) = cache;
cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -2836,7 +2836,8 @@ mips_insn16_frame_cache (struct frame_info *this_frame, void **this_cache)
if (start_addr == 0)
return cache;
- mips16_scan_prologue (gdbarch, start_addr, pc, this_frame, *this_cache);
+ mips16_scan_prologue (gdbarch, start_addr, pc, this_frame,
+ (struct mips_frame_cache *) *this_cache);
}
/* gdbarch_sp_regnum contains the value and not the address. */
@@ -2844,7 +2845,7 @@ mips_insn16_frame_cache (struct frame_info *this_frame, void **this_cache)
gdbarch_num_regs (gdbarch) + MIPS_SP_REGNUM,
cache->base);
- return (*this_cache);
+ return (struct mips_frame_cache *) (*this_cache);
}
static void
@@ -3263,7 +3264,7 @@ mips_micro_frame_cache (struct frame_info *this_frame, void **this_cache)
struct mips_frame_cache *cache;
if ((*this_cache) != NULL)
- return (*this_cache);
+ return (struct mips_frame_cache *) (*this_cache);
cache = FRAME_OBSTACK_ZALLOC (struct mips_frame_cache);
(*this_cache) = cache;
@@ -3282,7 +3283,8 @@ mips_micro_frame_cache (struct frame_info *this_frame, void **this_cache)
if (start_addr == 0)
return cache;
- micromips_scan_prologue (gdbarch, start_addr, pc, this_frame, *this_cache);
+ micromips_scan_prologue (gdbarch, start_addr, pc, this_frame,
+ (struct mips_frame_cache *) *this_cache);
}
/* gdbarch_sp_regnum contains the value and not the address. */
@@ -3290,7 +3292,7 @@ mips_micro_frame_cache (struct frame_info *this_frame, void **this_cache)
gdbarch_num_regs (gdbarch) + MIPS_SP_REGNUM,
cache->base);
- return (*this_cache);
+ return (struct mips_frame_cache *) (*this_cache);
}
static void
@@ -3640,7 +3642,7 @@ mips_insn32_frame_cache (struct frame_info *this_frame, void **this_cache)
struct mips_frame_cache *cache;
if ((*this_cache) != NULL)
- return (*this_cache);
+ return (struct mips_frame_cache *) (*this_cache);
cache = FRAME_OBSTACK_ZALLOC (struct mips_frame_cache);
(*this_cache) = cache;
@@ -3659,7 +3661,8 @@ mips_insn32_frame_cache (struct frame_info *this_frame, void **this_cache)
if (start_addr == 0)
return cache;
- mips32_scan_prologue (gdbarch, start_addr, pc, this_frame, *this_cache);
+ mips32_scan_prologue (gdbarch, start_addr, pc, this_frame,
+ (struct mips_frame_cache *) *this_cache);
}
/* gdbarch_sp_regnum contains the value and not the address. */
@@ -3667,7 +3670,7 @@ mips_insn32_frame_cache (struct frame_info *this_frame, void **this_cache)
gdbarch_num_regs (gdbarch) + MIPS_SP_REGNUM,
cache->base);
- return (*this_cache);
+ return (struct mips_frame_cache *) (*this_cache);
}
static void
@@ -3749,7 +3752,7 @@ mips_stub_frame_cache (struct frame_info *this_frame, void **this_cache)
int num_regs = gdbarch_num_regs (gdbarch);
if ((*this_cache) != NULL)
- return (*this_cache);
+ return (struct trad_frame_cache *) (*this_cache);
this_trad_cache = trad_frame_cache_zalloc (this_frame);
(*this_cache) = this_trad_cache;
@@ -7035,7 +7038,7 @@ reinit_frame_cache_sfunc (char *args, int from_tty,
static int
gdb_print_insn_mips (bfd_vma memaddr, struct disassemble_info *info)
{
- struct gdbarch *gdbarch = info->application_data;
+ struct gdbarch *gdbarch = (struct gdbarch *) info->application_data;
/* FIXME: cagney/2003-06-26: Is this even necessary? The
disassembler needs to be able to locally determine the ISA, and
@@ -8186,7 +8189,7 @@ mips_register_g_packet_guesses (struct gdbarch *gdbarch)
static struct value *
value_of_mips_user_reg (struct frame_info *frame, const void *baton)
{
- const int *reg_p = baton;
+ const int *reg_p = (const int *) baton;
return value_of_register (*reg_p, frame);
}
@@ -8895,7 +8898,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
mips_register_g_packet_guesses (gdbarch);
/* Hook in OS ABI-specific overrides, if they have been registered. */
- info.tdep_info = (void *) tdesc_data;
+ info.tdep_info = (struct gdbarch_tdep_info *) tdesc_data;
gdbarch_init_osabi (info, gdbarch);
/* The hook may have adjusted num_regs, fetch the final value and
diff --git a/gdb/mips64obsd-tdep.c b/gdb/mips64obsd-tdep.c
index 3150155..a3921c1 100644
--- a/gdb/mips64obsd-tdep.c
+++ b/gdb/mips64obsd-tdep.c
@@ -46,7 +46,7 @@ mips64obsd_supply_gregset (const struct regset *regset,
struct regcache *regcache, int regnum,
const void *gregs, size_t len)
{
- const char *regs = gregs;
+ const char *regs = (const char *) gregs;
int i;
for (i = 0; i < MIPS64OBSD_NUM_REGS; i++)
diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c
index 7cb83c0..390c088 100644
--- a/gdb/mipsnbsd-tdep.c
+++ b/gdb/mipsnbsd-tdep.c
@@ -56,7 +56,7 @@ mipsnbsd_supply_fpregset (const struct regset *regset,
int regnum, const void *fpregs, size_t len)
{
size_t regsize = mips_isa_regsize (get_regcache_arch (regcache));
- const char *regs = fpregs;
+ const char *regs = (const char *) fpregs;
int i;
gdb_assert (len >= MIPSNBSD_NUM_FPREGS * regsize);
@@ -79,7 +79,7 @@ mipsnbsd_supply_gregset (const struct regset *regset,
const void *gregs, size_t len)
{
size_t regsize = mips_isa_regsize (get_regcache_arch (regcache));
- const char *regs = gregs;
+ const char *regs = (const char *) gregs;
int i;
gdb_assert (len >= MIPSNBSD_NUM_GREGS * regsize);
diff --git a/gdb/mn10300-linux-tdep.c b/gdb/mn10300-linux-tdep.c
index 9ac6c15..7a6d779 100644
--- a/gdb/mn10300-linux-tdep.c
+++ b/gdb/mn10300-linux-tdep.c
@@ -243,7 +243,8 @@ am33_supply_fpregset_method (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
- const mn10300_elf_fpregset_t *fpregset = fpregs;
+ const mn10300_elf_fpregset_t *fpregset
+ = (const mn10300_elf_fpregset_t *) fpregs;
gdb_assert (len >= sizeof (mn10300_elf_fpregset_t));
@@ -275,7 +276,7 @@ am33_collect_gregset_method (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs, size_t len)
{
- mn10300_elf_gregset_t *regp = gregs;
+ mn10300_elf_gregset_t *regp = (gdb_byte (*)[28][4]) gregs;
int i;
gdb_assert (len >= sizeof (mn10300_elf_gregset_t));
@@ -423,7 +424,7 @@ am33_collect_fpregset_method (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *fpregs, size_t len)
{
- mn10300_elf_fpregset_t *fpregset = fpregs;
+ mn10300_elf_fpregset_t *fpregset = (mn10300_elf_fpregset_t *) fpregs;
gdb_assert (len >= sizeof (mn10300_elf_fpregset_t));
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index b5e1fa7..c6d018f 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -1092,10 +1092,12 @@ mn10300_analyze_frame_prologue (struct frame_info *this_frame,
stop_addr = func_start;
mn10300_analyze_prologue (get_frame_arch (this_frame),
- func_start, stop_addr, *this_prologue_cache);
+ func_start, stop_addr,
+ ((struct mn10300_prologue *)
+ *this_prologue_cache));
}
- return *this_prologue_cache;
+ return (struct mn10300_prologue *) *this_prologue_cache;
}
/* Given the next frame and a prologue cache, return this frame's
diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c
index 9496314..3236012 100644
--- a/gdb/moxie-tdep.c
+++ b/gdb/moxie-tdep.c
@@ -570,7 +570,7 @@ moxie_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct moxie_frame_cache *) *this_cache;
cache = moxie_alloc_frame_cache ();
*this_cache = cache;
diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c
index 56276af..896ee57 100644
--- a/gdb/msp430-tdep.c
+++ b/gdb/msp430-tdep.c
@@ -306,7 +306,8 @@ struct msp430_get_opcode_byte_handle
static int
msp430_get_opcode_byte (void *handle)
{
- struct msp430_get_opcode_byte_handle *opcdata = handle;
+ struct msp430_get_opcode_byte_handle *opcdata
+ = (struct msp430_get_opcode_byte_handle *) handle;
int status;
gdb_byte byte;
@@ -502,10 +503,11 @@ msp430_analyze_frame_prologue (struct frame_info *this_frame,
stop_addr = func_start;
msp430_analyze_prologue (get_frame_arch (this_frame), func_start,
- stop_addr, *this_prologue_cache);
+ stop_addr,
+ (struct msp430_prologue *) *this_prologue_cache);
}
- return *this_prologue_cache;
+ return (struct msp430_prologue *) *this_prologue_cache;
}
/* Given a frame and a prologue cache, return this frame's base. */
diff --git a/gdb/mt-tdep.c b/gdb/mt-tdep.c
index 21d081d..44983f0 100644
--- a/gdb/mt-tdep.c
+++ b/gdb/mt-tdep.c
@@ -915,7 +915,7 @@ mt_frame_unwind_cache (struct frame_info *this_frame,
ULONGEST sp, fp;
if ((*this_prologue_cache))
- return (*this_prologue_cache);
+ return (struct mt_unwind_cache *) (*this_prologue_cache);
gdbarch = get_frame_arch (this_frame);
info = FRAME_OBSTACK_ZALLOC (struct mt_unwind_cache);
diff --git a/gdb/nios2-linux-tdep.c b/gdb/nios2-linux-tdep.c
index 6b483e8..909fecd 100644
--- a/gdb/nios2-linux-tdep.c
+++ b/gdb/nios2-linux-tdep.c
@@ -61,7 +61,7 @@ nios2_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs_buf, size_t len)
{
- const gdb_byte *gregs = gregs_buf;
+ const gdb_byte *gregs = (const gdb_byte *) gregs_buf;
int regno;
static const gdb_byte zero_buf[4] = {0, 0, 0, 0};
@@ -83,7 +83,7 @@ nios2_collect_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs_buf, size_t len)
{
- gdb_byte *gregs = gregs_buf;
+ gdb_byte *gregs = (gdb_byte *) gregs_buf;
int regno;
for (regno = NIOS2_Z_REGNUM; regno <= NIOS2_MPUACC_REGNUM; regno++)
diff --git a/gdb/nios2-tdep.c b/gdb/nios2-tdep.c
index aa59528..3b66dba 100644
--- a/gdb/nios2-tdep.c
+++ b/gdb/nios2-tdep.c
@@ -1920,7 +1920,7 @@ nios2_frame_unwind_cache (struct frame_info *this_frame,
int i;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct nios2_unwind_cache *) *this_prologue_cache;
cache = FRAME_OBSTACK_ZALLOC (struct nios2_unwind_cache);
*this_prologue_cache = cache;
@@ -2028,7 +2028,7 @@ nios2_stub_frame_cache (struct frame_info *this_frame, void **this_cache)
int num_regs = gdbarch_num_regs (gdbarch);
if (*this_cache != NULL)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
this_trad_cache = trad_frame_cache_zalloc (this_frame);
*this_cache = this_trad_cache;
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 227ecc0..f190673 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -981,7 +981,7 @@ find_methods (char type, const char *theclass, const char *category,
unsigned int objfile_csym = 0;
- objc_csym = objfile_data (objfile, objc_objfile_data);
+ objc_csym = (unsigned int *) objfile_data (objfile, objc_objfile_data);
if (objc_csym != NULL && *objc_csym == 0)
/* There are no ObjC symbols in this objfile. Skip it entirely. */
continue;
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index fc692d1..d33379f 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -83,7 +83,7 @@ static const struct program_space_data *objfiles_pspace_data;
static void
objfiles_pspace_data_cleanup (struct program_space *pspace, void *arg)
{
- struct objfile_pspace_info *info = arg;
+ struct objfile_pspace_info *info = (struct objfile_pspace_info *) arg;
xfree (info->sections);
xfree (info);
@@ -97,7 +97,8 @@ get_objfile_pspace_data (struct program_space *pspace)
{
struct objfile_pspace_info *info;
- info = program_space_data (pspace, objfiles_pspace_data);
+ info = ((struct objfile_pspace_info *)
+ program_space_data (pspace, objfiles_pspace_data));
if (info == NULL)
{
info = XCNEW (struct objfile_pspace_info);
@@ -127,7 +128,8 @@ get_objfile_bfd_data (struct objfile *objfile, struct bfd *abfd)
struct objfile_per_bfd_storage *storage = NULL;
if (abfd != NULL)
- storage = bfd_data (abfd, objfiles_bfd_data);
+ storage = ((struct objfile_per_bfd_storage *)
+ bfd_data (abfd, objfiles_bfd_data));
if (storage == NULL)
{
@@ -176,7 +178,7 @@ free_objfile_per_bfd_storage (struct objfile_per_bfd_storage *storage)
static void
objfile_bfd_data_free (struct bfd *unused, void *d)
{
- free_objfile_per_bfd_storage (d);
+ free_objfile_per_bfd_storage ((struct objfile_per_bfd_storage *) d);
}
/* See objfiles.h. */
@@ -320,7 +322,7 @@ static void
add_to_objfile_sections (struct bfd *abfd, struct bfd_section *asect,
void *objfilep)
{
- add_to_objfile_sections_full (abfd, asect, objfilep, 0);
+ add_to_objfile_sections_full (abfd, asect, (struct objfile *) objfilep, 0);
}
/* Builds a section table for OBJFILE.
@@ -755,7 +757,7 @@ free_objfile (struct objfile *objfile)
static void
do_free_objfile_cleanup (void *obj)
{
- free_objfile (obj);
+ free_objfile ((struct objfile *) obj);
}
struct cleanup *
@@ -1522,7 +1524,7 @@ resume_section_map_updates (struct program_space *pspace)
void
resume_section_map_updates_cleanup (void *arg)
{
- resume_section_map_updates (arg);
+ resume_section_map_updates ((struct program_space *) arg);
}
/* Return 1 if ADDR maps into one of the sections of OBJFILE and 0
diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c
index 6583d15..3d17ce4 100644
--- a/gdb/opencl-lang.c
+++ b/gdb/opencl-lang.c
@@ -69,7 +69,7 @@ static struct gdbarch_data *opencl_type_data;
static struct type **
builtin_opencl_type (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, opencl_type_data);
+ return (struct type **) gdbarch_data (gdbarch, opencl_type_data);
}
/* Returns the corresponding OpenCL vector type from the given type code,
diff --git a/gdb/osabi.c b/gdb/osabi.c
index eb5a750..5836033 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -441,7 +441,7 @@ check_note (bfd *abfd, asection *sect, char *note, unsigned int *sectsize,
void
generic_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect, void *obj)
{
- enum gdb_osabi *osabi = obj;
+ enum gdb_osabi *osabi = (enum gdb_osabi *) obj;
const char *name;
unsigned int sectsize;
char *note;
diff --git a/gdb/osdata.c b/gdb/osdata.c
index d33026c..2ac0062 100644
--- a/gdb/osdata.c
+++ b/gdb/osdata.c
@@ -58,14 +58,14 @@ osdata_start_osdata (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct osdata_parsing_data *data = user_data;
+ struct osdata_parsing_data *data = (struct osdata_parsing_data *) user_data;
char *type;
struct osdata *osdata;
if (data->osdata)
gdb_xml_error (parser, _("Seen more than on osdata element"));
- type = xml_find_attribute (attributes, "type")->value;
+ type = (char *) xml_find_attribute (attributes, "type")->value;
osdata = XCNEW (struct osdata);
osdata->type = xstrdup (type);
data->osdata = osdata;
@@ -78,7 +78,7 @@ osdata_start_item (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct osdata_parsing_data *data = user_data;
+ struct osdata_parsing_data *data = (struct osdata_parsing_data *) user_data;
struct osdata_item item = { NULL };
VEC_safe_push (osdata_item_s, data->osdata->items, &item);
@@ -91,8 +91,9 @@ osdata_start_column (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct osdata_parsing_data *data = user_data;
- const char *name = xml_find_attribute (attributes, "name")->value;
+ struct osdata_parsing_data *data = (struct osdata_parsing_data *) user_data;
+ const char *name
+ = (const char *) xml_find_attribute (attributes, "name")->value;
data->property_name = xstrdup (name);
}
@@ -104,7 +105,7 @@ osdata_end_column (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct osdata_parsing_data *data = user_data;
+ struct osdata_parsing_data *data = (struct osdata_parsing_data *) user_data;
struct osdata *osdata = data->osdata;
struct osdata_item *item = VEC_last (osdata_item_s, osdata->items);
struct osdata_column *col = VEC_safe_push (osdata_column_s,
@@ -121,7 +122,7 @@ osdata_end_column (struct gdb_xml_parser *parser,
static void
clear_parsing_data (void *p)
{
- struct osdata_parsing_data *data = p;
+ struct osdata_parsing_data *data = (struct osdata_parsing_data *) p;
osdata_free (data->osdata);
data->osdata = NULL;
@@ -229,7 +230,7 @@ osdata_free (struct osdata *osdata)
static void
osdata_free_cleanup (void *arg)
{
- struct osdata *osdata = arg;
+ struct osdata *osdata = (struct osdata *) arg;
osdata_free (osdata);
}
diff --git a/gdb/parse.c b/gdb/parse.c
index fcd51f9..a24c52a 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -1621,7 +1621,7 @@ get_type_stack (void)
void
type_stack_cleanup (void *arg)
{
- struct type_stack *stack = arg;
+ struct type_stack *stack = (struct type_stack *) arg;
xfree (stack->elements);
xfree (stack);
@@ -1898,7 +1898,7 @@ exp_iterate (struct expression *exp,
static int
exp_uses_objfile_iter (struct objfile *exp_objfile, void *objfile_voidp)
{
- struct objfile *objfile = objfile_voidp;
+ struct objfile *objfile = (struct objfile *) objfile_voidp;
if (exp_objfile->separate_debug_objfile_backlink)
exp_objfile = exp_objfile->separate_debug_objfile_backlink;
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 610e44f..ae5edc2 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -373,7 +373,8 @@ ppc_linux_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const struct ppc_reg_offsets *offsets = regset->regmap;
+ const struct ppc_reg_offsets *offsets
+ = (const struct ppc_reg_offsets *) regset->regmap;
ppc_supply_gregset (regset, regcache, regnum, gregs, len);
@@ -381,13 +382,13 @@ ppc_linux_supply_gregset (const struct regset *regset,
{
/* "orig_r3" is stored 2 slots after "pc". */
if (regnum == -1 || regnum == PPC_ORIG_R3_REGNUM)
- ppc_supply_reg (regcache, PPC_ORIG_R3_REGNUM, gregs,
+ ppc_supply_reg (regcache, PPC_ORIG_R3_REGNUM, (const gdb_byte *) gregs,
offsets->pc_offset + 2 * offsets->gpr_size,
offsets->gpr_size);
/* "trap" is stored 8 slots after "pc". */
if (regnum == -1 || regnum == PPC_TRAP_REGNUM)
- ppc_supply_reg (regcache, PPC_TRAP_REGNUM, gregs,
+ ppc_supply_reg (regcache, PPC_TRAP_REGNUM, (const gdb_byte *) gregs,
offsets->pc_offset + 8 * offsets->gpr_size,
offsets->gpr_size);
}
@@ -398,7 +399,8 @@ ppc_linux_collect_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs, size_t len)
{
- const struct ppc_reg_offsets *offsets = regset->regmap;
+ const struct ppc_reg_offsets *offsets
+ = (const struct ppc_reg_offsets *) regset->regmap;
/* Clear areas in the linux gregset not written elsewhere. */
if (regnum == -1)
@@ -410,13 +412,13 @@ ppc_linux_collect_gregset (const struct regset *regset,
{
/* "orig_r3" is stored 2 slots after "pc". */
if (regnum == -1 || regnum == PPC_ORIG_R3_REGNUM)
- ppc_collect_reg (regcache, PPC_ORIG_R3_REGNUM, gregs,
+ ppc_collect_reg (regcache, PPC_ORIG_R3_REGNUM, (gdb_byte *) gregs,
offsets->pc_offset + 2 * offsets->gpr_size,
offsets->gpr_size);
/* "trap" is stored 8 slots after "pc". */
if (regnum == -1 || regnum == PPC_TRAP_REGNUM)
- ppc_collect_reg (regcache, PPC_TRAP_REGNUM, gregs,
+ ppc_collect_reg (regcache, PPC_TRAP_REGNUM, (gdb_byte *) gregs,
offsets->pc_offset + 8 * offsets->gpr_size,
offsets->gpr_size);
}
@@ -1257,7 +1259,7 @@ struct ppu2spu_cache
static struct gdbarch *
ppu2spu_prev_arch (struct frame_info *this_frame, void **this_cache)
{
- struct ppu2spu_cache *cache = *this_cache;
+ struct ppu2spu_cache *cache = (struct ppu2spu_cache *) *this_cache;
return get_regcache_arch (cache->regcache);
}
@@ -1265,7 +1267,7 @@ static void
ppu2spu_this_id (struct frame_info *this_frame,
void **this_cache, struct frame_id *this_id)
{
- struct ppu2spu_cache *cache = *this_cache;
+ struct ppu2spu_cache *cache = (struct ppu2spu_cache *) *this_cache;
*this_id = cache->frame_id;
}
@@ -1273,7 +1275,7 @@ static struct value *
ppu2spu_prev_register (struct frame_info *this_frame,
void **this_cache, int regnum)
{
- struct ppu2spu_cache *cache = *this_cache;
+ struct ppu2spu_cache *cache = (struct ppu2spu_cache *) *this_cache;
struct gdbarch *gdbarch = get_regcache_arch (cache->regcache);
gdb_byte *buf;
@@ -1298,7 +1300,7 @@ struct ppu2spu_data
static enum register_status
ppu2spu_unwind_register (void *src, int regnum, gdb_byte *buf)
{
- struct ppu2spu_data *data = src;
+ struct ppu2spu_data *data = (struct ppu2spu_data *) src;
enum bfd_endian byte_order = gdbarch_byte_order (data->gdbarch);
if (regnum >= 0 && regnum < SPU_NUM_GPRS)
@@ -1350,7 +1352,7 @@ ppu2spu_sniffer (const struct frame_unwind *self,
info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
info.byte_order = BFD_ENDIAN_BIG;
info.osabi = GDB_OSABI_LINUX;
- info.tdep_info = (void *) &data.id;
+ info.tdep_info = (struct gdbarch_tdep_info *) &data.id;
data.gdbarch = gdbarch_find_by_info (info);
if (!data.gdbarch)
return 0;
@@ -1382,7 +1384,7 @@ ppu2spu_sniffer (const struct frame_unwind *self,
static void
ppu2spu_dealloc_cache (struct frame_info *self, void *this_cache)
{
- struct ppu2spu_cache *cache = this_cache;
+ struct ppu2spu_cache *cache = (struct ppu2spu_cache *) this_cache;
regcache_xfree (cache->regcache);
}
@@ -1633,7 +1635,8 @@ ppc_linux_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info;
+ struct tdesc_arch_data *tdesc_data
+ = (struct tdesc_arch_data *) info.tdep_info;
static const char *const stap_integer_prefixes[] = { "i", NULL };
static const char *const stap_register_indirection_prefixes[] = { "(",
NULL };
diff --git a/gdb/ppcfbsd-tdep.c b/gdb/ppcfbsd-tdep.c
index 04fa750..b5f1046 100644
--- a/gdb/ppcfbsd-tdep.c
+++ b/gdb/ppcfbsd-tdep.c
@@ -219,7 +219,7 @@ ppcfbsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
*this_cache = cache;
diff --git a/gdb/ppcobsd-tdep.c b/gdb/ppcobsd-tdep.c
index ffd91dd..75257f4 100644
--- a/gdb/ppcobsd-tdep.c
+++ b/gdb/ppcobsd-tdep.c
@@ -170,7 +170,7 @@ ppcobsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
*this_cache = cache;
diff --git a/gdb/progspace.c b/gdb/progspace.c
index ea2f8ec..3d7e475 100644
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -215,7 +215,7 @@ set_current_program_space (struct program_space *pspace)
static void
restore_program_space (void *arg)
{
- struct program_space *saved_pspace = arg;
+ struct program_space *saved_pspace = (struct program_space *) arg;
set_current_program_space (saved_pspace);
}
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index f9fafc7..d565c67 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -315,7 +315,8 @@ find_pc_sect_psymtab (struct objfile *objfile, CORE_ADDR pc,
if (objfile->psymtabs_addrmap != NULL)
{
- pst = addrmap_find (objfile->psymtabs_addrmap, pc);
+ pst = ((struct partial_symtab *)
+ addrmap_find (objfile->psymtabs_addrmap, pc));
if (pst != NULL)
{
/* FIXME: addrmaps currently do not handle overlayed sections,
@@ -1489,8 +1490,8 @@ const struct quick_symbol_functions psym_functions =
static int
compare_psymbols (const void *s1p, const void *s2p)
{
- struct partial_symbol *const *s1 = s1p;
- struct partial_symbol *const *s2 = s2p;
+ struct partial_symbol *const *s1 = (struct partial_symbol * const*) s1p;
+ struct partial_symbol *const *s2 = (struct partial_symbol * const*) s2p;
return strcmp_iw_ordered (SYMBOL_SEARCH_NAME (*s1),
SYMBOL_SEARCH_NAME (*s2));
@@ -1624,10 +1625,9 @@ psymbol_bcache_full (struct partial_symbol *sym,
struct psymbol_bcache *bcache,
int *added)
{
- return bcache_full (sym,
- sizeof (struct partial_symbol),
- bcache->bcache,
- added);
+ return ((const struct partial_symbol *)
+ bcache_full (sym, sizeof (struct partial_symbol), bcache->bcache,
+ added));
}
/* Helper function, initialises partial symbol structure and stashes
@@ -1784,8 +1784,9 @@ allocate_psymtab (const char *filename, struct objfile *objfile)
sizeof (struct partial_symtab));
memset (psymtab, 0, sizeof (struct partial_symtab));
- psymtab->filename = bcache (filename, strlen (filename) + 1,
- objfile->per_bfd->filename_cache);
+ psymtab->filename
+ = (const char *) bcache (filename, strlen (filename) + 1,
+ objfile->per_bfd->filename_cache);
psymtab->compunit_symtab = NULL;
/* Prepend it to the psymtab list for the objfile it belongs to.
@@ -1861,7 +1862,7 @@ struct psymtab_state
static void
discard_psymtabs_upto (void *arg)
{
- struct psymtab_state *state = arg;
+ struct psymtab_state *state = (struct psymtab_state *) arg;
while (state->objfile->psymtabs != state->save)
discard_psymtab (state->objfile, state->objfile->psymtabs);
diff --git a/gdb/python/py-block.c b/gdb/python/py-block.c
index 6c0f5cb..91a3d8e 100644
--- a/gdb/python/py-block.c
+++ b/gdb/python/py-block.c
@@ -256,7 +256,8 @@ set_block (block_object *obj, const struct block *block,
if (objfile)
{
obj->objfile = objfile;
- obj->next = objfile_data (objfile, blpy_objfile_data_key);
+ obj->next = ((struct blpy_block_object *)
+ objfile_data (objfile, blpy_objfile_data_key));
if (obj->next)
obj->next->prev = obj;
set_objfile_data (objfile, blpy_objfile_data_key, obj);
@@ -411,7 +412,7 @@ gdbpy_block_for_pc (PyObject *self, PyObject *args)
static void
del_objfile_blocks (struct objfile *objfile, void *datum)
{
- block_object *obj = datum;
+ block_object *obj = (block_object *) datum;
while (obj)
{
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index 30619dc..9c0b0e4 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -720,7 +720,7 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs)
static int
build_bp_list (struct breakpoint *b, void *arg)
{
- PyObject *list = arg;
+ PyObject *list = (PyObject *) arg;
PyObject *bp = (PyObject *) b->py_bp_object;
int iserr = 0;
diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c
index 3cfa1d5..dbc197e 100644
--- a/gdb/python/py-inferior.c
+++ b/gdb/python/py-inferior.c
@@ -242,7 +242,7 @@ inferior_to_inferior_object (struct inferior *inferior)
{
inferior_object *inf_obj;
- inf_obj = inferior_data (inferior, infpy_inf_data_key);
+ inf_obj = (inferior_object *) inferior_data (inferior, infpy_inf_data_key);
if (!inf_obj)
{
inf_obj = PyObject_New (inferior_object, &inferior_object_type);
@@ -456,7 +456,7 @@ infpy_get_was_attached (PyObject *self, void *closure)
static int
build_inferior_list (struct inferior *inf, void *arg)
{
- PyObject *list = arg;
+ PyObject *list = (PyObject *) arg;
PyObject *inferior = inferior_to_inferior_object (inf);
int success = 0;
@@ -833,7 +833,7 @@ py_free_inferior (struct inferior *inf, void *datum)
{
struct cleanup *cleanup;
- inferior_object *inf_obj = datum;
+ inferior_object *inf_obj = (inferior_object *) datum;
struct threadlist_entry *th_entry, *th_tmp;
if (!gdb_python_initialized)
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
index 5dc9ae6..ed2fe74 100644
--- a/gdb/python/py-objfile.c
+++ b/gdb/python/py-objfile.c
@@ -615,7 +615,7 @@ static void
py_free_objfile (struct objfile *objfile, void *datum)
{
struct cleanup *cleanup;
- objfile_object *object = datum;
+ objfile_object *object = (objfile_object *) datum;
cleanup = ensure_python_env (get_objfile_arch (objfile), current_language);
object->objfile = NULL;
@@ -633,7 +633,7 @@ objfile_to_objfile_object (struct objfile *objfile)
{
objfile_object *object;
- object = objfile_data (objfile, objfpy_objfile_data_key);
+ object = (objfile_object *) objfile_data (objfile, objfpy_objfile_data_key);
if (!object)
{
object = PyObject_New (objfile_object, &objfile_object_type);
diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c
index 274ac6c..df21ff0 100644
--- a/gdb/python/py-prettyprint.c
+++ b/gdb/python/py-prettyprint.c
@@ -393,7 +393,7 @@ print_string_repr (PyObject *printer, const char *hint,
static void
py_restore_tstate (void *p)
{
- PyFrameObject *frame = p;
+ PyFrameObject *frame = (PyFrameObject *) p;
PyThreadState *tstate = PyThreadState_GET ();
tstate->frame = frame;
diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c
index 17da3d1..cd48cbb 100644
--- a/gdb/python/py-progspace.c
+++ b/gdb/python/py-progspace.c
@@ -323,7 +323,7 @@ static void
py_free_pspace (struct program_space *pspace, void *datum)
{
struct cleanup *cleanup;
- pspace_object *object = datum;
+ pspace_object *object = (pspace_object *) datum;
/* This is a fiction, but we're in a nasty spot: The pspace is in the
process of being deleted, we can't rely on anything in it. Plus
this is one time when the current program space and current inferior
@@ -351,7 +351,7 @@ pspace_to_pspace_object (struct program_space *pspace)
{
pspace_object *object;
- object = program_space_data (pspace, pspy_pspace_data_key);
+ object = (pspace_object *) program_space_data (pspace, pspy_pspace_data_key);
if (!object)
{
object = PyObject_New (pspace_object, &pspace_object_type);
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
index 3d2fa91..c1511b5 100644
--- a/gdb/python/py-symbol.c
+++ b/gdb/python/py-symbol.c
@@ -308,7 +308,8 @@ set_symbol (symbol_object *obj, struct symbol *symbol)
{
struct objfile *objfile = symbol_objfile (symbol);
- obj->next = objfile_data (objfile, sympy_objfile_data_key);
+ obj->next = ((struct sympy_symbol_object *)
+ objfile_data (objfile, sympy_objfile_data_key));
if (obj->next)
obj->next->prev = obj;
set_objfile_data (objfile, sympy_objfile_data_key, obj);
@@ -485,7 +486,7 @@ gdbpy_lookup_global_symbol (PyObject *self, PyObject *args, PyObject *kw)
static void
del_objfile_symbols (struct objfile *objfile, void *datum)
{
- symbol_object *obj = datum;
+ symbol_object *obj = (symbol_object *) datum;
while (obj)
{
symbol_object *next = obj->next;
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c
index f0ae036..79bfeca 100644
--- a/gdb/python/py-symtab.c
+++ b/gdb/python/py-symtab.c
@@ -380,8 +380,10 @@ set_sal (sal_object *sal_obj, struct symtab_and_line sal)
objfile cleanup observer linked list. */
if (sal_obj->symtab != (symtab_object *)Py_None)
{
- sal_obj->next = objfile_data (SYMTAB_OBJFILE (sal_obj->symtab->symtab),
- salpy_objfile_data_key);
+ sal_obj->next
+ = ((struct salpy_sal_object *)
+ objfile_data (SYMTAB_OBJFILE (sal_obj->symtab->symtab),
+ salpy_objfile_data_key));
if (sal_obj->next)
sal_obj->next->prev = sal_obj;
@@ -406,8 +408,9 @@ set_symtab (symtab_object *obj, struct symtab *symtab)
obj->prev = NULL;
if (symtab)
{
- obj->next = objfile_data (SYMTAB_OBJFILE (symtab),
- stpy_objfile_data_key);
+ obj->next
+ = ((struct stpy_symtab_object *)
+ objfile_data (SYMTAB_OBJFILE (symtab), stpy_objfile_data_key));
if (obj->next)
obj->next->prev = obj;
set_objfile_data (SYMTAB_OBJFILE (symtab), stpy_objfile_data_key, obj);
@@ -478,7 +481,7 @@ symtab_object_to_symtab (PyObject *obj)
static void
del_objfile_symtab (struct objfile *objfile, void *datum)
{
- symtab_object *obj = datum;
+ symtab_object *obj = (symtab_object *) datum;
while (obj)
{
@@ -499,7 +502,7 @@ del_objfile_symtab (struct objfile *objfile, void *datum)
static void
del_objfile_sal (struct objfile *objfile, void *datum)
{
- sal_object *obj = datum;
+ sal_object *obj = (sal_object *) datum;
while (obj)
{
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index e202c83..7b3f8f9 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -1086,7 +1086,7 @@ static const struct objfile_data *typy_objfile_data_key;
static void
save_objfile_types (struct objfile *objfile, void *datum)
{
- type_object *obj = datum;
+ type_object *obj = (type_object *) datum;
htab_t copied_types;
struct cleanup *cleanup;
@@ -1127,7 +1127,8 @@ set_type (type_object *obj, struct type *type)
{
struct objfile *objfile = TYPE_OBJFILE (type);
- obj->next = objfile_data (objfile, typy_objfile_data_key);
+ obj->next = ((struct pyty_type_object *)
+ objfile_data (objfile, typy_objfile_data_key));
if (obj->next)
obj->next->prev = obj;
set_objfile_data (objfile, typy_objfile_data_key, obj);
diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c
index 523cb76..c518c5d 100644
--- a/gdb/python/py-unwind.c
+++ b/gdb/python/py-unwind.c
@@ -498,7 +498,7 @@ static struct value *
pyuw_prev_register (struct frame_info *this_frame, void **cache_ptr,
int regnum)
{
- cached_frame_info *cached_frame = *cache_ptr;
+ cached_frame_info *cached_frame = (cached_frame_info *) *cache_ptr;
struct reg_info *reg_info = cached_frame->reg;
struct reg_info *reg_info_end = reg_info + cached_frame->reg_count;
@@ -636,8 +636,9 @@ pyuw_gdbarch_data_init (struct gdbarch *gdbarch)
static void
pyuw_on_new_gdbarch (struct gdbarch *newarch)
{
- struct pyuw_gdbarch_data_type *data =
- gdbarch_data (newarch, pyuw_gdbarch_data);
+ struct pyuw_gdbarch_data_type *data
+ = (struct pyuw_gdbarch_data_type *) gdbarch_data (newarch,
+ pyuw_gdbarch_data);
if (!data->unwinder_registered)
{
@@ -648,7 +649,7 @@ pyuw_on_new_gdbarch (struct gdbarch *newarch)
unwinder->stop_reason = default_frame_unwind_stop_reason;
unwinder->this_id = pyuw_this_id;
unwinder->prev_register = pyuw_prev_register;
- unwinder->unwind_data = (void *) newarch;
+ unwinder->unwind_data = (const struct frame_data *) newarch;
unwinder->sniffer = pyuw_sniffer;
unwinder->dealloc_cache = pyuw_dealloc_cache;
frame_unwind_prepend_unwinder (newarch, unwinder);
diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c
index 2e32f11..9a4d1ed 100644
--- a/gdb/python/py-utils.c
+++ b/gdb/python/py-utils.c
@@ -29,7 +29,7 @@
static void
py_decref (void *p)
{
- PyObject *py = p;
+ PyObject *py = (PyObject *) p;
Py_DECREF (py);
}
@@ -50,7 +50,7 @@ make_cleanup_py_decref (PyObject *py)
static void
py_xdecref (void *p)
{
- PyObject *py = p;
+ PyObject *py = (PyObject *) p;
Py_XDECREF (py);
}
@@ -420,7 +420,7 @@ PyObject *
gdb_py_generic_dict (PyObject *self, void *closure)
{
PyObject *result;
- PyTypeObject *type_obj = closure;
+ PyTypeObject *type_obj = (PyTypeObject *) closure;
char *raw_ptr;
raw_ptr = (char *) self + type_obj->tp_dictoffset;
diff --git a/gdb/python/py-xmethods.c b/gdb/python/py-xmethods.c
index 91e2691..f927fe9 100644
--- a/gdb/python/py-xmethods.c
+++ b/gdb/python/py-xmethods.c
@@ -54,7 +54,7 @@ void
gdbpy_free_xmethod_worker_data (const struct extension_language_defn *extlang,
void *data)
{
- struct gdbpy_worker_data *worker_data = data;
+ struct gdbpy_worker_data *worker_data = (struct gdbpy_worker_data *) data;
struct cleanup *cleanups;
gdb_assert (worker_data->worker != NULL && worker_data->this_type != NULL);
@@ -75,7 +75,8 @@ void *
gdbpy_clone_xmethod_worker_data (const struct extension_language_defn *extlang,
void *data)
{
- struct gdbpy_worker_data *worker_data = data, *new_data;
+ struct gdbpy_worker_data *worker_data
+ = (struct gdbpy_worker_data *) data, *new_data;
struct cleanup *cleanups;
gdb_assert (worker_data->worker != NULL && worker_data->this_type != NULL);
@@ -379,7 +380,8 @@ gdbpy_get_xmethod_arg_types (const struct extension_language_defn *extlang,
struct xmethod_worker *worker,
int *nargs, struct type ***arg_types)
{
- struct gdbpy_worker_data *worker_data = worker->data;
+ struct gdbpy_worker_data *worker_data
+ = (struct gdbpy_worker_data *) worker->data;
PyObject *py_worker = worker_data->worker;
PyObject *get_arg_types_method;
PyObject *py_argtype_list, *list_iter = NULL, *item;
@@ -513,7 +515,8 @@ gdbpy_get_xmethod_result_type (const struct extension_language_defn *extlang,
struct value **args, int nargs,
struct type **result_type_ptr)
{
- struct gdbpy_worker_data *worker_data = worker->data;
+ struct gdbpy_worker_data *worker_data
+ = (struct gdbpy_worker_data *) worker->data;
PyObject *py_worker = worker_data->worker;
PyObject *py_value_obj, *py_arg_tuple, *py_result_type;
PyObject *get_result_type_method;
@@ -616,7 +619,8 @@ gdbpy_invoke_xmethod (const struct extension_language_defn *extlang,
PyObject *py_value_obj, *py_arg_tuple, *py_result;
struct type *obj_type, *this_type;
struct value *res = NULL;
- struct gdbpy_worker_data *worker_data = worker->data;
+ struct gdbpy_worker_data *worker_data
+ = (struct gdbpy_worker_data *) worker->data;
PyObject *xmethod_worker = worker_data->worker;
cleanups = ensure_python_env (get_current_arch (), current_language);
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 2031c0c..1c2d5c6 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1458,7 +1458,7 @@ gdbpy_apply_type_printers (const struct extension_language_defn *extlang,
struct cleanup *cleanups;
PyObject *type_obj, *type_module = NULL, *func = NULL;
PyObject *result_obj = NULL;
- PyObject *printers_obj = ext_printers->py_type_printers;
+ PyObject *printers_obj = (PyObject *) ext_printers->py_type_printers;
char *result = NULL;
if (printers_obj == NULL)
@@ -1524,7 +1524,7 @@ gdbpy_free_type_printers (const struct extension_language_defn *extlang,
struct ext_lang_type_printers *ext_printers)
{
struct cleanup *cleanups;
- PyObject *printers = ext_printers->py_type_printers;
+ PyObject *printers = (PyObject *) ext_printers->py_type_printers;
if (printers == NULL)
return;
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index d14e6cf..a9eb7fe 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -160,9 +160,7 @@ record_btrace_enable_warn (struct thread_info *tp)
static void
record_btrace_disable_callback (void *arg)
{
- struct thread_info *tp;
-
- tp = arg;
+ struct thread_info *tp = (struct thread_info *) arg;
btrace_disable (tp);
}
@@ -1370,7 +1368,8 @@ static htab_t bfcache;
static hashval_t
bfcache_hash (const void *arg)
{
- const struct btrace_frame_cache *cache = arg;
+ const struct btrace_frame_cache *cache
+ = (const struct btrace_frame_cache *) arg;
return htab_hash_pointer (cache->frame);
}
@@ -1380,8 +1379,10 @@ bfcache_hash (const void *arg)
static int
bfcache_eq (const void *arg1, const void *arg2)
{
- const struct btrace_frame_cache *cache1 = arg1;
- const struct btrace_frame_cache *cache2 = arg2;
+ const struct btrace_frame_cache *cache1
+ = (const struct btrace_frame_cache *) arg1;
+ const struct btrace_frame_cache *cache2
+ = (const struct btrace_frame_cache *) arg2;
return cache1->frame == cache2->frame;
}
@@ -1420,7 +1421,7 @@ btrace_get_frame_function (struct frame_info *frame)
if (slot == NULL)
return NULL;
- cache = *slot;
+ cache = (const struct btrace_frame_cache *) *slot;
return cache->bfun;
}
@@ -1433,7 +1434,7 @@ record_btrace_frame_unwind_stop_reason (struct frame_info *this_frame,
const struct btrace_frame_cache *cache;
const struct btrace_function *bfun;
- cache = *this_cache;
+ cache = (const struct btrace_frame_cache *) *this_cache;
bfun = cache->bfun;
gdb_assert (bfun != NULL);
@@ -1453,7 +1454,7 @@ record_btrace_frame_this_id (struct frame_info *this_frame, void **this_cache,
const struct btrace_function *bfun;
CORE_ADDR code, special;
- cache = *this_cache;
+ cache = (const struct btrace_frame_cache *) *this_cache;
bfun = cache->bfun;
gdb_assert (bfun != NULL);
@@ -1492,7 +1493,7 @@ record_btrace_frame_prev_register (struct frame_info *this_frame,
throw_error (NOT_AVAILABLE_ERROR,
_("Registers are not available in btrace record history"));
- cache = *this_cache;
+ cache = (const struct btrace_frame_cache *) *this_cache;
bfun = cache->bfun;
gdb_assert (bfun != NULL);
@@ -1615,7 +1616,7 @@ record_btrace_frame_dealloc_cache (struct frame_info *self, void *this_cache)
struct btrace_frame_cache *cache;
void **slot;
- cache = this_cache;
+ cache = (struct btrace_frame_cache *) this_cache;
slot = htab_find_slot (bfcache, cache, NO_INSERT);
gdb_assert (slot != NULL);
diff --git a/gdb/record-full.c b/gdb/record-full.c
index e2a36cf..cd47dfa 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -651,7 +651,8 @@ struct record_full_message_args {
static int
record_full_message_wrapper (void *args)
{
- struct record_full_message_args *record_full_args = args;
+ struct record_full_message_args *record_full_args
+ = (struct record_full_message_args *) args;
return record_full_message (record_full_args->regcache,
record_full_args->signal);
@@ -2521,7 +2522,7 @@ cmd_record_full_restore (char *args, int from_tty)
static void
record_full_save_cleanups (void *data)
{
- bfd *obfd = data;
+ bfd *obfd = (bfd *) data;
char *pathname = xstrdup (bfd_get_filename (obfd));
gdb_bfd_unref (obfd);
diff --git a/gdb/regcache.c b/gdb/regcache.c
index c78c142..41c7aca 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -147,7 +147,8 @@ init_regcache_descr (struct gdbarch *gdbarch)
static struct regcache_descr *
regcache_descr (struct gdbarch *gdbarch)
{
- return gdbarch_data (gdbarch, regcache_descr_handle);
+ return (struct regcache_descr *) gdbarch_data (gdbarch,
+ regcache_descr_handle);
}
/* Utility functions returning useful register attributes stored in
@@ -256,7 +257,7 @@ regcache_xfree (struct regcache *regcache)
static void
do_regcache_xfree (void *data)
{
- regcache_xfree (data);
+ regcache_xfree ((struct regcache *) data);
}
struct cleanup *
@@ -276,7 +277,7 @@ struct register_to_invalidate
static void
do_regcache_invalidate (void *data)
{
- struct register_to_invalidate *reg = data;
+ struct register_to_invalidate *reg = (struct register_to_invalidate *) data;
regcache_invalidate (reg->regcache, reg->regnum);
}
@@ -386,7 +387,7 @@ regcache_restore (struct regcache *dst,
static enum register_status
do_cooked_read (void *src, int regnum, gdb_byte *buf)
{
- struct regcache *regcache = src;
+ struct regcache *regcache = (struct regcache *) src;
return regcache_cooked_read (regcache, regnum, buf);
}
@@ -1095,7 +1096,9 @@ regcache_transfer_regset (const struct regset *regset,
const struct regcache_map_entry *map;
int offs = 0, count;
- for (map = regset->regmap; (count = map->count) != 0; map++)
+ for (map = (const struct regcache_map_entry *) regset->regmap;
+ (count = map->count) != 0;
+ map++)
{
int regno = map->regno;
int slot_size = map->size;
diff --git a/gdb/reggroups.c b/gdb/reggroups.c
index 745c5ea..fd32463 100644
--- a/gdb/reggroups.c
+++ b/gdb/reggroups.c
@@ -102,13 +102,14 @@ add_group (struct reggroups *groups, struct reggroup *group,
void
reggroup_add (struct gdbarch *gdbarch, struct reggroup *group)
{
- struct reggroups *groups = gdbarch_data (gdbarch, reggroups_data);
+ struct reggroups *groups
+ = (struct reggroups *) gdbarch_data (gdbarch, reggroups_data);
if (groups == NULL)
{
/* ULGH, called during architecture initialization. Patch
things up. */
- groups = reggroups_init (gdbarch);
+ groups = (struct reggroups *) reggroups_init (gdbarch);
deprecated_set_gdbarch_data (gdbarch, reggroups_data, groups);
}
add_group (groups, group,
@@ -129,7 +130,7 @@ reggroup_next (struct gdbarch *gdbarch, struct reggroup *last)
/* Don't allow this function to be called during architecture
creation. If there are no groups, use the default groups list. */
- groups = gdbarch_data (gdbarch, reggroups_data);
+ groups = (struct reggroups *) gdbarch_data (gdbarch, reggroups_data);
gdb_assert (groups != NULL);
if (groups->first == NULL)
groups = &default_groups;
@@ -161,7 +162,7 @@ reggroup_prev (struct gdbarch *gdbarch, struct reggroup *curr)
/* Don't allow this function to be called during architecture
creation. If there are no groups, use the default groups list. */
- groups = gdbarch_data (gdbarch, reggroups_data);
+ groups = (struct reggroups *) gdbarch_data (gdbarch, reggroups_data);
gdb_assert (groups != NULL);
if (groups->first == NULL)
groups = &default_groups;
diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c
index d84b3ff..8bad485 100644
--- a/gdb/remote-fileio.c
+++ b/gdb/remote-fileio.c
@@ -1185,7 +1185,7 @@ static struct {
static int
do_remote_fileio_request (struct ui_out *uiout, void *buf_arg)
{
- char *buf = buf_arg;
+ char *buf = (char *) buf_arg;
char *c;
int idx;
diff --git a/gdb/remote-notif.c b/gdb/remote-notif.c
index 3241e78..a8a6285 100644
--- a/gdb/remote-notif.c
+++ b/gdb/remote-notif.c
@@ -117,7 +117,7 @@ static void
remote_async_get_pending_events_handler (gdb_client_data data)
{
gdb_assert (non_stop);
- remote_notif_process (data, NULL);
+ remote_notif_process ((struct remote_notif_state *) data, NULL);
}
/* Remote notification handler. Parse BUF, queue notification and
@@ -230,7 +230,7 @@ notif_event_xfree (struct notif_event *event)
static void
do_notif_event_xfree (void *arg)
{
- notif_event_xfree (arg);
+ notif_event_xfree ((struct notif_event *) arg);
}
/* Return an allocated remote_notif_state. */
diff --git a/gdb/remote.c b/gdb/remote.c
index 11be6bb..ea6ff6b 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -616,7 +616,8 @@ static struct remote_arch_state *
get_remote_arch_state (void)
{
gdb_assert (target_gdbarch () != NULL);
- return gdbarch_data (target_gdbarch (), remote_gdbarch_data_handle);
+ return ((struct remote_arch_state *)
+ gdbarch_data (target_gdbarch (), remote_gdbarch_data_handle));
}
/* Fetch the global remote target state. */
@@ -639,7 +640,7 @@ get_remote_state (void)
static void
remote_pspace_data_cleanup (struct program_space *pspace, void *arg)
{
- char *remote_exec_file = arg;
+ char *remote_exec_file = (char *) arg;
xfree (remote_exec_file);
}
@@ -651,8 +652,9 @@ get_remote_exec_file (void)
{
char *remote_exec_file;
- remote_exec_file = program_space_data (current_program_space,
- remote_pspace_data);
+ remote_exec_file
+ = (char *) program_space_data (current_program_space,
+ remote_pspace_data);
if (remote_exec_file == NULL)
return "";
@@ -665,7 +667,7 @@ static void
set_pspace_remote_exec_file (struct program_space *pspace,
char *remote_exec_file)
{
- char *old_file = program_space_data (pspace, remote_pspace_data);
+ char *old_file = (char *) program_space_data (pspace, remote_pspace_data);
xfree (old_file);
set_program_space_data (pspace, remote_pspace_data,
@@ -694,8 +696,10 @@ show_remote_exec_file (struct ui_file *file, int from_tty,
static int
compare_pnums (const void *lhs_, const void *rhs_)
{
- const struct packet_reg * const *lhs = lhs_;
- const struct packet_reg * const *rhs = rhs_;
+ const struct packet_reg * const *lhs
+ = (const struct packet_reg * const *) lhs_;
+ const struct packet_reg * const *rhs
+ = (const struct packet_reg * const *) rhs_;
if ((*lhs)->pnum < (*rhs)->pnum)
return -1;
@@ -2837,7 +2841,8 @@ struct threads_listing_context
static void
clear_threads_listing_context (void *p)
{
- struct threads_listing_context *context = p;
+ struct threads_listing_context *context
+ = (struct threads_listing_context *) p;
int i;
struct thread_item *item;
@@ -2871,7 +2876,8 @@ threads_listing_context_remove (struct target_waitstatus *ws,
static int
remote_newthread_step (threadref *ref, void *data)
{
- struct threads_listing_context *context = data;
+ struct threads_listing_context *context
+ = (struct threads_listing_context *) data;
struct thread_item item;
int pid = ptid_get_pid (inferior_ptid);
@@ -2929,13 +2935,14 @@ start_thread (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct threads_listing_context *data = user_data;
+ struct threads_listing_context *data
+ = (struct threads_listing_context *) user_data;
struct thread_item item;
char *id;
struct gdb_xml_value *attr;
- id = xml_find_attribute (attributes, "id")->value;
+ id = (char *) xml_find_attribute (attributes, "id")->value;
item.ptid = read_ptid (id, NULL);
attr = xml_find_attribute (attributes, "core");
@@ -2954,7 +2961,8 @@ end_thread (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct threads_listing_context *data = user_data;
+ struct threads_listing_context *data
+ = (struct threads_listing_context *) user_data;
if (body_text && *body_text)
VEC_last (thread_item_t, data->items)->extra = xstrdup (body_text);
@@ -5837,8 +5845,9 @@ remove_child_of_pending_fork (QUEUE (stop_reply_p) *q,
stop_reply_p event,
void *data)
{
- struct queue_iter_param *param = data;
- struct threads_listing_context *context = param->input;
+ struct queue_iter_param *param = (struct queue_iter_param *) data;
+ struct threads_listing_context *context
+ = (struct threads_listing_context *) param->input;
if (event->ws.kind == TARGET_WAITKIND_FORKED
|| event->ws.kind == TARGET_WAITKIND_VFORKED)
@@ -5894,8 +5903,8 @@ remove_stop_reply_for_inferior (QUEUE (stop_reply_p) *q,
stop_reply_p event,
void *data)
{
- struct queue_iter_param *param = data;
- struct inferior *inf = param->input;
+ struct queue_iter_param *param = (struct queue_iter_param *) data;
+ struct inferior *inf = (struct inferior *) param->input;
if (ptid_get_pid (event->ptid) == inf->pid)
{
@@ -5948,8 +5957,8 @@ remove_stop_reply_of_remote_state (QUEUE (stop_reply_p) *q,
stop_reply_p event,
void *data)
{
- struct queue_iter_param *param = data;
- struct remote_state *rs = param->input;
+ struct queue_iter_param *param = (struct queue_iter_param *) data;
+ struct remote_state *rs = (struct remote_state *) param->input;
if (event->rs == rs)
{
@@ -5983,8 +5992,8 @@ remote_notif_remove_once_on_match (QUEUE (stop_reply_p) *q,
stop_reply_p event,
void *data)
{
- struct queue_iter_param *param = data;
- ptid_t *ptid = param->input;
+ struct queue_iter_param *param = (struct queue_iter_param *) data;
+ ptid_t *ptid = (ptid_t *) param->input;
if (ptid_match (event->ptid, *ptid))
{
@@ -6059,7 +6068,7 @@ stop_reply_match_ptid_and_ws (QUEUE (stop_reply_p) *q,
struct stop_reply *event,
void *data)
{
- ptid_t *ptid = data;
+ ptid_t *ptid = (ptid_t *) data;
return !(ptid_equal (*ptid, event->ptid)
&& event->ws.kind == TARGET_WAITKIND_STOPPED);
@@ -8504,7 +8513,7 @@ kill_child_of_pending_fork (QUEUE (stop_reply_p) *q,
stop_reply_p event,
void *data)
{
- struct queue_iter_param *param = data;
+ struct queue_iter_param *param = (struct queue_iter_param *) data;
int parent_pid = *(int *) param->input;
if (is_pending_fork_parent (&event->ws, parent_pid, event->ptid))
@@ -10356,7 +10365,8 @@ register_remote_g_packet_guess (struct gdbarch *gdbarch, int bytes,
const struct target_desc *tdesc)
{
struct remote_g_packet_data *data
- = gdbarch_data (gdbarch, remote_g_packet_data_handle);
+ = ((struct remote_g_packet_data *)
+ gdbarch_data (gdbarch, remote_g_packet_data_handle));
struct remote_g_packet_guess new_guess, *guess;
int ix;
@@ -10382,7 +10392,8 @@ static int
remote_read_description_p (struct target_ops *target)
{
struct remote_g_packet_data *data
- = gdbarch_data (target_gdbarch (), remote_g_packet_data_handle);
+ = ((struct remote_g_packet_data *)
+ gdbarch_data (target_gdbarch (), remote_g_packet_data_handle));
if (!VEC_empty (remote_g_packet_guess_s, data->guesses))
return 1;
@@ -10394,7 +10405,8 @@ static const struct target_desc *
remote_read_description (struct target_ops *target)
{
struct remote_g_packet_data *data
- = gdbarch_data (target_gdbarch (), remote_g_packet_data_handle);
+ = ((struct remote_g_packet_data *)
+ gdbarch_data (target_gdbarch (), remote_g_packet_data_handle));
/* Do not try this during initial connection, when we do not know
whether there is a running but stopped thread. */
@@ -11458,7 +11470,7 @@ static void free_actions_list_cleanup_wrapper (void *);
static void
free_actions_list_cleanup_wrapper (void *al)
{
- free_actions_list (al);
+ free_actions_list ((char **) al);
}
static void
@@ -12898,7 +12910,7 @@ static serial_event_ftype remote_async_serial_handler;
static void
remote_async_serial_handler (struct serial *scb, void *context)
{
- struct remote_state *rs = context;
+ struct remote_state *rs = (struct remote_state *) context;
/* Don't propogate error information up to the client. Instead let
the client find out about the error by querying the target. */
diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c
index 0f8790f..c97e7c8 100644
--- a/gdb/rl78-tdep.c
+++ b/gdb/rl78-tdep.c
@@ -851,7 +851,8 @@ opc_reg_to_gdb_regnum (int opcreg)
static int
rl78_get_opcode_byte (void *handle)
{
- struct rl78_get_opcode_byte_handle *opcdata = handle;
+ struct rl78_get_opcode_byte_handle *opcdata
+ = (struct rl78_get_opcode_byte_handle *) handle;
int status;
gdb_byte byte;
@@ -1104,10 +1105,11 @@ rl78_analyze_frame_prologue (struct frame_info *this_frame,
if (!func_start)
stop_addr = func_start;
- rl78_analyze_prologue (func_start, stop_addr, *this_prologue_cache);
+ rl78_analyze_prologue (func_start, stop_addr,
+ (struct rl78_prologue *) *this_prologue_cache);
}
- return *this_prologue_cache;
+ return (struct rl78_prologue *) *this_prologue_cache;
}
/* Given a frame and a prologue cache, return this frame's base. */
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 14f121a..b37e862 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -507,7 +507,8 @@ ppc_supply_gregset (const struct regset *regset, struct regcache *regcache,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- const struct ppc_reg_offsets *offsets = regset->regmap;
+ const struct ppc_reg_offsets *offsets
+ = (const struct ppc_reg_offsets *) regset->regmap;
size_t offset;
int regsize;
@@ -519,27 +520,31 @@ ppc_supply_gregset (const struct regset *regset, struct regcache *regcache,
for (i = tdep->ppc_gp0_regnum, offset = offsets->r0_offset;
i < tdep->ppc_gp0_regnum + ppc_num_gprs;
i++, offset += gpr_size)
- ppc_supply_reg (regcache, i, gregs, offset, gpr_size);
+ ppc_supply_reg (regcache, i, (const gdb_byte *) gregs, offset,
+ gpr_size);
ppc_supply_reg (regcache, gdbarch_pc_regnum (gdbarch),
- gregs, offsets->pc_offset, gpr_size);
+ (const gdb_byte *) gregs, offsets->pc_offset, gpr_size);
ppc_supply_reg (regcache, tdep->ppc_ps_regnum,
- gregs, offsets->ps_offset, gpr_size);
+ (const gdb_byte *) gregs, offsets->ps_offset, gpr_size);
ppc_supply_reg (regcache, tdep->ppc_lr_regnum,
- gregs, offsets->lr_offset, gpr_size);
+ (const gdb_byte *) gregs, offsets->lr_offset, gpr_size);
ppc_supply_reg (regcache, tdep->ppc_ctr_regnum,
- gregs, offsets->ctr_offset, gpr_size);
+ (const gdb_byte *) gregs, offsets->ctr_offset, gpr_size);
ppc_supply_reg (regcache, tdep->ppc_cr_regnum,
- gregs, offsets->cr_offset, offsets->xr_size);
+ (const gdb_byte *) gregs, offsets->cr_offset,
+ offsets->xr_size);
ppc_supply_reg (regcache, tdep->ppc_xer_regnum,
- gregs, offsets->xer_offset, offsets->xr_size);
+ (const gdb_byte *) gregs, offsets->xer_offset,
+ offsets->xr_size);
ppc_supply_reg (regcache, tdep->ppc_mq_regnum,
- gregs, offsets->mq_offset, offsets->xr_size);
+ (const gdb_byte *) gregs, offsets->mq_offset,
+ offsets->xr_size);
return;
}
offset = ppc_greg_offset (gdbarch, tdep, offsets, regnum, ®size);
- ppc_supply_reg (regcache, regnum, gregs, offset, regsize);
+ ppc_supply_reg (regcache, regnum, (const gdb_byte *) gregs, offset, regsize);
}
/* Supply register REGNUM in the floating-point register set REGSET
@@ -559,7 +564,7 @@ ppc_supply_fpregset (const struct regset *regset, struct regcache *regcache,
return;
tdep = gdbarch_tdep (gdbarch);
- offsets = regset->regmap;
+ offsets = (const struct ppc_reg_offsets *) regset->regmap;
if (regnum == -1)
{
int i;
@@ -567,15 +572,16 @@ ppc_supply_fpregset (const struct regset *regset, struct regcache *regcache,
for (i = tdep->ppc_fp0_regnum, offset = offsets->f0_offset;
i < tdep->ppc_fp0_regnum + ppc_num_fprs;
i++, offset += 8)
- ppc_supply_reg (regcache, i, fpregs, offset, 8);
+ ppc_supply_reg (regcache, i, (const gdb_byte *) fpregs, offset, 8);
ppc_supply_reg (regcache, tdep->ppc_fpscr_regnum,
- fpregs, offsets->fpscr_offset, offsets->fpscr_size);
+ (const gdb_byte *) fpregs, offsets->fpscr_offset,
+ offsets->fpscr_size);
return;
}
offset = ppc_fpreg_offset (tdep, offsets, regnum);
- ppc_supply_reg (regcache, regnum, fpregs, offset,
+ ppc_supply_reg (regcache, regnum, (const gdb_byte *) fpregs, offset,
regnum == tdep->ppc_fpscr_regnum ? offsets->fpscr_size : 8);
}
@@ -602,12 +608,12 @@ ppc_supply_vsxregset (const struct regset *regset, struct regcache *regcache,
for (i = tdep->ppc_vsr0_upper_regnum;
i < tdep->ppc_vsr0_upper_regnum + 32;
i++)
- ppc_supply_reg (regcache, i, vsxregs, 0, 8);
+ ppc_supply_reg (regcache, i, (const gdb_byte *) vsxregs, 0, 8);
return;
}
else
- ppc_supply_reg (regcache, regnum, vsxregs, 0, 8);
+ ppc_supply_reg (regcache, regnum, (const gdb_byte *) vsxregs, 0, 8);
}
/* Supply register REGNUM in the Altivec register set REGSET
@@ -627,7 +633,7 @@ ppc_supply_vrregset (const struct regset *regset, struct regcache *regcache,
return;
tdep = gdbarch_tdep (gdbarch);
- offsets = regset->regmap;
+ offsets = (const struct ppc_reg_offsets *) regset->regmap;
if (regnum == -1)
{
int i;
@@ -635,23 +641,23 @@ ppc_supply_vrregset (const struct regset *regset, struct regcache *regcache,
for (i = tdep->ppc_vr0_regnum, offset = offsets->vr0_offset;
i < tdep->ppc_vr0_regnum + ppc_num_vrs;
i++, offset += 16)
- ppc_supply_reg (regcache, i, vrregs, offset, 16);
+ ppc_supply_reg (regcache, i, (const gdb_byte *) vrregs, offset, 16);
ppc_supply_reg (regcache, (tdep->ppc_vrsave_regnum - 1),
- vrregs, offsets->vscr_offset, 4);
+ (const gdb_byte *) vrregs, offsets->vscr_offset, 4);
ppc_supply_reg (regcache, tdep->ppc_vrsave_regnum,
- vrregs, offsets->vrsave_offset, 4);
+ (const gdb_byte *) vrregs, offsets->vrsave_offset, 4);
return;
}
offset = ppc_vrreg_offset (tdep, offsets, regnum);
if (regnum != tdep->ppc_vrsave_regnum
&& regnum != tdep->ppc_vrsave_regnum - 1)
- ppc_supply_reg (regcache, regnum, vrregs, offset, 16);
+ ppc_supply_reg (regcache, regnum, (const gdb_byte *) vrregs, offset, 16);
else
ppc_supply_reg (regcache, regnum,
- vrregs, offset, 4);
+ (const gdb_byte *) vrregs, offset, 4);
}
/* Collect register REGNUM in the general-purpose register set
@@ -666,7 +672,8 @@ ppc_collect_gregset (const struct regset *regset,
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- const struct ppc_reg_offsets *offsets = regset->regmap;
+ const struct ppc_reg_offsets *offsets
+ = (const struct ppc_reg_offsets *) regset->regmap;
size_t offset;
int regsize;
@@ -678,27 +685,30 @@ ppc_collect_gregset (const struct regset *regset,
for (i = tdep->ppc_gp0_regnum, offset = offsets->r0_offset;
i < tdep->ppc_gp0_regnum + ppc_num_gprs;
i++, offset += gpr_size)
- ppc_collect_reg (regcache, i, gregs, offset, gpr_size);
+ ppc_collect_reg (regcache, i, (gdb_byte *) gregs, offset, gpr_size);
ppc_collect_reg (regcache, gdbarch_pc_regnum (gdbarch),
- gregs, offsets->pc_offset, gpr_size);
+ (gdb_byte *) gregs, offsets->pc_offset, gpr_size);
ppc_collect_reg (regcache, tdep->ppc_ps_regnum,
- gregs, offsets->ps_offset, gpr_size);
+ (gdb_byte *) gregs, offsets->ps_offset, gpr_size);
ppc_collect_reg (regcache, tdep->ppc_lr_regnum,
- gregs, offsets->lr_offset, gpr_size);
+ (gdb_byte *) gregs, offsets->lr_offset, gpr_size);
ppc_collect_reg (regcache, tdep->ppc_ctr_regnum,
- gregs, offsets->ctr_offset, gpr_size);
+ (gdb_byte *) gregs, offsets->ctr_offset, gpr_size);
ppc_collect_reg (regcache, tdep->ppc_cr_regnum,
- gregs, offsets->cr_offset, offsets->xr_size);
+ (gdb_byte *) gregs, offsets->cr_offset,
+ offsets->xr_size);
ppc_collect_reg (regcache, tdep->ppc_xer_regnum,
- gregs, offsets->xer_offset, offsets->xr_size);
+ (gdb_byte *) gregs, offsets->xer_offset,
+ offsets->xr_size);
ppc_collect_reg (regcache, tdep->ppc_mq_regnum,
- gregs, offsets->mq_offset, offsets->xr_size);
+ (gdb_byte *) gregs, offsets->mq_offset,
+ offsets->xr_size);
return;
}
offset = ppc_greg_offset (gdbarch, tdep, offsets, regnum, ®size);
- ppc_collect_reg (regcache, regnum, gregs, offset, regsize);
+ ppc_collect_reg (regcache, regnum, (gdb_byte *) gregs, offset, regsize);
}
/* Collect register REGNUM in the floating-point register set
@@ -720,7 +730,7 @@ ppc_collect_fpregset (const struct regset *regset,
return;
tdep = gdbarch_tdep (gdbarch);
- offsets = regset->regmap;
+ offsets = (const struct ppc_reg_offsets *) regset->regmap;
if (regnum == -1)
{
int i;
@@ -728,15 +738,16 @@ ppc_collect_fpregset (const struct regset *regset,
for (i = tdep->ppc_fp0_regnum, offset = offsets->f0_offset;
i < tdep->ppc_fp0_regnum + ppc_num_fprs;
i++, offset += 8)
- ppc_collect_reg (regcache, i, fpregs, offset, 8);
+ ppc_collect_reg (regcache, i, (gdb_byte *) fpregs, offset, 8);
ppc_collect_reg (regcache, tdep->ppc_fpscr_regnum,
- fpregs, offsets->fpscr_offset, offsets->fpscr_size);
+ (gdb_byte *) fpregs, offsets->fpscr_offset,
+ offsets->fpscr_size);
return;
}
offset = ppc_fpreg_offset (tdep, offsets, regnum);
- ppc_collect_reg (regcache, regnum, fpregs, offset,
+ ppc_collect_reg (regcache, regnum, (gdb_byte *) fpregs, offset,
regnum == tdep->ppc_fpscr_regnum ? offsets->fpscr_size : 8);
}
@@ -765,12 +776,12 @@ ppc_collect_vsxregset (const struct regset *regset,
for (i = tdep->ppc_vsr0_upper_regnum;
i < tdep->ppc_vsr0_upper_regnum + 32;
i++)
- ppc_collect_reg (regcache, i, vsxregs, 0, 8);
+ ppc_collect_reg (regcache, i, (gdb_byte *) vsxregs, 0, 8);
return;
}
else
- ppc_collect_reg (regcache, regnum, vsxregs, 0, 8);
+ ppc_collect_reg (regcache, regnum, (gdb_byte *) vsxregs, 0, 8);
}
@@ -793,7 +804,7 @@ ppc_collect_vrregset (const struct regset *regset,
return;
tdep = gdbarch_tdep (gdbarch);
- offsets = regset->regmap;
+ offsets = (const struct ppc_reg_offsets *) regset->regmap;
if (regnum == -1)
{
int i;
@@ -801,23 +812,23 @@ ppc_collect_vrregset (const struct regset *regset,
for (i = tdep->ppc_vr0_regnum, offset = offsets->vr0_offset;
i < tdep->ppc_vr0_regnum + ppc_num_vrs;
i++, offset += 16)
- ppc_collect_reg (regcache, i, vrregs, offset, 16);
+ ppc_collect_reg (regcache, i, (gdb_byte *) vrregs, offset, 16);
ppc_collect_reg (regcache, (tdep->ppc_vrsave_regnum - 1),
- vrregs, offsets->vscr_offset, 4);
+ (gdb_byte *) vrregs, offsets->vscr_offset, 4);
ppc_collect_reg (regcache, tdep->ppc_vrsave_regnum,
- vrregs, offsets->vrsave_offset, 4);
+ (gdb_byte *) vrregs, offsets->vrsave_offset, 4);
return;
}
offset = ppc_vrreg_offset (tdep, offsets, regnum);
if (regnum != tdep->ppc_vrsave_regnum
&& regnum != tdep->ppc_vrsave_regnum - 1)
- ppc_collect_reg (regcache, regnum, vrregs, offset, 16);
+ ppc_collect_reg (regcache, regnum, (gdb_byte *) vrregs, offset, 16);
else
ppc_collect_reg (regcache, regnum,
- vrregs, offset, 4);
+ (gdb_byte *) vrregs, offset, 4);
}
\f
@@ -2652,7 +2663,7 @@ e500_move_ev_register (move_ev_register_func move,
struct gdbarch *arch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (arch);
int reg_index;
- gdb_byte *byte_buffer = buffer;
+ gdb_byte *byte_buffer = (gdb_byte *) buffer;
enum register_status status;
gdb_assert (IS_SPE_PSEUDOREG (tdep, ev_reg));
@@ -2681,13 +2692,13 @@ e500_move_ev_register (move_ev_register_func move,
static enum register_status
do_regcache_raw_read (struct regcache *regcache, int regnum, void *buffer)
{
- return regcache_raw_read (regcache, regnum, buffer);
+ return regcache_raw_read (regcache, regnum, (gdb_byte *) buffer);
}
static enum register_status
do_regcache_raw_write (struct regcache *regcache, int regnum, void *buffer)
{
- regcache_raw_write (regcache, regnum, buffer);
+ regcache_raw_write (regcache, regnum, (const gdb_byte *) buffer);
return REG_VALID;
}
@@ -3194,7 +3205,7 @@ rs6000_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR func, pc;
if ((*this_cache) != NULL)
- return (*this_cache);
+ return (struct rs6000_frame_cache *) (*this_cache);
cache = FRAME_OBSTACK_ZALLOC (struct rs6000_frame_cache);
(*this_cache) = cache;
cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -3406,7 +3417,7 @@ rs6000_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache)
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (*this_cache)
- return *this_cache;
+ return (struct rs6000_frame_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct rs6000_frame_cache);
(*this_cache) = cache;
@@ -5982,7 +5993,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Hook in ABI-specific overrides, if they have been registered. */
info.target_desc = tdesc;
- info.tdep_info = (void *) tdesc_data;
+ info.tdep_info = (struct gdbarch_tdep_info *) tdesc_data;
gdbarch_init_osabi (info, gdbarch);
switch (info.osabi)
diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c
index abafa8d..a95c6d3 100644
--- a/gdb/rx-tdep.c
+++ b/gdb/rx-tdep.c
@@ -200,7 +200,8 @@ struct rx_get_opcode_byte_handle
static int
rx_get_opcode_byte (void *handle)
{
- struct rx_get_opcode_byte_handle *opcdata = handle;
+ struct rx_get_opcode_byte_handle *opcdata
+ = (struct rx_get_opcode_byte_handle *) handle;
int status;
gdb_byte byte;
@@ -445,10 +446,10 @@ rx_analyze_frame_prologue (struct frame_info *this_frame,
stop_addr = func_start;
rx_analyze_prologue (func_start, stop_addr, frame_type,
- *this_prologue_cache);
+ (struct rx_prologue *) *this_prologue_cache);
}
- return *this_prologue_cache;
+ return (struct rx_prologue *) *this_prologue_cache;
}
/* Determine type of frame by scanning the function for a return
@@ -469,7 +470,7 @@ rx_frame_type (struct frame_info *this_frame, void **this_cache)
if (*this_cache != NULL)
{
- struct rx_prologue *p = *this_cache;
+ struct rx_prologue *p = (struct rx_prologue *) *this_cache;
return p->frame_type;
}
@@ -643,7 +644,7 @@ rx_frame_sniffer_common (const struct frame_unwind *self,
}
else
{
- struct rx_prologue *p = *this_cache;
+ struct rx_prologue *p = (struct rx_prologue *) *this_cache;
return sniff_p (p->frame_type);
}
diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c
index 8d277ac..fcf93d7 100644
--- a/gdb/s390-linux-tdep.c
+++ b/gdb/s390-linux-tdep.c
@@ -1168,7 +1168,7 @@ static void
s390_check_for_saved (void *data_untyped, pv_t addr,
CORE_ADDR size, pv_t value)
{
- struct s390_prologue_data *data = data_untyped;
+ struct s390_prologue_data *data = (struct s390_prologue_data *) data_untyped;
int i, offset;
if (!pv_is_register (addr, S390_SP_REGNUM))
@@ -2081,7 +2081,7 @@ s390_frame_unwind_cache (struct frame_info *this_frame,
struct s390_unwind_cache *info;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct s390_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct s390_unwind_cache);
*this_prologue_cache = info;
@@ -2162,7 +2162,7 @@ s390_stub_frame_unwind_cache (struct frame_info *this_frame,
ULONGEST reg;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct s390_stub_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct s390_stub_unwind_cache);
*this_prologue_cache = info;
@@ -2246,7 +2246,7 @@ s390_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
int i;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct s390_sigtramp_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct s390_sigtramp_unwind_cache);
*this_prologue_cache = info;
diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c
index 09df712..7e56391 100644
--- a/gdb/score-tdep.c
+++ b/gdb/score-tdep.c
@@ -1322,7 +1322,7 @@ score_make_prologue_cache (struct frame_info *this_frame, void **this_cache)
struct score_frame_cache *cache;
if ((*this_cache) != NULL)
- return (*this_cache);
+ return (struct score_frame_cache *) (*this_cache);
cache = FRAME_OBSTACK_ZALLOC (struct score_frame_cache);
(*this_cache) = cache;
@@ -1338,15 +1338,17 @@ score_make_prologue_cache (struct frame_info *this_frame, void **this_cache)
return cache;
if (target_mach == bfd_mach_score3)
- score3_analyze_prologue (start_addr, pc, this_frame, *this_cache);
+ score3_analyze_prologue (start_addr, pc, this_frame,
+ (struct score_frame_cache *) *this_cache);
else
- score7_analyze_prologue (start_addr, pc, this_frame, *this_cache);
+ score7_analyze_prologue (start_addr, pc, this_frame,
+ (struct score_frame_cache *) *this_cache);
}
/* Save SP. */
trad_frame_set_value (cache->saved_regs, SCORE_SP_REGNUM, cache->base);
- return (*this_cache);
+ return (struct score_frame_cache *) (*this_cache);
}
static void
diff --git a/gdb/sentinel-frame.c b/gdb/sentinel-frame.c
index 1bb62f4..c616b54 100644
--- a/gdb/sentinel-frame.c
+++ b/gdb/sentinel-frame.c
@@ -46,7 +46,8 @@ sentinel_frame_prev_register (struct frame_info *this_frame,
void **this_prologue_cache,
int regnum)
{
- struct frame_unwind_cache *cache = *this_prologue_cache;
+ struct frame_unwind_cache *cache
+ = (struct frame_unwind_cache *) *this_prologue_cache;
struct value *value;
value = regcache_cooked_read_value (cache->regcache, regnum);
@@ -70,7 +71,8 @@ static struct gdbarch *
sentinel_frame_prev_arch (struct frame_info *this_frame,
void **this_prologue_cache)
{
- struct frame_unwind_cache *cache = *this_prologue_cache;
+ struct frame_unwind_cache *cache
+ = (struct frame_unwind_cache *) *this_prologue_cache;
return get_regcache_arch (cache->regcache);
}
diff --git a/gdb/ser-base.c b/gdb/ser-base.c
index 2f12125..a09fbde 100644
--- a/gdb/ser-base.c
+++ b/gdb/ser-base.c
@@ -153,7 +153,7 @@ run_async_handler_and_reschedule (struct serial *scb)
static void
fd_event (int error, void *context)
{
- struct serial *scb = context;
+ struct serial *scb = (struct serial *) context;
if (error != 0)
{
scb->bufcnt = SERIAL_ERROR;
@@ -190,7 +190,7 @@ fd_event (int error, void *context)
static void
push_event (void *context)
{
- struct serial *scb = context;
+ struct serial *scb = (struct serial *) context;
scb->async_state = NOTHING_SCHEDULED; /* Timers are one-off */
run_async_handler_and_reschedule (scb);
@@ -440,7 +440,7 @@ ser_base_readchar (struct serial *scb, int timeout)
int
ser_base_write (struct serial *scb, const void *buf, size_t count)
{
- const char *str = buf;
+ const char *str = (const char *) buf;
int cc;
while (count > 0)
diff --git a/gdb/ser-pipe.c b/gdb/ser-pipe.c
index 1e777b7..1696eb8 100644
--- a/gdb/ser-pipe.c
+++ b/gdb/ser-pipe.c
@@ -148,7 +148,7 @@ pipe_open (struct serial *scb, const char *name)
static void
pipe_close (struct serial *scb)
{
- struct pipe_state *state = scb->state;
+ struct pipe_state *state = (struct pipe_state *) scb->state;
close (scb->fd);
scb->fd = -1;
diff --git a/gdb/serial.c b/gdb/serial.c
index 74567db..abc050e 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -404,7 +404,7 @@ serial_write (struct serial *scb, const void *buf, size_t count)
{
if (serial_logfp != NULL)
{
- const char *str = buf;
+ const char *str = (const char *) buf;
size_t c;
for (c = 0; c < count; c++)
@@ -416,7 +416,7 @@ serial_write (struct serial *scb, const void *buf, size_t count)
}
if (serial_debug_p (scb))
{
- const char *str = buf;
+ const char *str = (const char *) buf;
size_t c;
for (c = 0; c < count; c++)
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 6f66f0e..46a1609 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -1857,7 +1857,7 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct sh_frame_cache *) *this_cache;
cache = sh_alloc_frame_cache ();
*this_cache = cache;
@@ -2021,7 +2021,7 @@ sh_stub_this_id (struct frame_info *this_frame, void **this_cache,
if (*this_cache == NULL)
*this_cache = sh_make_stub_cache (this_frame);
- cache = *this_cache;
+ cache = (struct sh_frame_cache *) *this_cache;
*this_id = frame_id_build (cache->saved_sp, get_frame_pc (this_frame));
}
diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c
index cb18a35..f76c845 100644
--- a/gdb/sh64-tdep.c
+++ b/gdb/sh64-tdep.c
@@ -2210,7 +2210,7 @@ sh64_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct sh64_frame_cache *) *this_cache;
gdbarch = get_frame_arch (this_frame);
cache = sh64_alloc_frame_cache ();
diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c
index a1e6b8e..0310e66 100644
--- a/gdb/solib-aix.c
+++ b/gdb/solib-aix.c
@@ -112,7 +112,8 @@ get_solib_aix_inferior_data (struct inferior *inf)
{
struct solib_aix_inferior_data *data;
- data = inferior_data (inf, solib_aix_inferior_data_handle);
+ data = ((struct solib_aix_inferior_data *)
+ inferior_data (inf, solib_aix_inferior_data_handle));
if (data == NULL)
{
data = XCNEW (struct solib_aix_inferior_data);
@@ -160,16 +161,16 @@ library_list_start_library (struct gdb_xml_parser *parser,
void *user_data,
VEC (gdb_xml_value_s) *attributes)
{
- VEC (lm_info_p) **list = user_data;
+ VEC (lm_info_p) **list = (VEC (lm_info_p) **) user_data;
struct lm_info *item = XCNEW (struct lm_info);
struct gdb_xml_value *attr;
attr = xml_find_attribute (attributes, "name");
- item->filename = xstrdup (attr->value);
+ item->filename = xstrdup ((const char *) attr->value);
attr = xml_find_attribute (attributes, "member");
if (attr != NULL)
- item->member_name = xstrdup (attr->value);
+ item->member_name = xstrdup ((const char *) attr->value);
attr = xml_find_attribute (attributes, "text_addr");
item->text_addr = * (ULONGEST *) attr->value;
@@ -193,7 +194,7 @@ library_list_start_list (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC (gdb_xml_value_s) *attributes)
{
- char *version = xml_find_attribute (attributes, "version")->value;
+ char *version = (char *) xml_find_attribute (attributes, "version")->value;
if (strcmp (version, "1.0") != 0)
gdb_xml_error (parser,
@@ -206,7 +207,7 @@ library_list_start_list (struct gdb_xml_parser *parser,
static void
solib_aix_free_library_list (void *p)
{
- VEC (lm_info_p) **result = p;
+ VEC (lm_info_p) **result = (VEC (lm_info_p) **) p;
struct lm_info *info;
int ix;
diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c
index 2a33cd7..876ca8c 100644
--- a/gdb/solib-darwin.c
+++ b/gdb/solib-darwin.c
@@ -96,7 +96,8 @@ get_darwin_info (void)
{
struct darwin_info *info;
- info = program_space_data (current_program_space, solib_darwin_pspace_data);
+ info = (struct darwin_info *) program_space_data (current_program_space,
+ solib_darwin_pspace_data);
if (info != NULL)
return info;
diff --git a/gdb/solib-dsbt.c b/gdb/solib-dsbt.c
index 102b41a..3218bbe 100644
--- a/gdb/solib-dsbt.c
+++ b/gdb/solib-dsbt.c
@@ -175,7 +175,8 @@ get_dsbt_info (void)
{
struct dsbt_info *info;
- info = program_space_data (current_program_space, solib_dsbt_pspace_data);
+ info = (struct dsbt_info *) program_space_data (current_program_space,
+ solib_dsbt_pspace_data);
if (info != NULL)
return info;
diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c
index 12ff49e..468ab1a 100644
--- a/gdb/solib-spu.c
+++ b/gdb/solib-spu.c
@@ -105,7 +105,8 @@ append_ocl_sos (struct so_list **link_ptr)
ALL_OBJFILES (objfile)
{
- ocl_program_addr_base = objfile_data (objfile, ocl_program_data_key);
+ ocl_program_addr_base
+ = (CORE_ADDR *) objfile_data (objfile, ocl_program_data_key);
if (ocl_program_addr_base != NULL)
{
enum bfd_endian byte_order = bfd_big_endian (objfile->obfd)?
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 04d797b..48dec25 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -405,7 +405,7 @@ free_solib_list (struct svr4_info *info)
static void
svr4_pspace_data_cleanup (struct program_space *pspace, void *arg)
{
- struct svr4_info *info = arg;
+ struct svr4_info *info = (struct svr4_info *) arg;
free_probes_table (info);
free_solib_list (info);
@@ -421,7 +421,8 @@ get_svr4_info (void)
{
struct svr4_info *info;
- info = program_space_data (current_program_space, solib_svr4_pspace_data);
+ info = (struct svr4_info *) program_space_data (current_program_space,
+ solib_svr4_pspace_data);
if (info != NULL)
return info;
@@ -1161,11 +1162,15 @@ library_list_start_library (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct svr4_library_list *list = user_data;
- const char *name = xml_find_attribute (attributes, "name")->value;
- ULONGEST *lmp = xml_find_attribute (attributes, "lm")->value;
- ULONGEST *l_addrp = xml_find_attribute (attributes, "l_addr")->value;
- ULONGEST *l_ldp = xml_find_attribute (attributes, "l_ld")->value;
+ struct svr4_library_list *list = (struct svr4_library_list *) user_data;
+ const char *name
+ = (const char *) xml_find_attribute (attributes, "name")->value;
+ ULONGEST *lmp
+ = (long unsigned int *) xml_find_attribute (attributes, "lm")->value;
+ ULONGEST *l_addrp
+ = (long unsigned int *) xml_find_attribute (attributes, "l_addr")->value;
+ ULONGEST *l_ldp
+ = (long unsigned int *) xml_find_attribute (attributes, "l_ld")->value;
struct so_list *new_elem;
new_elem = XCNEW (struct so_list);
@@ -1189,8 +1194,9 @@ svr4_library_list_start_list (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct svr4_library_list *list = user_data;
- const char *version = xml_find_attribute (attributes, "version")->value;
+ struct svr4_library_list *list = (struct svr4_library_list *) user_data;
+ const char *version
+ = (const char *) xml_find_attribute (attributes, "version")->value;
struct gdb_xml_value *main_lm = xml_find_attribute (attributes, "main-lm");
if (strcmp (version, "1.0") != 0)
@@ -1699,7 +1705,7 @@ struct probe_and_action
static hashval_t
hash_probe_and_action (const void *p)
{
- const struct probe_and_action *pa = p;
+ const struct probe_and_action *pa = (const struct probe_and_action *) p;
return (hashval_t) pa->address;
}
@@ -1710,8 +1716,8 @@ hash_probe_and_action (const void *p)
static int
equal_probe_and_action (const void *p1, const void *p2)
{
- const struct probe_and_action *pa1 = p1;
- const struct probe_and_action *pa2 = p2;
+ const struct probe_and_action *pa1 = (const struct probe_and_action *) p1;
+ const struct probe_and_action *pa2 = (const struct probe_and_action *) p2;
return pa1->address == pa2->address;
}
@@ -2055,7 +2061,8 @@ svr4_update_solib_event_breakpoint (struct breakpoint *b, void *arg)
struct svr4_info *info;
struct probe_and_action *pa;
- info = program_space_data (loc->pspace, solib_svr4_pspace_data);
+ info = ((struct svr4_info *)
+ program_space_data (loc->pspace, solib_svr4_pspace_data));
if (info == NULL || info->probes_table == NULL)
continue;
@@ -3176,7 +3183,8 @@ void
set_solib_svr4_fetch_link_map_offsets (struct gdbarch *gdbarch,
struct link_map_offsets *(*flmo) (void))
{
- struct solib_svr4_ops *ops = gdbarch_data (gdbarch, solib_svr4_data);
+ struct solib_svr4_ops *ops
+ = (struct solib_svr4_ops *) gdbarch_data (gdbarch, solib_svr4_data);
ops->fetch_link_map_offsets = flmo;
@@ -3189,7 +3197,9 @@ set_solib_svr4_fetch_link_map_offsets (struct gdbarch *gdbarch,
static struct link_map_offsets *
svr4_fetch_link_map_offsets (void)
{
- struct solib_svr4_ops *ops = gdbarch_data (target_gdbarch (), solib_svr4_data);
+ struct solib_svr4_ops *ops
+ = (struct solib_svr4_ops *) gdbarch_data (target_gdbarch (),
+ solib_svr4_data);
gdb_assert (ops->fetch_link_map_offsets);
return ops->fetch_link_map_offsets ();
@@ -3200,7 +3210,9 @@ svr4_fetch_link_map_offsets (void)
static int
svr4_have_link_map_offsets (void)
{
- struct solib_svr4_ops *ops = gdbarch_data (target_gdbarch (), solib_svr4_data);
+ struct solib_svr4_ops *ops
+ = (struct solib_svr4_ops *) gdbarch_data (target_gdbarch (),
+ solib_svr4_data);
return (ops->fetch_link_map_offsets != NULL);
}
diff --git a/gdb/solib-target.c b/gdb/solib-target.c
index a41560e..ef9599c 100644
--- a/gdb/solib-target.c
+++ b/gdb/solib-target.c
@@ -80,9 +80,10 @@ library_list_start_segment (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- VEC(lm_info_p) **list = user_data;
+ VEC(lm_info_p) **list = (VEC(lm_info_p) **) user_data;
struct lm_info *last = VEC_last (lm_info_p, *list);
- ULONGEST *address_p = xml_find_attribute (attributes, "address")->value;
+ ULONGEST *address_p
+ = (long unsigned int *) xml_find_attribute (attributes, "address")->value;
CORE_ADDR address = (CORE_ADDR) *address_p;
if (last->section_bases != NULL)
@@ -97,9 +98,10 @@ library_list_start_section (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- VEC(lm_info_p) **list = user_data;
+ VEC(lm_info_p) **list = (VEC(lm_info_p) **) user_data;
struct lm_info *last = VEC_last (lm_info_p, *list);
- ULONGEST *address_p = xml_find_attribute (attributes, "address")->value;
+ ULONGEST *address_p
+ = (long unsigned int *) xml_find_attribute (attributes, "address")->value;
CORE_ADDR address = (CORE_ADDR) *address_p;
if (last->segment_bases != NULL)
@@ -116,9 +118,10 @@ library_list_start_library (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- VEC(lm_info_p) **list = user_data;
+ VEC(lm_info_p) **list = (VEC(lm_info_p) **) user_data;
struct lm_info *item = XCNEW (struct lm_info);
- const char *name = xml_find_attribute (attributes, "name")->value;
+ const char *name
+ = (const char *) xml_find_attribute (attributes, "name")->value;
item->name = xstrdup (name);
VEC_safe_push (lm_info_p, *list, item);
@@ -129,7 +132,7 @@ library_list_end_library (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- VEC(lm_info_p) **list = user_data;
+ VEC(lm_info_p) **list = (VEC(lm_info_p) **) user_data;
struct lm_info *lm_info = VEC_last (lm_info_p, *list);
if (lm_info->segment_bases == NULL
@@ -151,7 +154,7 @@ library_list_start_list (struct gdb_xml_parser *parser,
/* #FIXED attribute may be omitted, Expat returns NULL in such case. */
if (version != NULL)
{
- const char *string = version->value;
+ const char *string = (const char *) version->value;
if (strcmp (string, "1.0") != 0)
gdb_xml_error (parser,
@@ -165,7 +168,7 @@ library_list_start_list (struct gdb_xml_parser *parser,
static void
solib_target_free_library_list (void *p)
{
- VEC(lm_info_p) **result = p;
+ VEC(lm_info_p) **result = (VEC(lm_info_p) **) p;
struct lm_info *info;
int ix;
diff --git a/gdb/solib.c b/gdb/solib.c
index d6ab93d..9a6e7de 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -65,7 +65,8 @@ solib_init (struct obstack *obstack)
static const struct target_so_ops *
solib_ops (struct gdbarch *gdbarch)
{
- const struct target_so_ops **ops = gdbarch_data (gdbarch, solib_data);
+ const struct target_so_ops **ops
+ = (const struct target_so_ops **) gdbarch_data (gdbarch, solib_data);
return *ops;
}
@@ -75,7 +76,8 @@ solib_ops (struct gdbarch *gdbarch)
void
set_solib_ops (struct gdbarch *gdbarch, const struct target_so_ops *new_ops)
{
- const struct target_so_ops **ops = gdbarch_data (gdbarch, solib_data);
+ const struct target_so_ops **ops
+ = (const struct target_so_ops **) gdbarch_data (gdbarch, solib_data);
*ops = new_ops;
}
diff --git a/gdb/sparc-sol2-tdep.c b/gdb/sparc-sol2-tdep.c
index 5afe308..03bd53a 100644
--- a/gdb/sparc-sol2-tdep.c
+++ b/gdb/sparc-sol2-tdep.c
@@ -132,7 +132,7 @@ sparc32_sol2_sigtramp_frame_cache (struct frame_info *this_frame,
int regnum;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 5c77784..b2bba26 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -1100,7 +1100,7 @@ sparc_frame_cache (struct frame_info *this_frame, void **this_cache)
struct sparc_frame_cache *cache;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_alloc_frame_cache ();
*this_cache = cache;
@@ -1158,7 +1158,7 @@ sparc32_frame_cache (struct frame_info *this_frame, void **this_cache)
struct symbol *sym;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
@@ -1895,7 +1895,7 @@ sparc32_supply_gregset (const struct sparc_gregmap *gregmap,
struct regcache *regcache,
int regnum, const void *gregs)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
gdb_byte zero[4] = { 0 };
int i;
@@ -1960,7 +1960,7 @@ sparc32_collect_gregset (const struct sparc_gregmap *gregmap,
const struct regcache *regcache,
int regnum, void *gregs)
{
- gdb_byte *regs = gregs;
+ gdb_byte *regs = (gdb_byte *) gregs;
int i;
if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
@@ -2015,7 +2015,7 @@ sparc32_supply_fpregset (const struct sparc_fpregmap *fpregmap,
struct regcache *regcache,
int regnum, const void *fpregs)
{
- const gdb_byte *regs = fpregs;
+ const gdb_byte *regs = (const gdb_byte *) fpregs;
int i;
for (i = 0; i < 32; i++)
@@ -2035,7 +2035,7 @@ sparc32_collect_fpregset (const struct sparc_fpregmap *fpregmap,
const struct regcache *regcache,
int regnum, void *fpregs)
{
- gdb_byte *regs = fpregs;
+ gdb_byte *regs = (gdb_byte *) fpregs;
int i;
for (i = 0; i < 32; i++)
diff --git a/gdb/sparc64-sol2-tdep.c b/gdb/sparc64-sol2-tdep.c
index 4e2baa6..a381e53 100644
--- a/gdb/sparc64-sol2-tdep.c
+++ b/gdb/sparc64-sol2-tdep.c
@@ -107,7 +107,7 @@ sparc64_sol2_sigtramp_frame_cache (struct frame_info *this_frame,
int regnum;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c
index 4978863..4c05277 100644
--- a/gdb/sparc64-tdep.c
+++ b/gdb/sparc64-tdep.c
@@ -1244,7 +1244,7 @@ sparc64_supply_gregset (const struct sparc_gregmap *gregmap,
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int sparc32 = (gdbarch_ptr_bit (gdbarch) == 32);
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
gdb_byte zero[8] = { 0 };
int i;
@@ -1361,7 +1361,7 @@ sparc64_collect_gregset (const struct sparc_gregmap *gregmap,
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int sparc32 = (gdbarch_ptr_bit (gdbarch) == 32);
- gdb_byte *regs = gregs;
+ gdb_byte *regs = (gdb_byte *) gregs;
int i;
if (sparc32)
@@ -1469,7 +1469,7 @@ sparc64_supply_fpregset (const struct sparc_fpregmap *fpregmap,
int regnum, const void *fpregs)
{
int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
- const gdb_byte *regs = fpregs;
+ const gdb_byte *regs = (const gdb_byte *) fpregs;
int i;
for (i = 0; i < 32; i++)
@@ -1507,7 +1507,7 @@ sparc64_collect_fpregset (const struct sparc_fpregmap *fpregmap,
int regnum, void *fpregs)
{
int sparc32 = (gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32);
- gdb_byte *regs = fpregs;
+ gdb_byte *regs = (gdb_byte *) fpregs;
int i;
for (i = 0; i < 32; i++)
diff --git a/gdb/sparc64fbsd-tdep.c b/gdb/sparc64fbsd-tdep.c
index c9f9041..ef84316 100644
--- a/gdb/sparc64fbsd-tdep.c
+++ b/gdb/sparc64fbsd-tdep.c
@@ -97,7 +97,7 @@ sparc64fbsd_sigtramp_frame_cache (struct frame_info *this_frame,
int regnum;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
diff --git a/gdb/sparc64nbsd-tdep.c b/gdb/sparc64nbsd-tdep.c
index 32da6ac..adde2a5 100644
--- a/gdb/sparc64nbsd-tdep.c
+++ b/gdb/sparc64nbsd-tdep.c
@@ -156,7 +156,7 @@ sparc64nbsd_sigcontext_frame_cache (struct frame_info *this_frame,
CORE_ADDR addr;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
diff --git a/gdb/sparc64obsd-tdep.c b/gdb/sparc64obsd-tdep.c
index 9d3bedc..aa9651e 100644
--- a/gdb/sparc64obsd-tdep.c
+++ b/gdb/sparc64obsd-tdep.c
@@ -155,7 +155,7 @@ sparc64obsd_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR addr;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
@@ -239,7 +239,7 @@ sparc64obsd_trapframe_cache (struct frame_info *this_frame, void **this_cache)
int regnum;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c
index c145919..29c699d 100644
--- a/gdb/sparcnbsd-tdep.c
+++ b/gdb/sparcnbsd-tdep.c
@@ -186,7 +186,7 @@ sparc32nbsd_sigcontext_frame_cache (struct frame_info *this_frame,
CORE_ADDR addr;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
diff --git a/gdb/sparcobsd-tdep.c b/gdb/sparcobsd-tdep.c
index 0796f99..792da7b 100644
--- a/gdb/sparcobsd-tdep.c
+++ b/gdb/sparcobsd-tdep.c
@@ -74,7 +74,7 @@ sparc32obsd_sigtramp_frame_cache (struct frame_info *this_frame,
CORE_ADDR addr;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
diff --git a/gdb/spu-multiarch.c b/gdb/spu-multiarch.c
index b07c4ff..c61b271 100644
--- a/gdb/spu-multiarch.c
+++ b/gdb/spu-multiarch.c
@@ -107,7 +107,7 @@ spu_gdbarch (int spufs_fd)
info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
info.byte_order = BFD_ENDIAN_BIG;
info.osabi = GDB_OSABI_LINUX;
- info.tdep_info = (void *) &spufs_fd;
+ info.tdep_info = (struct gdbarch_tdep_info *) &spufs_fd;
return gdbarch_find_by_info (info);
}
diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c
index 6e754a4..c94b46e 100644
--- a/gdb/spu-tdep.c
+++ b/gdb/spu-tdep.c
@@ -1000,7 +1000,7 @@ spu_frame_unwind_cache (struct frame_info *this_frame,
gdb_byte buf[16];
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct spu_unwind_cache *) *this_prologue_cache;
info = FRAME_OBSTACK_ZALLOC (struct spu_unwind_cache);
*this_prologue_cache = info;
@@ -1208,7 +1208,7 @@ struct spu2ppu_cache
static struct gdbarch *
spu2ppu_prev_arch (struct frame_info *this_frame, void **this_cache)
{
- struct spu2ppu_cache *cache = *this_cache;
+ struct spu2ppu_cache *cache = (struct spu2ppu_cache *) *this_cache;
return get_regcache_arch (cache->regcache);
}
@@ -1216,7 +1216,7 @@ static void
spu2ppu_this_id (struct frame_info *this_frame,
void **this_cache, struct frame_id *this_id)
{
- struct spu2ppu_cache *cache = *this_cache;
+ struct spu2ppu_cache *cache = (struct spu2ppu_cache *) *this_cache;
*this_id = cache->frame_id;
}
@@ -1224,7 +1224,7 @@ static struct value *
spu2ppu_prev_register (struct frame_info *this_frame,
void **this_cache, int regnum)
{
- struct spu2ppu_cache *cache = *this_cache;
+ struct spu2ppu_cache *cache = (struct spu2ppu_cache *) *this_cache;
struct gdbarch *gdbarch = get_regcache_arch (cache->regcache);
gdb_byte *buf;
@@ -1286,7 +1286,7 @@ spu2ppu_sniffer (const struct frame_unwind *self,
static void
spu2ppu_dealloc_cache (struct frame_info *self, void *this_cache)
{
- struct spu2ppu_cache *cache = this_cache;
+ struct spu2ppu_cache *cache = (struct spu2ppu_cache *) this_cache;
regcache_xfree (cache->regcache);
}
@@ -1725,8 +1725,10 @@ struct spu_dis_asm_data
static void
spu_dis_asm_print_address (bfd_vma addr, struct disassemble_info *info)
{
- struct spu_dis_asm_data *data = info->application_data;
- print_address (data->gdbarch, SPUADDR (data->id, addr), info->stream);
+ struct spu_dis_asm_data *data
+ = (struct spu_dis_asm_data *) info->application_data;
+ print_address (data->gdbarch, SPUADDR (data->id, addr),
+ (struct ui_file *) info->stream);
}
static int
@@ -1737,7 +1739,7 @@ gdb_print_insn_spu (bfd_vma memaddr, struct disassemble_info *info)
call print_address. */
struct disassemble_info spu_info = *info;
struct spu_dis_asm_data data;
- data.gdbarch = info->application_data;
+ data.gdbarch = (struct gdbarch *) info->application_data;
data.id = SPUADDR_SPU (memaddr);
spu_info.application_data = &data;
@@ -1808,7 +1810,7 @@ spu_get_overlay_table (struct objfile *objfile)
gdb_byte *ovly_table;
int i;
- tbl = objfile_data (objfile, spu_overlay_data);
+ tbl = (struct spu_overlay_table *) objfile_data (objfile, spu_overlay_data);
if (tbl)
return tbl;
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 650d424..e6eacd3 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -2057,8 +2057,8 @@ static const struct objfile_data *rs6000_builtin_type_data;
static struct type *
rs6000_builtin_type (int typenum, struct objfile *objfile)
{
- struct type **negative_types = objfile_data (objfile,
- rs6000_builtin_type_data);
+ struct type **negative_types
+ = (struct type **) objfile_data (objfile, rs6000_builtin_type_data);
/* We recognize types numbered from -NUMBER_RECOGNIZED to -1. */
#define NUMBER_RECOGNIZED 34
diff --git a/gdb/stack.c b/gdb/stack.c
index 2b7cc92..e6156a7 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -2059,7 +2059,8 @@ do_print_variable_and_value (const char *print_name,
struct symbol *sym,
void *cb_data)
{
- struct print_variable_and_value_data *p = cb_data;
+ struct print_variable_and_value_data *p
+ = (struct print_variable_and_value_data *) cb_data;
struct frame_info *frame;
frame = frame_find_by_id (p->frame_id);
diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index 691877f..d88c470 100644
--- a/gdb/stap-probe.c
+++ b/gdb/stap-probe.c
@@ -1550,7 +1550,7 @@ handle_stap_probe (struct objfile *objfile, struct sdt_note *el,
static void
get_stap_base_address_1 (bfd *abfd, asection *sect, void *obj)
{
- asection **ret = obj;
+ asection **ret = (asection **) obj;
if ((sect->flags & (SEC_DATA | SEC_ALLOC | SEC_HAS_CONTENTS))
&& sect->name && !strcmp (sect->name, STAP_BASE_SECTION_NAME))
diff --git a/gdb/symfile-debug.c b/gdb/symfile-debug.c
index 6a3351a..a4beb33 100644
--- a/gdb/symfile-debug.c
+++ b/gdb/symfile-debug.c
@@ -72,8 +72,9 @@ debug_symtab_name (struct symtab *symtab)
static int
debug_qf_has_symbols (struct objfile *objfile)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
int retval;
retval = debug_data->real_sf->qf->has_symbols (objfile);
@@ -87,8 +88,9 @@ debug_qf_has_symbols (struct objfile *objfile)
static struct symtab *
debug_qf_find_last_source_symtab (struct objfile *objfile)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
struct symtab *retval;
fprintf_filtered (gdb_stdlog, "qf->find_last_source_symtab (%s)\n",
@@ -105,8 +107,9 @@ debug_qf_find_last_source_symtab (struct objfile *objfile)
static void
debug_qf_forget_cached_source_info (struct objfile *objfile)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "qf->forget_cached_source_info (%s)\n",
objfile_debug_name (objfile));
@@ -122,8 +125,9 @@ debug_qf_map_symtabs_matching_filename (struct objfile *objfile,
void *),
void *data)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
int retval;
fprintf_filtered (gdb_stdlog,
@@ -147,8 +151,9 @@ static struct compunit_symtab *
debug_qf_lookup_symbol (struct objfile *objfile, int kind, const char *name,
domain_enum domain)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
struct compunit_symtab *retval;
fprintf_filtered (gdb_stdlog,
@@ -170,8 +175,9 @@ debug_qf_lookup_symbol (struct objfile *objfile, int kind, const char *name,
static void
debug_qf_print_stats (struct objfile *objfile)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "qf->print_stats (%s)\n",
objfile_debug_name (objfile));
@@ -182,8 +188,9 @@ debug_qf_print_stats (struct objfile *objfile)
static void
debug_qf_dump (struct objfile *objfile)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "qf->dump (%s)\n",
objfile_debug_name (objfile));
@@ -196,8 +203,9 @@ debug_qf_relocate (struct objfile *objfile,
const struct section_offsets *new_offsets,
const struct section_offsets *delta)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "qf->relocate (%s, %s, %s)\n",
objfile_debug_name (objfile),
@@ -211,8 +219,9 @@ static void
debug_qf_expand_symtabs_for_function (struct objfile *objfile,
const char *func_name)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog,
"qf->expand_symtabs_for_function (%s, \"%s\")\n",
@@ -224,8 +233,9 @@ debug_qf_expand_symtabs_for_function (struct objfile *objfile,
static void
debug_qf_expand_all_symtabs (struct objfile *objfile)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "qf->expand_all_symtabs (%s)\n",
objfile_debug_name (objfile));
@@ -237,8 +247,9 @@ static void
debug_qf_expand_symtabs_with_fullname (struct objfile *objfile,
const char *fullname)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog,
"qf->expand_symtabs_with_fullname (%s, \"%s\")\n",
@@ -257,8 +268,9 @@ debug_qf_map_matching_symbols (struct objfile *objfile,
symbol_compare_ftype *match,
symbol_compare_ftype *ordered_compare)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog,
"qf->map_matching_symbols (%s, \"%s\", %s, %d, %s, %s, %s, %s)\n",
@@ -284,8 +296,9 @@ debug_qf_expand_symtabs_matching
expand_symtabs_exp_notify_ftype *expansion_notify,
enum search_domain kind, void *data)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog,
"qf->expand_symtabs_matching (%s, %s, %s, %s, %s, %s)\n",
@@ -310,8 +323,9 @@ debug_qf_find_pc_sect_compunit_symtab (struct objfile *objfile,
struct obj_section *section,
int warn_if_readin)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
struct compunit_symtab *retval;
fprintf_filtered (gdb_stdlog,
@@ -341,8 +355,9 @@ debug_qf_map_symbol_filenames (struct objfile *objfile,
symbol_filename_ftype *fun, void *data,
int need_fullname)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog,
"qf->map_symbol_filenames (%s, %s, %s, %d)\n",
objfile_debug_name (objfile),
@@ -378,8 +393,9 @@ static const struct quick_symbol_functions debug_sym_quick_functions =
static VEC (probe_p) *
debug_sym_get_probes (struct objfile *objfile)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
VEC (probe_p) *retval;
retval = debug_data->real_sf->sym_probe_fns->sym_get_probes (objfile);
@@ -402,8 +418,9 @@ static const struct sym_probe_fns debug_sym_probe_fns =
static void
debug_sym_new_init (struct objfile *objfile)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "sf->sym_new_init (%s)\n",
objfile_debug_name (objfile));
@@ -414,8 +431,9 @@ debug_sym_new_init (struct objfile *objfile)
static void
debug_sym_init (struct objfile *objfile)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "sf->sym_init (%s)\n",
objfile_debug_name (objfile));
@@ -426,8 +444,9 @@ debug_sym_init (struct objfile *objfile)
static void
debug_sym_read (struct objfile *objfile, int symfile_flags)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "sf->sym_read (%s, 0x%x)\n",
objfile_debug_name (objfile), symfile_flags);
@@ -438,8 +457,9 @@ debug_sym_read (struct objfile *objfile, int symfile_flags)
static void
debug_sym_read_psymbols (struct objfile *objfile)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "sf->sym_read_psymbols (%s)\n",
objfile_debug_name (objfile));
@@ -450,8 +470,9 @@ debug_sym_read_psymbols (struct objfile *objfile)
static void
debug_sym_finish (struct objfile *objfile)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "sf->sym_finish (%s)\n",
objfile_debug_name (objfile));
@@ -463,8 +484,9 @@ static void
debug_sym_offsets (struct objfile *objfile,
const struct section_addr_info *info)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "sf->sym_offsets (%s, %s)\n",
objfile_debug_name (objfile),
@@ -485,8 +507,9 @@ debug_sym_segments (bfd *abfd)
static void
debug_sym_read_linetable (struct objfile *objfile)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
fprintf_filtered (gdb_stdlog, "sf->sym_read_linetable (%s)\n",
objfile_debug_name (objfile));
@@ -497,8 +520,9 @@ debug_sym_read_linetable (struct objfile *objfile)
static bfd_byte *
debug_sym_relocate (struct objfile *objfile, asection *sectp, bfd_byte *buf)
{
- const struct debug_sym_fns_data *debug_data =
- objfile_data (objfile, symfile_debug_objfile_data_key);
+ const struct debug_sym_fns_data *debug_data
+ = ((const struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
bfd_byte *retval;
retval = debug_data->real_sf->sym_relocate (objfile, sectp, buf);
@@ -597,7 +621,8 @@ uninstall_symfile_debug_logging (struct objfile *objfile)
/* The debug versions should be currently installed. */
gdb_assert (symfile_debug_installed (objfile));
- debug_data = objfile_data (objfile, symfile_debug_objfile_data_key);
+ debug_data = ((struct debug_sym_fns_data *)
+ objfile_data (objfile, symfile_debug_objfile_data_key));
objfile->sf = debug_data->real_sf;
xfree (debug_data);
diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c
index 72fb1d0..ff0d458 100644
--- a/gdb/symfile-mem.c
+++ b/gdb/symfile-mem.c
@@ -180,7 +180,8 @@ struct symbol_file_add_from_memory_args
static int
symbol_file_add_from_memory_wrapper (struct ui_out *uiout, void *data)
{
- struct symbol_file_add_from_memory_args *args = data;
+ struct symbol_file_add_from_memory_args *args
+ = (struct symbol_file_add_from_memory_args *) data;
symbol_file_add_from_memory (args->bfd, args->sysinfo_ehdr, args->size,
args->name, args->from_tty);
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 229f9b4..682e3ca 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -424,7 +424,7 @@ struct place_section_arg
static void
place_section (bfd *abfd, asection *sect, void *obj)
{
- struct place_section_arg *arg = obj;
+ struct place_section_arg *arg = (struct place_section_arg *) obj;
CORE_ADDR *offsets = arg->offsets->offsets, start_addr;
int done;
ULONGEST align = ((ULONGEST) 1) << bfd_get_section_alignment (abfd, sect);
@@ -1907,7 +1907,7 @@ static int validate_download = 0;
static void
add_section_size_callback (bfd *abfd, asection *asec, void *data)
{
- bfd_size_type *sum = data;
+ bfd_size_type *sum = (bfd_size_type *) data;
*sum += bfd_get_section_size (asec);
}
@@ -1944,7 +1944,8 @@ struct load_progress_section_data {
static void
load_progress (ULONGEST bytes, void *untyped_arg)
{
- struct load_progress_section_data *args = untyped_arg;
+ struct load_progress_section_data *args
+ = (struct load_progress_section_data *) untyped_arg;
struct load_progress_data *totals;
if (args == NULL)
@@ -2009,7 +2010,7 @@ static void
load_section_callback (bfd *abfd, asection *asec, void *data)
{
struct memory_write_request *new_request;
- struct load_section_data *args = data;
+ struct load_section_data *args = (struct load_section_data *) data;
struct load_progress_section_data *section_data;
bfd_size_type size = bfd_get_section_size (asec);
gdb_byte *buffer;
@@ -2048,7 +2049,7 @@ load_section_callback (bfd *abfd, asection *asec, void *data)
static void
clear_memory_write_data (void *arg)
{
- VEC(memory_write_request_s) **vec_p = arg;
+ VEC(memory_write_request_s) **vec_p = (VEC(memory_write_request_s) **) arg;
VEC(memory_write_request_s) *vec = *vec_p;
int i;
struct memory_write_request *mr;
@@ -2901,7 +2902,8 @@ allocate_symtab (struct compunit_symtab *cust, const char *filename)
struct symtab *symtab
= OBSTACK_ZALLOC (&objfile->objfile_obstack, struct symtab);
- symtab->filename = bcache (filename, strlen (filename) + 1,
+ symtab->filename
+ = (const char *) bcache (filename, strlen (filename) + 1,
objfile->per_bfd->filename_cache);
symtab->fullname = NULL;
symtab->language = deduce_language_from_filename (filename);
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index bee07ac..53d8c03 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -876,7 +876,7 @@ static int
maintenance_expand_file_matcher (const char *filename, void *data,
int basenames)
{
- const char *regexp = data;
+ const char *regexp = (const char *) data;
QUIT;
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 9197621..c95b651 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -473,7 +473,7 @@ iterate_over_symtabs (const char *name,
static int
lookup_symtab_callback (struct symtab *symtab, void *data)
{
- struct symtab **result_ptr = data;
+ struct symtab **result_ptr = (struct symtab **) data;
*result_ptr = symtab;
return 1;
@@ -663,7 +663,8 @@ struct demangled_name_entry
static hashval_t
hash_demangled_name_entry (const void *data)
{
- const struct demangled_name_entry *e = data;
+ const struct demangled_name_entry *e
+ = (const struct demangled_name_entry *) data;
return htab_hash_string (e->mangled);
}
@@ -673,8 +674,10 @@ hash_demangled_name_entry (const void *data)
static int
eq_demangled_name_entry (const void *a, const void *b)
{
- const struct demangled_name_entry *da = a;
- const struct demangled_name_entry *db = b;
+ const struct demangled_name_entry *da
+ = (const struct demangled_name_entry *) a;
+ const struct demangled_name_entry *db
+ = (const struct demangled_name_entry *) b;
return strcmp (da->mangled, db->mangled) == 0;
}
@@ -1331,7 +1334,8 @@ free_symbol_cache (struct symbol_cache *cache)
static struct symbol_cache *
get_symbol_cache (struct program_space *pspace)
{
- struct symbol_cache *cache = program_space_data (pspace, symbol_cache_key);
+ struct symbol_cache *cache
+ = (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
if (cache == NULL)
{
@@ -1348,7 +1352,7 @@ get_symbol_cache (struct program_space *pspace)
static void
symbol_cache_cleanup (struct program_space *pspace, void *data)
{
- struct symbol_cache *cache = data;
+ struct symbol_cache *cache = (struct symbol_cache *) data;
free_symbol_cache (cache);
}
@@ -1363,7 +1367,7 @@ set_symbol_cache_size (unsigned int new_size)
ALL_PSPACES (pspace)
{
struct symbol_cache *cache
- = program_space_data (pspace, symbol_cache_key);
+ = (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
/* The pspace could have been created but not have a cache yet. */
if (cache != NULL)
@@ -1519,7 +1523,8 @@ symbol_cache_mark_not_found (struct block_symbol_cache *bsc,
static void
symbol_cache_flush (struct program_space *pspace)
{
- struct symbol_cache *cache = program_space_data (pspace, symbol_cache_key);
+ struct symbol_cache *cache
+ = (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
int pass;
size_t total_size;
@@ -1634,7 +1639,8 @@ maintenance_print_symbol_cache (char *args, int from_tty)
: "(no object file)");
/* If the cache hasn't been created yet, avoid creating one. */
- cache = program_space_data (pspace, symbol_cache_key);
+ cache
+ = (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
if (cache == NULL)
printf_filtered (" <empty>\n");
else
@@ -1705,7 +1711,8 @@ maintenance_print_symbol_cache_statistics (char *args, int from_tty)
: "(no object file)");
/* If the cache hasn't been created yet, avoid creating one. */
- cache = program_space_data (pspace, symbol_cache_key);
+ cache
+ = (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
if (cache == NULL)
printf_filtered (" empty, no stats available\n");
else
@@ -4167,7 +4174,7 @@ clear_filename_seen_cache (struct filename_seen_cache *cache)
static void
delete_filename_seen_cache (void *ptr)
{
- struct filename_seen_cache *cache = ptr;
+ struct filename_seen_cache *cache = (struct filename_seen_cache *) ptr;
htab_delete (cache->tab);
xfree (cache);
@@ -4247,7 +4254,8 @@ static void
output_partial_symbol_filename (const char *filename, const char *fullname,
void *data)
{
- output_source_filename (fullname ? fullname : filename, data);
+ output_source_filename (fullname ? fullname : filename,
+ (struct output_source_filename_data *) data);
}
static void
@@ -4434,7 +4442,7 @@ static int
search_symbols_file_matches (const char *filename, void *user_data,
int basenames)
{
- struct search_symbols_data *data = user_data;
+ struct search_symbols_data *data = (struct search_symbols_data *) user_data;
return file_matches (filename, data->files, data->nfiles, basenames);
}
@@ -4444,7 +4452,7 @@ search_symbols_file_matches (const char *filename, void *user_data,
static int
search_symbols_name_matches (const char *symname, void *user_data)
{
- struct search_symbols_data *data = user_data;
+ struct search_symbols_data *data = (struct search_symbols_data *) user_data;
return !data->preg_p || regexec (&data->preg, symname, 0, NULL, 0) == 0;
}
@@ -5035,7 +5043,7 @@ free_completion_list (VEC (char_ptr) **list_ptr)
static void
do_free_completion_list (void *list)
{
- free_completion_list (list);
+ free_completion_list ((VEC (char_ptr) **) list);
}
/* Helper routine for make_symbol_completion_list. */
@@ -5801,7 +5809,8 @@ static void
maybe_add_partial_symtab_filename (const char *filename, const char *fullname,
void *user_data)
{
- struct add_partial_filename_data *data = user_data;
+ struct add_partial_filename_data *data
+ = (struct add_partial_filename_data *) user_data;
if (not_interesting_fname (filename))
return;
@@ -5898,7 +5907,8 @@ make_source_files_completion_list (const char *text, const char *word)
static struct main_info *
get_main_info (void)
{
- struct main_info *info = program_space_data (current_program_space,
+ struct main_info *info
+ = (struct main_info *) program_space_data (current_program_space,
main_progspace_key);
if (info == NULL)
@@ -5924,7 +5934,7 @@ get_main_info (void)
static void
main_info_cleanup (struct program_space *pspace, void *data)
{
- struct main_info *info = data;
+ struct main_info *info = (struct main_info *) data;
if (info != NULL)
xfree (info->name_of_main);
diff --git a/gdb/target-dcache.c b/gdb/target-dcache.c
index 4d55397..031cf74 100644
--- a/gdb/target-dcache.c
+++ b/gdb/target-dcache.c
@@ -31,7 +31,7 @@ static const struct address_space_data *target_dcache_aspace_key;
static void
target_dcache_cleanup (struct address_space *aspace, void *arg)
{
- dcache_free (arg);
+ dcache_free ((DCACHE *) arg);
}
/* Target dcache is initialized or not. */
@@ -39,8 +39,9 @@ target_dcache_cleanup (struct address_space *aspace, void *arg)
int
target_dcache_init_p (void)
{
- DCACHE *dcache = address_space_data (current_program_space->aspace,
- target_dcache_aspace_key);
+ DCACHE *dcache
+ = (DCACHE *) address_space_data (current_program_space->aspace,
+ target_dcache_aspace_key);
return (dcache != NULL);
}
@@ -50,8 +51,9 @@ target_dcache_init_p (void)
void
target_dcache_invalidate (void)
{
- DCACHE *dcache = address_space_data (current_program_space->aspace,
- target_dcache_aspace_key);
+ DCACHE *dcache
+ = (DCACHE *) address_space_data (current_program_space->aspace,
+ target_dcache_aspace_key);
if (dcache != NULL)
dcache_invalidate (dcache);
@@ -63,8 +65,9 @@ target_dcache_invalidate (void)
DCACHE *
target_dcache_get (void)
{
- DCACHE *dcache = address_space_data (current_program_space->aspace,
- target_dcache_aspace_key);
+ DCACHE *dcache
+ = (DCACHE *) address_space_data (current_program_space->aspace,
+ target_dcache_aspace_key);
return dcache;
}
@@ -75,8 +78,9 @@ target_dcache_get (void)
DCACHE *
target_dcache_get_or_init (void)
{
- DCACHE *dcache = address_space_data (current_program_space->aspace,
- target_dcache_aspace_key);
+ DCACHE *dcache
+ = (DCACHE *) address_space_data (current_program_space->aspace,
+ target_dcache_aspace_key);
if (dcache == NULL)
{
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 9ef811b..de365c9 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -368,7 +368,8 @@ target_find_description (void)
{
struct tdesc_arch_data *data;
- data = gdbarch_data (target_gdbarch (), tdesc_data);
+ data = ((struct tdesc_arch_data *)
+ gdbarch_data (target_gdbarch (), tdesc_data));
if (tdesc_has_registers (current_target_desc)
&& data->arch_regs == NULL)
warning (_("Target-supplied registers are not supported "
@@ -575,7 +576,7 @@ tdesc_find_type (struct gdbarch *gdbarch, const char *id)
struct tdesc_arch_data *data;
int i, num_regs;
- data = gdbarch_data (gdbarch, tdesc_data);
+ data = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
num_regs = VEC_length (tdesc_arch_reg, data->arch_regs);
for (i = 0; i < num_regs; i++)
{
@@ -815,7 +816,7 @@ tdesc_data_alloc (void)
void
tdesc_data_cleanup (void *data_untyped)
{
- struct tdesc_arch_data *data = data_untyped;
+ struct tdesc_arch_data *data = (struct tdesc_arch_data *) data_untyped;
VEC_free (tdesc_arch_reg, data->arch_regs);
xfree (data);
@@ -913,7 +914,7 @@ tdesc_find_arch_register (struct gdbarch *gdbarch, int regno)
{
struct tdesc_arch_data *data;
- data = gdbarch_data (gdbarch, tdesc_data);
+ data = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
if (regno < VEC_length (tdesc_arch_reg, data->arch_regs))
return VEC_index (tdesc_arch_reg, data->arch_regs, regno);
else
@@ -943,7 +944,8 @@ tdesc_register_name (struct gdbarch *gdbarch, int regno)
if (regno >= num_regs && regno < num_regs + num_pseudo_regs)
{
- struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+ struct tdesc_arch_data *data
+ = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
gdb_assert (data->pseudo_register_name != NULL);
return data->pseudo_register_name (gdbarch, regno);
@@ -962,7 +964,8 @@ tdesc_register_type (struct gdbarch *gdbarch, int regno)
if (reg == NULL && regno >= num_regs && regno < num_regs + num_pseudo_regs)
{
- struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+ struct tdesc_arch_data *data
+ = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
gdb_assert (data->pseudo_register_type != NULL);
return data->pseudo_register_type (gdbarch, regno);
@@ -1100,7 +1103,8 @@ tdesc_register_reggroup_p (struct gdbarch *gdbarch, int regno,
if (regno >= num_regs && regno < num_regs + num_pseudo_regs)
{
- struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+ struct tdesc_arch_data *data
+ = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
if (data->pseudo_register_reggroup_p != NULL)
return data->pseudo_register_reggroup_p (gdbarch, regno, reggroup);
@@ -1121,7 +1125,8 @@ void
set_tdesc_pseudo_register_name (struct gdbarch *gdbarch,
gdbarch_register_name_ftype *pseudo_name)
{
- struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+ struct tdesc_arch_data *data
+ = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
data->pseudo_register_name = pseudo_name;
}
@@ -1130,7 +1135,8 @@ void
set_tdesc_pseudo_register_type (struct gdbarch *gdbarch,
gdbarch_register_type_ftype *pseudo_type)
{
- struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+ struct tdesc_arch_data *data
+ = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
data->pseudo_register_type = pseudo_type;
}
@@ -1140,7 +1146,8 @@ set_tdesc_pseudo_register_reggroup_p
(struct gdbarch *gdbarch,
gdbarch_register_reggroup_p_ftype *pseudo_reggroup_p)
{
- struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data);
+ struct tdesc_arch_data *data
+ = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
data->pseudo_register_reggroup_p = pseudo_reggroup_p;
}
@@ -1166,7 +1173,7 @@ tdesc_use_registers (struct gdbarch *gdbarch,
included. */
gdb_assert (tdesc_has_registers (target_desc));
- data = gdbarch_data (gdbarch, tdesc_data);
+ data = (struct tdesc_arch_data *) gdbarch_data (gdbarch, tdesc_data);
data->arch_regs = early_data->arch_regs;
xfree (early_data);
@@ -1454,7 +1461,7 @@ allocate_target_description (void)
static void
free_target_description (void *arg)
{
- struct target_desc *target_desc = arg;
+ struct target_desc *target_desc = (struct target_desc *) arg;
struct tdesc_feature *feature;
struct property *prop;
int ix;
diff --git a/gdb/target-memory.c b/gdb/target-memory.c
index 93772aa..9067033 100644
--- a/gdb/target-memory.c
+++ b/gdb/target-memory.c
@@ -28,8 +28,10 @@
static int
compare_block_starting_address (const void *a, const void *b)
{
- const struct memory_write_request *a_req = a;
- const struct memory_write_request *b_req = b;
+ const struct memory_write_request *a_req
+ = (const struct memory_write_request *) a;
+ const struct memory_write_request *b_req
+ = (const struct memory_write_request *) b;
if (a_req->begin < b_req->begin)
return -1;
@@ -288,7 +290,7 @@ compute_garbled_blocks (VEC(memory_write_request_s) *erased_blocks,
static void
cleanup_request_data (void *p)
{
- VEC(memory_write_request_s) **v = p;
+ VEC(memory_write_request_s) **v = (VEC(memory_write_request_s) **) p;
struct memory_write_request *r;
int i;
@@ -299,7 +301,7 @@ cleanup_request_data (void *p)
static void
cleanup_write_requests_vector (void *p)
{
- VEC(memory_write_request_s) **v = p;
+ VEC(memory_write_request_s) **v = (VEC(memory_write_request_s) **) p;
VEC_free (memory_write_request_s, *v);
}
diff --git a/gdb/target.c b/gdb/target.c
index 14cec56..b8b1e9b 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -347,7 +347,7 @@ complete_target_initialization (struct target_ops *t)
static void
open_target (char *args, int from_tty, struct cmd_list_element *command)
{
- struct target_ops *ops = get_cmd_context (command);
+ struct target_ops *ops = (struct target_ops *) get_cmd_context (command);
if (targetdebug)
fprintf_unfiltered (gdb_stdlog, "-> %s->to_open (...)\n",
@@ -531,7 +531,7 @@ target_supports_terminal_ours (void)
static void
cleanup_restore_target_terminal (void *arg)
{
- enum terminal_state *previous_state = arg;
+ enum terminal_state *previous_state = (enum terminal_state *) arg;
switch (*previous_state)
{
@@ -1768,7 +1768,7 @@ read_whatever_is_readable (struct target_ops *ops,
void
free_memory_read_result_vector (void *x)
{
- VEC(memory_read_result_s) *v = x;
+ VEC(memory_read_result_s) *v = (VEC(memory_read_result_s) *) x;
memory_read_result_s *current;
int ix;
diff --git a/gdb/thread.c b/gdb/thread.c
index 0f8eded..6d410fb 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -749,7 +749,7 @@ delete_exited_threads (void)
static void
disable_thread_stack_temporaries (void *data)
{
- ptid_t *pd = data;
+ ptid_t *pd = (ptid_t *) data;
struct thread_info *tp = find_thread_ptid (*pd);
if (tp != NULL)
@@ -1082,7 +1082,7 @@ finish_thread_state (ptid_t ptid)
void
finish_thread_state_cleanup (void *arg)
{
- ptid_t *ptid_p = arg;
+ ptid_t *ptid_p = (ptid_t *) arg;
gdb_assert (arg);
@@ -1457,7 +1457,7 @@ static void
do_restore_current_thread_cleanup (void *arg)
{
struct thread_info *tp;
- struct current_thread_cleanup *old = arg;
+ struct current_thread_cleanup *old = (struct current_thread_cleanup *) arg;
tp = find_thread_ptid (old->inferior_ptid);
@@ -1489,7 +1489,7 @@ do_restore_current_thread_cleanup (void *arg)
static void
restore_current_thread_cleanup_dtor (void *arg)
{
- struct current_thread_cleanup *old = arg;
+ struct current_thread_cleanup *old = (struct current_thread_cleanup *) arg;
struct thread_info *tp;
struct inferior *inf;
@@ -1510,7 +1510,8 @@ static void
set_thread_refcount (void *data)
{
int k;
- struct thread_array_cleanup *ta_cleanup = data;
+ struct thread_array_cleanup *ta_cleanup
+ = (struct thread_array_cleanup *) data;
for (k = 0; k != ta_cleanup->count; k++)
ta_cleanup->tp_array[k]->refcount--;
@@ -1573,8 +1574,10 @@ static int tp_array_compar_ascending;
static int
tp_array_compar (const void *ap_voidp, const void *bp_voidp)
{
- const struct thread_info *const *ap = ap_voidp;
- const struct thread_info *const *bp = bp_voidp;
+ const struct thread_info *const *ap
+ = (const struct thread_info * const*) ap_voidp;
+ const struct thread_info *const *bp
+ = (const struct thread_info * const*) bp_voidp;
return ((((*ap)->num > (*bp)->num) - ((*ap)->num < (*bp)->num))
* (tp_array_compar_ascending ? +1 : -1));
@@ -1834,7 +1837,7 @@ do_captured_thread_select (struct ui_out *uiout, void *tidstr)
int num;
struct thread_info *tp;
- num = value_as_long (parse_and_eval (tidstr));
+ num = value_as_long (parse_and_eval ((const char *) tidstr));
tp = find_thread_id (num);
diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c
index 2cc38c5..015dbe6 100644
--- a/gdb/tic6x-tdep.c
+++ b/gdb/tic6x-tdep.c
@@ -405,7 +405,7 @@ tic6x_frame_unwind_cache (struct frame_info *this_frame,
struct tic6x_unwind_cache *cache;
if (*this_prologue_cache)
- return *this_prologue_cache;
+ return (struct tic6x_unwind_cache *) *this_prologue_cache;
cache = FRAME_OBSTACK_ZALLOC (struct tic6x_unwind_cache);
(*this_prologue_cache) = cache;
@@ -516,7 +516,7 @@ tic6x_stub_this_id (struct frame_info *this_frame, void **this_cache,
if (*this_cache == NULL)
*this_cache = tic6x_make_stub_cache (this_frame);
- cache = *this_cache;
+ cache = (struct tic6x_unwind_cache *) *this_cache;
*this_id = frame_id_build (cache->cfa, get_frame_pc (this_frame));
}
diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c
index 65f0729..c2b0036 100644
--- a/gdb/tilegx-tdep.c
+++ b/gdb/tilegx-tdep.c
@@ -869,7 +869,7 @@ tilegx_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct tilegx_frame_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct tilegx_frame_cache);
*this_cache = cache;
diff --git a/gdb/top.c b/gdb/top.c
index 23ad603..d1e2271 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -278,7 +278,7 @@ void
do_restore_instream_cleanup (void *stream)
{
/* Restore the previous input stream. */
- instream = stream;
+ instream = (FILE *) stream;
}
/* Read commands from STREAM. */
@@ -813,7 +813,8 @@ struct gdb_readline_wrapper_cleanup
static void
gdb_readline_wrapper_cleanup (void *arg)
{
- struct gdb_readline_wrapper_cleanup *cleanup = arg;
+ struct gdb_readline_wrapper_cleanup *cleanup
+ = (struct gdb_readline_wrapper_cleanup *) arg;
rl_already_prompted = cleanup->already_prompted_orig;
@@ -1439,7 +1440,7 @@ struct qt_args
static int
kill_or_detach (struct inferior *inf, void *args)
{
- struct qt_args *qt = args;
+ struct qt_args *qt = (struct qt_args *) args;
struct thread_info *thread;
if (inf->pid == 0)
@@ -1470,7 +1471,7 @@ kill_or_detach (struct inferior *inf, void *args)
static int
print_inferior_quit_action (struct inferior *inf, void *arg)
{
- struct ui_file *stb = arg;
+ struct ui_file *stb = (struct ui_file *) arg;
if (inf->pid == 0)
return 0;
diff --git a/gdb/tracefile-tfile.c b/gdb/tracefile-tfile.c
index 68ff5b1..3ccd281 100644
--- a/gdb/tracefile-tfile.c
+++ b/gdb/tracefile-tfile.c
@@ -713,7 +713,7 @@ typedef int (*walk_blocks_callback_func) (char blocktype, void *data);
static int
match_blocktype (char blocktype, void *data)
{
- char *wantedp = data;
+ char *wantedp = (char *) data;
if (*wantedp == blocktype)
return 1;
@@ -966,7 +966,7 @@ tfile_get_trace_state_variable_value (struct target_ops *self,
static int
build_traceframe_info (char blocktype, void *data)
{
- struct traceframe_info *info = data;
+ struct traceframe_info *info = (struct traceframe_info *) data;
switch (blocktype)
{
diff --git a/gdb/tracefile.c b/gdb/tracefile.c
index 21bf25f..c26d8db 100644
--- a/gdb/tracefile.c
+++ b/gdb/tracefile.c
@@ -41,7 +41,7 @@
static void
trace_file_writer_xfree (void *arg)
{
- struct trace_file_writer *writer = arg;
+ struct trace_file_writer *writer = (struct trace_file_writer *) arg;
writer->ops->dtor (writer);
xfree (writer);
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 2ed24e9..415fa6d 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -860,7 +860,8 @@ static int memrange_cmp (const void *, const void *);
static int
memrange_cmp (const void *va, const void *vb)
{
- const struct memrange *a = va, *b = vb;
+ const struct memrange *a = (const struct memrange *) va;
+ const struct memrange *b = (const struct memrange *) vb;
if (a->type < b->type)
return -1;
@@ -1137,7 +1138,7 @@ do_collect_symbol (const char *print_name,
struct symbol *sym,
void *cb_data)
{
- struct add_local_symbols_data *p = cb_data;
+ struct add_local_symbols_data *p = (struct add_local_symbols_data *) cb_data;
collect_symbol (p->collect, sym, p->gdbarch, p->frame_regno,
p->frame_offset, p->pc, p->trace_string);
@@ -1231,7 +1232,7 @@ clear_collection_list (struct collection_list *list)
static void
do_clear_collection_list (void *list)
{
- struct collection_list *l = list;
+ struct collection_list *l = (struct collection_list *) list;
clear_collection_list (l);
}
@@ -3234,7 +3235,8 @@ struct current_traceframe_cleanup
static void
do_restore_current_traceframe_cleanup (void *arg)
{
- struct current_traceframe_cleanup *old = arg;
+ struct current_traceframe_cleanup *old
+ = (struct current_traceframe_cleanup *) arg;
set_current_traceframe (old->traceframe_number);
}
@@ -3242,7 +3244,8 @@ do_restore_current_traceframe_cleanup (void *arg)
static void
restore_current_traceframe_cleanup_dtor (void *arg)
{
- struct current_traceframe_cleanup *old = arg;
+ struct current_traceframe_cleanup *old
+ = (struct current_traceframe_cleanup *) arg;
xfree (old);
}
@@ -3892,7 +3895,8 @@ parse_tsv_definition (char *line, struct uploaded_tsv **utsvp)
void
free_current_marker (void *arg)
{
- struct static_tracepoint_marker **marker_p = arg;
+ struct static_tracepoint_marker **marker_p
+ = (struct static_tracepoint_marker **) arg;
if (*marker_p != NULL)
{
@@ -4185,12 +4189,14 @@ traceframe_info_start_memory (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct traceframe_info *info = user_data;
+ struct traceframe_info *info = (struct traceframe_info *) user_data;
struct mem_range *r = VEC_safe_push (mem_range_s, info->memory, NULL);
ULONGEST *start_p, *length_p;
- start_p = xml_find_attribute (attributes, "start")->value;
- length_p = xml_find_attribute (attributes, "length")->value;
+ start_p
+ = (long unsigned int *) xml_find_attribute (attributes, "start")->value;
+ length_p
+ = (long unsigned int *) xml_find_attribute (attributes, "length")->value;
r->start = *start_p;
r->length = *length_p;
@@ -4204,8 +4210,9 @@ traceframe_info_start_tvar (struct gdb_xml_parser *parser,
void *user_data,
VEC(gdb_xml_value_s) *attributes)
{
- struct traceframe_info *info = user_data;
- const char *id_attrib = xml_find_attribute (attributes, "id")->value;
+ struct traceframe_info *info = (struct traceframe_info *) user_data;
+ const char *id_attrib
+ = (const char *) xml_find_attribute (attributes, "id")->value;
int id = gdb_xml_parse_ulongest (parser, id_attrib);
VEC_safe_push (int, info->tvars, id);
@@ -4216,7 +4223,7 @@ traceframe_info_start_tvar (struct gdb_xml_parser *parser,
static void
free_result (void *p)
{
- struct traceframe_info *result = p;
+ struct traceframe_info *result = (struct traceframe_info *) p;
free_traceframe_info (result);
}
diff --git a/gdb/tramp-frame.c b/gdb/tramp-frame.c
index 7d288b6..8f5701e 100644
--- a/gdb/tramp-frame.c
+++ b/gdb/tramp-frame.c
@@ -43,7 +43,8 @@ static struct trad_frame_cache *
tramp_frame_cache (struct frame_info *this_frame,
void **this_cache)
{
- struct tramp_frame_cache *tramp_cache = (*this_cache);
+ struct tramp_frame_cache *tramp_cache
+ = (struct tramp_frame_cache *) *this_cache;
if (tramp_cache->trad_cache == NULL)
{
diff --git a/gdb/tui/tui-file.c b/gdb/tui/tui-file.c
index 1aa0a61..cf853b8 100644
--- a/gdb/tui/tui-file.c
+++ b/gdb/tui/tui-file.c
@@ -71,7 +71,7 @@ tui_file_new (void)
static void
tui_file_delete (struct ui_file *file)
{
- struct tui_stream *tmpstream = ui_file_data (file);
+ struct tui_stream *tmpstream = (struct tui_stream *) ui_file_data (file);
if (tmpstream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
@@ -88,7 +88,7 @@ struct ui_file *
tui_fileopen (FILE *stream)
{
struct ui_file *file = tui_file_new ();
- struct tui_stream *tmpstream = ui_file_data (file);
+ struct tui_stream *tmpstream = (struct tui_stream *) ui_file_data (file);
tmpstream->ts_streamtype = afile;
tmpstream->ts_filestream = stream;
@@ -101,7 +101,7 @@ struct ui_file *
tui_sfileopen (int n)
{
struct ui_file *file = tui_file_new ();
- struct tui_stream *tmpstream = ui_file_data (file);
+ struct tui_stream *tmpstream = (struct tui_stream *) ui_file_data (file);
tmpstream->ts_streamtype = astring;
tmpstream->ts_filestream = NULL;
@@ -121,7 +121,7 @@ tui_sfileopen (int n)
static int
tui_file_isatty (struct ui_file *file)
{
- struct tui_stream *stream = ui_file_data (file);
+ struct tui_stream *stream = (struct tui_stream *) ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
@@ -135,7 +135,7 @@ tui_file_isatty (struct ui_file *file)
static void
tui_file_rewind (struct ui_file *file)
{
- struct tui_stream *stream = ui_file_data (file);
+ struct tui_stream *stream = (struct tui_stream *) ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
@@ -148,7 +148,7 @@ tui_file_put (struct ui_file *file,
ui_file_put_method_ftype *write,
void *dest)
{
- struct tui_stream *stream = ui_file_data (file);
+ struct tui_stream *stream = (struct tui_stream *) ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
@@ -169,7 +169,7 @@ tui_file_put (struct ui_file *file,
void
tui_file_fputs (const char *linebuffer, struct ui_file *file)
{
- struct tui_stream *stream = ui_file_data (file);
+ struct tui_stream *stream = (struct tui_stream *) ui_file_data (file);
if (stream->ts_streamtype == astring)
{
@@ -189,7 +189,7 @@ tui_file_fputs (const char *linebuffer, struct ui_file *file)
char *
tui_file_get_strbuf (struct ui_file *file)
{
- struct tui_stream *stream = ui_file_data (file);
+ struct tui_stream *stream = (struct tui_stream *) ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
@@ -203,7 +203,7 @@ tui_file_get_strbuf (struct ui_file *file)
void
tui_file_adjust_strbuf (int n, struct ui_file *file)
{
- struct tui_stream *stream = ui_file_data (file);
+ struct tui_stream *stream = (struct tui_stream *) ui_file_data (file);
int non_null_chars;
if (stream->ts_magic != &tui_file_magic)
@@ -233,7 +233,7 @@ tui_file_adjust_strbuf (int n, struct ui_file *file)
static void
tui_file_flush (struct ui_file *file)
{
- struct tui_stream *stream = ui_file_data (file);
+ struct tui_stream *stream = (struct tui_stream *) ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index 2528296..36afba4 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -550,13 +550,14 @@ static void
make_command_window (struct tui_win_info **win_info_ptr,
int height, int origin_y)
{
- *win_info_ptr = init_and_make_win (*win_info_ptr,
- CMD_WIN,
- height,
- tui_term_width (),
- 0,
- origin_y,
- DONT_BOX_WINDOW);
+ *win_info_ptr
+ = (struct tui_win_info *) init_and_make_win (*win_info_ptr,
+ CMD_WIN,
+ height,
+ tui_term_width (),
+ 0,
+ origin_y,
+ DONT_BOX_WINDOW);
(*win_info_ptr)->can_highlight = FALSE;
}
@@ -590,13 +591,14 @@ static void
make_data_window (struct tui_win_info **win_info_ptr,
int height, int origin_y)
{
- *win_info_ptr = init_and_make_win (*win_info_ptr,
- DATA_WIN,
- height,
- tui_term_width (),
- 0,
- origin_y,
- BOX_WINDOW);
+ *win_info_ptr
+ = (struct tui_win_info *) init_and_make_win (*win_info_ptr,
+ DATA_WIN,
+ height,
+ tui_term_width (),
+ 0,
+ origin_y,
+ BOX_WINDOW);
}
@@ -662,13 +664,15 @@ show_source_disasm_command (void)
if (TUI_DISASM_WIN == NULL)
{
make_disasm_window (&TUI_DISASM_WIN, asm_height, src_height - 1);
- locator = init_and_make_win (locator,
- LOCATOR_WIN,
- 2 /* 1 */ ,
- tui_term_width (),
- 0,
- (src_height + asm_height) - 1,
- DONT_BOX_WINDOW);
+ locator
+ = ((struct tui_gen_win_info *)
+ init_and_make_win (locator,
+ LOCATOR_WIN,
+ 2 /* 1 */ ,
+ tui_term_width (),
+ 0,
+ (src_height + asm_height) - 1,
+ DONT_BOX_WINDOW));
}
else
{
@@ -754,13 +758,15 @@ show_data (enum tui_layout_type new_layout)
make_source_window (&tui_win_list[win_type], src_height, data_height - 1);
else
make_disasm_window (&tui_win_list[win_type], src_height, data_height - 1);
- locator = init_and_make_win (locator,
- LOCATOR_WIN,
- 2 /* 1 */ ,
- tui_term_width (),
- 0,
- total_height - 1,
- DONT_BOX_WINDOW);
+ locator
+ = ((struct tui_gen_win_info *)
+ init_and_make_win (locator,
+ LOCATOR_WIN,
+ 2 /* 1 */ ,
+ tui_term_width (),
+ 0,
+ total_height - 1,
+ DONT_BOX_WINDOW));
}
else
{
@@ -870,22 +876,26 @@ make_source_or_disasm_window (struct tui_win_info **win_info_ptr,
execution_info = tui_source_exec_info_win_ptr ();
else
execution_info = tui_disassem_exec_info_win_ptr ();
- execution_info = init_and_make_win (execution_info,
- EXEC_INFO_WIN,
- height,
- 3,
- 0,
- origin_y,
- DONT_BOX_WINDOW);
+ execution_info
+ = ((struct tui_gen_win_info *)
+ init_and_make_win (execution_info,
+ EXEC_INFO_WIN,
+ height,
+ 3,
+ 0,
+ origin_y,
+ DONT_BOX_WINDOW));
/* Now create the source window. */
- *win_info_ptr = init_and_make_win (*win_info_ptr,
- type,
- height,
- tui_term_width () - execution_info->width,
- execution_info->width,
- origin_y,
- BOX_WINDOW);
+ *win_info_ptr
+ = ((struct tui_win_info *)
+ init_and_make_win (*win_info_ptr,
+ type,
+ height,
+ tui_term_width () - execution_info->width,
+ execution_info->width,
+ origin_y,
+ BOX_WINDOW));
(*win_info_ptr)->detail.source_info.execution_info = execution_info;
}
@@ -918,13 +928,15 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
make_source_window (win_info_ptr, src_height - 1, 0);
else
make_disasm_window (win_info_ptr, src_height - 1, 0);
- locator = init_and_make_win (locator,
- LOCATOR_WIN,
- 2 /* 1 */ ,
- tui_term_width (),
- 0,
- src_height - 1,
- DONT_BOX_WINDOW);
+ locator
+ = ((struct tui_gen_win_info *)
+ init_and_make_win (locator,
+ LOCATOR_WIN,
+ 2 /* 1 */ ,
+ tui_term_width (),
+ 0,
+ src_height - 1,
+ DONT_BOX_WINDOW));
}
else
{
diff --git a/gdb/tui/tui-out.c b/gdb/tui/tui-out.c
index 41ea349..d415a60 100644
--- a/gdb/tui/tui-out.c
+++ b/gdb/tui/tui-out.c
@@ -48,7 +48,7 @@ tui_field_int (struct ui_out *uiout,
const char *fldname,
int value)
{
- tui_out_data *data = ui_out_data (uiout);
+ tui_out_data *data = (tui_out_data *) ui_out_data (uiout);
if (data->base.suppress_output)
return;
@@ -76,7 +76,7 @@ tui_field_string (struct ui_out *uiout,
const char *fldname,
const char *string)
{
- tui_out_data *data = ui_out_data (uiout);
+ tui_out_data *data = (tui_out_data *) ui_out_data (uiout);
if (data->base.suppress_output)
return;
@@ -107,7 +107,7 @@ tui_field_fmt (struct ui_out *uiout, int fldno,
const char *format,
va_list args)
{
- tui_out_data *data = ui_out_data (uiout);
+ tui_out_data *data = (tui_out_data *) ui_out_data (uiout);
if (data->base.suppress_output)
return;
@@ -122,7 +122,7 @@ tui_field_fmt (struct ui_out *uiout, int fldno,
static void
tui_text (struct ui_out *uiout, const char *string)
{
- tui_out_data *data = ui_out_data (uiout);
+ tui_out_data *data = (tui_out_data *) ui_out_data (uiout);
if (data->base.suppress_output)
return;
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index 8dc57f2..8fbd178 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -87,7 +87,7 @@ struct typedef_hash_table
static hashval_t
hash_typedef_field (const void *p)
{
- const struct typedef_field *tf = p;
+ const struct typedef_field *tf = (const struct typedef_field *) p;
struct type *t = check_typedef (tf->type);
return htab_hash_string (TYPE_SAFE_NAME (t));
@@ -98,8 +98,8 @@ hash_typedef_field (const void *p)
static int
eq_typedef_field (const void *a, const void *b)
{
- const struct typedef_field *tfa = a;
- const struct typedef_field *tfb = b;
+ const struct typedef_field *tfa = (const struct typedef_field *) a;
+ const struct typedef_field *tfb = (const struct typedef_field *) b;
return types_equal (tfa->type, tfb->type);
}
@@ -195,7 +195,7 @@ free_typedef_hash (struct typedef_hash_table *table)
static void
do_free_typedef_hash (void *arg)
{
- free_typedef_hash (arg);
+ free_typedef_hash ((struct typedef_hash_table *) arg);
}
/* Return a new cleanup that frees TABLE. */
@@ -211,7 +211,7 @@ make_cleanup_free_typedef_hash (struct typedef_hash_table *table)
static int
copy_typedef_hash_element (void **slot, void *nt)
{
- htab_t new_table = nt;
+ htab_t new_table = (htab_t) nt;
void **new_slot;
new_slot = htab_find_slot (new_table, *slot, INSERT);
@@ -242,7 +242,7 @@ copy_typedef_hash (struct typedef_hash_table *table)
static void
do_free_global_table (void *arg)
{
- struct type_print_options *flags = arg;
+ struct type_print_options *flags = (struct type_print_options *) arg;
free_typedef_hash (flags->global_typedefs);
free_ext_lang_type_printers (flags->global_printers);
@@ -281,7 +281,7 @@ find_global_typedef (const struct type_print_options *flags,
slot = htab_find_slot (flags->global_typedefs->table, &tf, INSERT);
if (*slot != NULL)
{
- new_tf = *slot;
+ new_tf = (struct typedef_field *) *slot;
return new_tf->name;
}
@@ -320,7 +320,8 @@ find_typedef_in_hash (const struct type_print_options *flags, struct type *t)
tf.name = NULL;
tf.type = t;
- found = htab_find (flags->local_typedefs->table, &tf);
+ found = (struct typedef_field *) htab_find (flags->local_typedefs->table,
+ &tf);
if (found != NULL)
return found->name;
diff --git a/gdb/ui-file.c b/gdb/ui-file.c
index c59c14c..1db421d 100644
--- a/gdb/ui-file.c
+++ b/gdb/ui-file.c
@@ -225,7 +225,7 @@ ui_file_write (struct ui_file *file,
void
ui_file_write_for_put (void *data, const char *buffer, long length_buffer)
{
- ui_file_write (data, buffer, length_buffer);
+ ui_file_write ((struct ui_file *) data, buffer, length_buffer);
}
void
@@ -330,7 +330,7 @@ struct accumulated_ui_file
static void
do_ui_file_xstrdup (void *context, const char *buffer, long length)
{
- struct accumulated_ui_file *acc = context;
+ struct accumulated_ui_file *acc = (struct accumulated_ui_file *) context;
if (acc->buffer == NULL)
acc->buffer = (char *) xmalloc (length + 1);
@@ -413,7 +413,7 @@ mem_file_new (void)
static void
mem_file_delete (struct ui_file *file)
{
- struct mem_file *stream = ui_file_data (file);
+ struct mem_file *stream = (struct mem_file *) ui_file_data (file);
if (stream->magic != &mem_file_magic)
internal_error (__FILE__, __LINE__,
@@ -432,7 +432,7 @@ mem_fileopen (void)
static void
mem_file_rewind (struct ui_file *file)
{
- struct mem_file *stream = ui_file_data (file);
+ struct mem_file *stream = (struct mem_file *) ui_file_data (file);
if (stream->magic != &mem_file_magic)
internal_error (__FILE__, __LINE__,
@@ -445,7 +445,7 @@ mem_file_put (struct ui_file *file,
ui_file_put_method_ftype *write,
void *dest)
{
- struct mem_file *stream = ui_file_data (file);
+ struct mem_file *stream = (struct mem_file *) ui_file_data (file);
if (stream->magic != &mem_file_magic)
internal_error (__FILE__, __LINE__,
@@ -459,7 +459,7 @@ mem_file_write (struct ui_file *file,
const char *buffer,
long length_buffer)
{
- struct mem_file *stream = ui_file_data (file);
+ struct mem_file *stream = (struct mem_file *) ui_file_data (file);
if (stream->magic != &mem_file_magic)
internal_error (__FILE__, __LINE__,
@@ -535,7 +535,7 @@ stdio_file_new (FILE *file, int close_p)
static void
stdio_file_delete (struct ui_file *file)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
@@ -550,7 +550,7 @@ stdio_file_delete (struct ui_file *file)
static void
stdio_file_flush (struct ui_file *file)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
@@ -561,7 +561,7 @@ stdio_file_flush (struct ui_file *file)
static long
stdio_file_read (struct ui_file *file, char *buf, long length_buf)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
@@ -584,7 +584,7 @@ stdio_file_read (struct ui_file *file, char *buf, long length_buf)
static void
stdio_file_write (struct ui_file *file, const char *buf, long length_buf)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
@@ -600,7 +600,7 @@ static void
stdio_file_write_async_safe (struct ui_file *file,
const char *buf, long length_buf)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
{
@@ -623,7 +623,7 @@ stdio_file_write_async_safe (struct ui_file *file,
static void
stdio_file_fputs (const char *linebuffer, struct ui_file *file)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
@@ -638,7 +638,7 @@ stdio_file_fputs (const char *linebuffer, struct ui_file *file)
static int
stdio_file_isatty (struct ui_file *file)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
@@ -649,7 +649,7 @@ stdio_file_isatty (struct ui_file *file)
static int
stdio_file_fseek (struct ui_file *file, long offset, int whence)
{
- struct stdio_file *stdio = ui_file_data (file);
+ struct stdio_file *stdio = (struct stdio_file *) ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
@@ -770,7 +770,7 @@ tee_file_new (struct ui_file *one, int close_one,
static void
tee_file_delete (struct ui_file *file)
{
- struct tee_file *tee = ui_file_data (file);
+ struct tee_file *tee = (struct tee_file *) ui_file_data (file);
if (tee->magic != &tee_file_magic)
internal_error (__FILE__, __LINE__,
@@ -786,7 +786,7 @@ tee_file_delete (struct ui_file *file)
static void
tee_file_flush (struct ui_file *file)
{
- struct tee_file *tee = ui_file_data (file);
+ struct tee_file *tee = (struct tee_file *) ui_file_data (file);
if (tee->magic != &tee_file_magic)
internal_error (__FILE__, __LINE__,
@@ -798,7 +798,7 @@ tee_file_flush (struct ui_file *file)
static void
tee_file_write (struct ui_file *file, const char *buf, long length_buf)
{
- struct tee_file *tee = ui_file_data (file);
+ struct tee_file *tee = (struct tee_file *) ui_file_data (file);
if (tee->magic != &tee_file_magic)
internal_error (__FILE__, __LINE__,
@@ -810,7 +810,7 @@ tee_file_write (struct ui_file *file, const char *buf, long length_buf)
static void
tee_file_fputs (const char *linebuffer, struct ui_file *file)
{
- struct tee_file *tee = ui_file_data (file);
+ struct tee_file *tee = (struct tee_file *) ui_file_data (file);
if (tee->magic != &tee_file_magic)
internal_error (__FILE__, __LINE__,
@@ -822,7 +822,7 @@ tee_file_fputs (const char *linebuffer, struct ui_file *file)
static int
tee_file_isatty (struct ui_file *file)
{
- struct tee_file *tee = ui_file_data (file);
+ struct tee_file *tee = (struct tee_file *) ui_file_data (file);
if (tee->magic != &tee_file_magic)
internal_error (__FILE__, __LINE__,
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index a87c1d3..881a56e 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -360,7 +360,7 @@ and before table_body."));
static void
do_cleanup_table_end (void *data)
{
- struct ui_out *ui_out = data;
+ struct ui_out *ui_out = (struct ui_out *) data;
ui_out_table_end (ui_out);
}
@@ -429,7 +429,8 @@ struct ui_out_end_cleanup_data
static void
do_cleanup_end (void *data)
{
- struct ui_out_end_cleanup_data *end_cleanup_data = data;
+ struct ui_out_end_cleanup_data *end_cleanup_data
+ = (struct ui_out_end_cleanup_data *) data;
ui_out_end (end_cleanup_data->uiout, end_cleanup_data->type);
xfree (end_cleanup_data);
diff --git a/gdb/user-regs.c b/gdb/user-regs.c
index 526814b..8e138f1 100644
--- a/gdb/user-regs.c
+++ b/gdb/user-regs.c
@@ -112,13 +112,14 @@ void
user_reg_add (struct gdbarch *gdbarch, const char *name,
user_reg_read_ftype *read, const void *baton)
{
- struct gdb_user_regs *regs = gdbarch_data (gdbarch, user_regs_data);
+ struct gdb_user_regs *regs
+ = (struct gdb_user_regs *) gdbarch_data (gdbarch, user_regs_data);
if (regs == NULL)
{
/* ULGH, called during architecture initialization. Patch
things up. */
- regs = user_regs_init (gdbarch);
+ regs = (struct gdb_user_regs *) user_regs_init (gdbarch);
deprecated_set_gdbarch_data (gdbarch, user_regs_data, regs);
}
append_user_reg (regs, name, read, baton,
@@ -154,7 +155,8 @@ user_reg_map_name_to_regnum (struct gdbarch *gdbarch, const char *name,
/* Search the user name space. */
{
- struct gdb_user_regs *regs = gdbarch_data (gdbarch, user_regs_data);
+ struct gdb_user_regs *regs
+ = (struct gdb_user_regs *) gdbarch_data (gdbarch, user_regs_data);
struct user_reg *reg;
int nr;
@@ -174,7 +176,8 @@ user_reg_map_name_to_regnum (struct gdbarch *gdbarch, const char *name,
static struct user_reg *
usernum_to_user_reg (struct gdbarch *gdbarch, int usernum)
{
- struct gdb_user_regs *regs = gdbarch_data (gdbarch, user_regs_data);
+ struct gdb_user_regs *regs
+ = (struct gdb_user_regs *) gdbarch_data (gdbarch, user_regs_data);
struct user_reg *reg;
for (reg = regs->first; reg != NULL; reg = reg->next)
@@ -226,7 +229,7 @@ maintenance_print_user_registers (char *args, int from_tty)
struct user_reg *reg;
int regnum;
- regs = gdbarch_data (gdbarch, user_regs_data);
+ regs = (struct gdb_user_regs *) gdbarch_data (gdbarch, user_regs_data);
regnum = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
fprintf_unfiltered (gdb_stdout, " %-11s %3s\n", "Name", "Nr");
diff --git a/gdb/utils.c b/gdb/utils.c
index 3bb82f0..c7f00d9 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -182,7 +182,7 @@ make_cleanup_dyn_string_delete (dyn_string_t arg)
static void
do_bfd_close_cleanup (void *arg)
{
- gdb_bfd_unref (arg);
+ gdb_bfd_unref ((bfd *) arg);
}
struct cleanup *
@@ -196,7 +196,7 @@ make_cleanup_bfd_unref (bfd *abfd)
static void
do_fclose_cleanup (void *arg)
{
- FILE *file = arg;
+ FILE *file = (FILE *) arg;
fclose (file);
}
@@ -214,7 +214,7 @@ make_cleanup_fclose (FILE *file)
static void
do_obstack_free (void *arg)
{
- struct obstack *ob = arg;
+ struct obstack *ob = (struct obstack *) arg;
obstack_free (ob, NULL);
}
@@ -230,7 +230,7 @@ make_cleanup_obstack_free (struct obstack *obstack)
static void
do_ui_file_delete (void *arg)
{
- ui_file_delete (arg);
+ ui_file_delete ((struct ui_file *) arg);
}
struct cleanup *
@@ -244,7 +244,7 @@ make_cleanup_ui_file_delete (struct ui_file *arg)
static void
do_ui_out_redirect_pop (void *arg)
{
- struct ui_out *uiout = arg;
+ struct ui_out *uiout = (struct ui_out *) arg;
if (ui_out_redirect (uiout, NULL) < 0)
warning (_("Cannot restore redirection of the current output protocol"));
@@ -262,7 +262,7 @@ make_cleanup_ui_out_redirect_pop (struct ui_out *uiout)
static void
do_free_section_addr_info (void *arg)
{
- free_section_addr_info (arg);
+ free_section_addr_info ((struct section_addr_info *) arg);
}
struct cleanup *
@@ -280,7 +280,8 @@ struct restore_integer_closure
static void
restore_integer (void *p)
{
- struct restore_integer_closure *closure = p;
+ struct restore_integer_closure *closure
+ = (struct restore_integer_closure *) p;
*(closure->variable) = closure->value;
}
@@ -313,7 +314,7 @@ make_cleanup_restore_uinteger (unsigned int *variable)
static void
do_unpush_target (void *arg)
{
- struct target_ops *ops = arg;
+ struct target_ops *ops = (struct target_ops *) arg;
unpush_target (ops);
}
@@ -331,7 +332,7 @@ make_cleanup_unpush_target (struct target_ops *ops)
static void
do_htab_delete_cleanup (void *htab_voidp)
{
- htab_t htab = htab_voidp;
+ htab_t htab = (htab_t) htab_voidp;
htab_delete (htab);
}
@@ -353,7 +354,8 @@ struct restore_ui_file_closure
static void
do_restore_ui_file (void *p)
{
- struct restore_ui_file_closure *closure = p;
+ struct restore_ui_file_closure *closure
+ = (struct restore_ui_file_closure *) p;
*(closure->variable) = closure->value;
}
@@ -394,7 +396,7 @@ make_cleanup_value_free_to_mark (struct value *mark)
static void
do_value_free (void *value)
{
- value_free (value);
+ value_free ((struct value *) value);
}
/* Free VALUE. */
@@ -410,7 +412,7 @@ make_cleanup_value_free (struct value *value)
static void
do_free_so (void *arg)
{
- struct so_list *so = arg;
+ struct so_list *so = (struct so_list *) arg;
free_so (so);
}
@@ -474,7 +476,7 @@ make_cleanup_clear_parser_state (struct parser_state **p)
void
free_current_contents (void *ptr)
{
- void **location = ptr;
+ void **location = (void **) ptr;
if (location == NULL)
internal_error (__FILE__, __LINE__,
@@ -1130,7 +1132,7 @@ make_hex_string (const gdb_byte *data, size_t length)
static void
do_regfree_cleanup (void *r)
{
- regfree (r);
+ regfree ((regex_t *) r);
}
/* Create a new cleanup that frees the compiled regular expression R. */
@@ -2781,7 +2783,7 @@ print_core_address (struct gdbarch *gdbarch, CORE_ADDR address)
hashval_t
core_addr_hash (const void *ap)
{
- const CORE_ADDR *addrp = ap;
+ const CORE_ADDR *addrp = (const CORE_ADDR *) ap;
return *addrp;
}
@@ -2791,8 +2793,8 @@ core_addr_hash (const void *ap)
int
core_addr_eq (const void *ap, const void *bp)
{
- const CORE_ADDR *addr_ap = ap;
- const CORE_ADDR *addr_bp = bp;
+ const CORE_ADDR *addr_ap = (const CORE_ADDR *) ap;
+ const CORE_ADDR *addr_bp = (const CORE_ADDR *) bp;
return *addr_ap == *addr_bp;
}
@@ -3198,7 +3200,7 @@ producer_is_gcc (const char *producer, int *major, int *minor)
static void
do_free_char_ptr_vec (void *arg)
{
- VEC (char_ptr) *char_ptr_vec = arg;
+ VEC (char_ptr) *char_ptr_vec = (VEC (char_ptr) *) arg;
free_char_ptr_vec (char_ptr_vec);
}
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 401c359..6c03dbd 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -1220,7 +1220,7 @@ v850_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct v850_frame_cache *) *this_cache;
cache = v850_alloc_frame_cache (this_frame);
*this_cache = cache;
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 74a06d9..92b0f33 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -2196,7 +2196,7 @@ free_variable (struct varobj *var)
static void
do_free_variable_cleanup (void *var)
{
- free_variable (var);
+ free_variable ((struct varobj *) var);
}
static struct cleanup *
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index db57bee..cf77ed9 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -71,7 +71,7 @@ static void
vax_supply_gregset (const struct regset *regset, struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- const gdb_byte *regs = gregs;
+ const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
for (i = 0; i < VAX_NUM_REGS; i++)
@@ -318,7 +318,7 @@ vax_frame_cache (struct frame_info *this_frame, void **this_cache)
int regnum;
if (*this_cache)
- return *this_cache;
+ return (struct vax_frame_cache *) *this_cache;
/* Allocate a new cache. */
cache = FRAME_OBSTACK_ZALLOC (struct vax_frame_cache);
diff --git a/gdb/vaxobsd-tdep.c b/gdb/vaxobsd-tdep.c
index 4e2701f..af3c7fa 100644
--- a/gdb/vaxobsd-tdep.c
+++ b/gdb/vaxobsd-tdep.c
@@ -87,7 +87,7 @@ vaxobsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
CORE_ADDR addr, base, func;
if (*this_cache)
- return *this_cache;
+ return (struct trad_frame_cache *) *this_cache;
cache = trad_frame_cache_zalloc (this_frame);
*this_cache = cache;
diff --git a/gdb/xml-support.c b/gdb/xml-support.c
index 211f745..e3d57d1 100644
--- a/gdb/xml-support.c
+++ b/gdb/xml-support.c
@@ -83,7 +83,7 @@ struct gdb_xml_parser
static void
gdb_xml_body_text (void *data, const XML_Char *text, int length)
{
- struct gdb_xml_parser *parser = data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data;
struct scope_level *scope = VEC_last (scope_level_s, parser->scopes);
if (parser->error.reason < 0)
@@ -156,7 +156,7 @@ xml_find_attribute (VEC(gdb_xml_value_s) *attributes, const char *name)
static void
gdb_xml_values_cleanup (void *data)
{
- VEC(gdb_xml_value_s) **values = data;
+ VEC(gdb_xml_value_s) **values = (VEC(gdb_xml_value_s) **) data;
struct gdb_xml_value *value;
int ix;
@@ -173,7 +173,7 @@ static void
gdb_xml_start_element (void *data, const XML_Char *name,
const XML_Char **attrs)
{
- struct gdb_xml_parser *parser = data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data;
struct scope_level *scope;
struct scope_level new_scope;
const struct gdb_xml_element *element;
@@ -312,7 +312,7 @@ static void
gdb_xml_start_element_wrapper (void *data, const XML_Char *name,
const XML_Char **attrs)
{
- struct gdb_xml_parser *parser = data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data;
if (parser->error.reason < 0)
return;
@@ -337,7 +337,7 @@ gdb_xml_start_element_wrapper (void *data, const XML_Char *name,
static void
gdb_xml_end_element (void *data, const XML_Char *name)
{
- struct gdb_xml_parser *parser = data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data;
struct scope_level *scope = VEC_last (scope_level_s, parser->scopes);
const struct gdb_xml_element *element;
unsigned int seen;
@@ -395,7 +395,7 @@ gdb_xml_end_element (void *data, const XML_Char *name)
static void
gdb_xml_end_element_wrapper (void *data, const XML_Char *name)
{
- struct gdb_xml_parser *parser = data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data;
if (parser->error.reason < 0)
return;
@@ -419,7 +419,7 @@ gdb_xml_end_element_wrapper (void *data, const XML_Char *name)
static void
gdb_xml_cleanup (void *arg)
{
- struct gdb_xml_parser *parser = arg;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) arg;
struct scope_level *scope;
int ix;
@@ -489,7 +489,8 @@ gdb_xml_fetch_external_entity (XML_Parser expat_parser,
const XML_Char *systemId,
const XML_Char *publicId)
{
- struct gdb_xml_parser *parser = XML_GetUserData (expat_parser);
+ struct gdb_xml_parser *parser
+ = (struct gdb_xml_parser *) XML_GetUserData (expat_parser);
XML_Parser entity_parser;
const char *text;
enum XML_Status status;
@@ -689,10 +690,12 @@ gdb_xml_parse_attr_enum (struct gdb_xml_parser *parser,
const struct gdb_xml_attribute *attribute,
const char *value)
{
- const struct gdb_xml_enum *enums = attribute->handler_data;
+ const struct gdb_xml_enum *enums
+ = (const struct gdb_xml_enum *) attribute->handler_data;
void *ret;
- for (enums = attribute->handler_data; enums->name != NULL; enums++)
+ for (enums = (const struct gdb_xml_enum *) attribute->handler_data;
+ enums->name != NULL; enums++)
if (strcasecmp (enums->name, value) == 0)
break;
@@ -754,8 +757,9 @@ xinclude_start_include (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct xinclude_parsing_data *data = user_data;
- char *href = xml_find_attribute (attributes, "href")->value;
+ struct xinclude_parsing_data *data
+ = (struct xinclude_parsing_data *) user_data;
+ char *href = (char *) xml_find_attribute (attributes, "href")->value;
struct cleanup *back_to;
char *text, *output;
@@ -789,7 +793,8 @@ xinclude_end_include (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct xinclude_parsing_data *data = user_data;
+ struct xinclude_parsing_data *data
+ = (struct xinclude_parsing_data *) user_data;
data->skip_depth--;
}
@@ -797,8 +802,9 @@ xinclude_end_include (struct gdb_xml_parser *parser,
static void XMLCALL
xml_xinclude_default (void *data_, const XML_Char *s, int len)
{
- struct gdb_xml_parser *parser = data_;
- struct xinclude_parsing_data *data = parser->user_data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data_;
+ struct xinclude_parsing_data *data
+ = (struct xinclude_parsing_data *) parser->user_data;
/* If we are inside of e.g. xi:include or the DTD, don't save this
string. */
@@ -815,8 +821,9 @@ xml_xinclude_start_doctype (void *data_, const XML_Char *doctypeName,
const XML_Char *sysid, const XML_Char *pubid,
int has_internal_subset)
{
- struct gdb_xml_parser *parser = data_;
- struct xinclude_parsing_data *data = parser->user_data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data_;
+ struct xinclude_parsing_data *data
+ = (struct xinclude_parsing_data *) parser->user_data;
/* Don't print out the doctype, or the contents of the DTD internal
subset, if any. */
@@ -826,8 +833,9 @@ xml_xinclude_start_doctype (void *data_, const XML_Char *doctypeName,
static void XMLCALL
xml_xinclude_end_doctype (void *data_)
{
- struct gdb_xml_parser *parser = data_;
- struct xinclude_parsing_data *data = parser->user_data;
+ struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data_;
+ struct xinclude_parsing_data *data
+ = (struct xinclude_parsing_data *) parser->user_data;
data->skip_depth--;
}
@@ -844,7 +852,7 @@ xml_xinclude_xml_decl (void *data_, const XML_Char *version,
static void
xml_xinclude_cleanup (void *data_)
{
- struct xinclude_parsing_data *data = data_;
+ struct xinclude_parsing_data *data = (struct xinclude_parsing_data *) data_;
obstack_free (&data->obstack, NULL);
xfree (data);
@@ -1015,7 +1023,7 @@ obstack_xml_printf (struct obstack *obstack, const char *format, ...)
char *
xml_fetch_content_from_file (const char *filename, void *baton)
{
- const char *dirname = baton;
+ const char *dirname = (const char *) baton;
FILE *file;
struct cleanup *back_to;
char *text;
diff --git a/gdb/xml-syscall.c b/gdb/xml-syscall.c
index 255d816..31a80a5 100644
--- a/gdb/xml-syscall.c
+++ b/gdb/xml-syscall.c
@@ -129,7 +129,7 @@ syscalls_info_free_syscalls_desc (struct syscall_desc *sd)
static void
free_syscalls_info (void *arg)
{
- struct syscalls_info *syscalls_info = arg;
+ struct syscalls_info *syscalls_info = (struct syscalls_info *) arg;
struct syscall_desc *sysdesc;
int i;
@@ -171,7 +171,7 @@ syscall_start_syscall (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct syscall_parsing_data *data = user_data;
+ struct syscall_parsing_data *data = (struct syscall_parsing_data *) user_data;
struct gdb_xml_value *attrs = VEC_address (gdb_xml_value_s, attributes);
int len, i;
/* syscall info. */
@@ -183,7 +183,7 @@ syscall_start_syscall (struct gdb_xml_parser *parser,
for (i = 0; i < len; i++)
{
if (strcmp (attrs[i].name, "name") == 0)
- name = attrs[i].value;
+ name = (char *) attrs[i].value;
else if (strcmp (attrs[i].name, "number") == 0)
number = * (ULONGEST *) attrs[i].value;
else
diff --git a/gdb/xml-tdesc.c b/gdb/xml-tdesc.c
index 65744ff..10c0d9e 100644
--- a/gdb/xml-tdesc.c
+++ b/gdb/xml-tdesc.c
@@ -101,7 +101,7 @@ tdesc_end_arch (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
const struct bfd_arch_info *arch;
arch = bfd_scan_arch (body_text);
@@ -118,7 +118,7 @@ tdesc_end_osabi (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
enum gdb_osabi osabi;
osabi = osabi_from_tdesc_string (body_text);
@@ -136,7 +136,7 @@ tdesc_end_compatible (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
const struct bfd_arch_info *arch;
arch = bfd_scan_arch (body_text);
@@ -150,7 +150,7 @@ tdesc_start_target (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- char *version = xml_find_attribute (attributes, "version")->value;
+ char *version = (char *) xml_find_attribute (attributes, "version")->value;
if (strcmp (version, "1.0") != 0)
gdb_xml_error (parser,
@@ -165,8 +165,8 @@ tdesc_start_feature (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
- char *name = xml_find_attribute (attributes, "name")->value;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+ char *name = (char *) xml_find_attribute (attributes, "name")->value;
data->current_feature = tdesc_create_feature (data->tdesc, name);
}
@@ -179,7 +179,7 @@ tdesc_start_reg (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
struct gdb_xml_value *attrs = VEC_address (gdb_xml_value_s, attributes);
int ix = 0, length;
char *name, *group, *type;
@@ -187,7 +187,7 @@ tdesc_start_reg (struct gdb_xml_parser *parser,
length = VEC_length (gdb_xml_value_s, attributes);
- name = attrs[ix++].value;
+ name = (char *) attrs[ix++].value;
bitsize = * (ULONGEST *) attrs[ix++].value;
if (ix < length && strcmp (attrs[ix].name, "regnum") == 0)
@@ -196,12 +196,12 @@ tdesc_start_reg (struct gdb_xml_parser *parser,
regnum = data->next_regnum;
if (ix < length && strcmp (attrs[ix].name, "type") == 0)
- type = attrs[ix++].value;
+ type = (char *) attrs[ix++].value;
else
type = "int";
if (ix < length && strcmp (attrs[ix].name, "group") == 0)
- group = attrs[ix++].value;
+ group = (char *) attrs[ix++].value;
else
group = NULL;
@@ -230,8 +230,8 @@ tdesc_start_union (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
- char *id = xml_find_attribute (attributes, "id")->value;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+ char *id = (char *) xml_find_attribute (attributes, "id")->value;
data->current_type = tdesc_create_union (data->current_feature, id);
data->current_type_size = 0;
@@ -246,8 +246,8 @@ tdesc_start_struct (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
- char *id = xml_find_attribute (attributes, "id")->value;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+ char *id = (char *) xml_find_attribute (attributes, "id")->value;
struct tdesc_type *type;
struct gdb_xml_value *attr;
@@ -271,8 +271,8 @@ tdesc_start_flags (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
- char *id = xml_find_attribute (attributes, "id")->value;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+ char *id = (char *) xml_find_attribute (attributes, "id")->value;
int length = (int) * (ULONGEST *)
xml_find_attribute (attributes, "size")->value;
struct tdesc_type *type;
@@ -292,17 +292,17 @@ tdesc_start_field (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
struct gdb_xml_value *attr;
struct tdesc_type *field_type;
char *field_name, *field_type_id;
int start, end;
- field_name = xml_find_attribute (attributes, "name")->value;
+ field_name = (char *) xml_find_attribute (attributes, "name")->value;
attr = xml_find_attribute (attributes, "type");
if (attr != NULL)
- field_type_id = attr->value;
+ field_type_id = (char *) attr->value;
else
field_type_id = NULL;
@@ -385,14 +385,14 @@ tdesc_start_vector (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
struct gdb_xml_value *attrs = VEC_address (gdb_xml_value_s, attributes);
struct tdesc_type *field_type;
char *id, *field_type_id;
int count;
- id = attrs[0].value;
- field_type_id = attrs[1].value;
+ id = (char *) attrs[0].value;
+ field_type_id = (char *) attrs[1].value;
count = * (ULONGEST *) attrs[2].value;
field_type = tdesc_named_type (data->current_feature, field_type_id);
@@ -598,7 +598,7 @@ file_read_description_xml (const char *filename)
static char *
fetch_available_features_from_target (const char *name, void *baton_)
{
- struct target_ops *ops = baton_;
+ struct target_ops *ops = (struct target_ops *) baton_;
/* Read this object as a string. This ensures that a NUL
terminator is added. */
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 92e3b37..ee28e42 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -678,7 +678,7 @@ xstormy16_frame_cache (struct frame_info *this_frame, void **this_cache)
int i;
if (*this_cache)
- return *this_cache;
+ return (struct xstormy16_frame_cache *) *this_cache;
cache = xstormy16_alloc_frame_cache ();
*this_cache = cache;
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index c3b22e0..a24fb25 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -851,7 +851,7 @@ xtensa_supply_gregset (const struct regset *regset,
const void *gregs,
size_t len)
{
- const xtensa_elf_gregset_t *regs = gregs;
+ const xtensa_elf_gregset_t *regs = (const xtensa_elf_gregset_t *) gregs;
struct gdbarch *gdbarch = get_regcache_arch (rc);
int i;
@@ -1272,7 +1272,7 @@ xtensa_frame_cache (struct frame_info *this_frame, void **this_cache)
int windowed, ps_regnum;
if (*this_cache)
- return *this_cache;
+ return (struct xtensa_frame_cache *) *this_cache;
pc = get_frame_register_unsigned (this_frame, gdbarch_pc_regnum (gdbarch));
ps_regnum = gdbarch_ps_regnum (gdbarch);
@@ -1452,7 +1452,7 @@ xtensa_frame_prev_register (struct frame_info *this_frame,
if (*this_cache == NULL)
*this_cache = xtensa_frame_cache (this_frame, this_cache);
- cache = *this_cache;
+ cache = (struct xtensa_frame_cache *) *this_cache;
if (regnum ==gdbarch_pc_regnum (gdbarch))
saved_reg = cache->ra;
@@ -1566,7 +1566,7 @@ xtensa_extract_return_value (struct type *type,
void *dst)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- bfd_byte *valbuf = dst;
+ bfd_byte *valbuf = (bfd_byte *) dst;
int len = TYPE_LENGTH (type);
ULONGEST pc, wb;
int callsize, areg;
@@ -1622,7 +1622,7 @@ xtensa_store_return_value (struct type *type,
const void *dst)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- const bfd_byte *valbuf = dst;
+ const bfd_byte *valbuf = (const bfd_byte *) dst;
unsigned int areg;
ULONGEST pc, wb;
int callsize;
--
2.5.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/2] Add some more casts (2/2)
2015-09-25 18:19 ` Simon Marchi
@ 2015-09-28 15:45 ` Ulrich Weigand
2015-09-28 17:14 ` Simon Marchi
0 siblings, 1 reply; 12+ messages in thread
From: Ulrich Weigand @ 2015-09-28 15:45 UTC (permalink / raw)
To: Simon Marchi; +Cc: Yao Qi, gdb-patches
Simon Marchi wrote:
> @@ -1350,7 +1352,7 @@ ppu2spu_sniffer (const struct frame_unwind *self,
> info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
> info.byte_order = BFD_ENDIAN_BIG;
> info.osabi = GDB_OSABI_LINUX;
> - info.tdep_info = (void *) &data.id;
> + info.tdep_info = (struct gdbarch_tdep_info *) &data.id;
> data.gdbarch = gdbarch_find_by_info (info);
> if (!data.gdbarch)
> return 0;
This causes compilation to fail (with the RHEL5 system compiler):
gdb/ppc-linux-tdep.c: In function 'ppu2spu_sniffer':
gdb/ppc-linux-tdep.c:1355: warning: type-punning to incomplete type might break strict-aliasing rules
The problem seems to be that "struct gdbarch_tdep_info" actually
does not exist and is not defined anywhere. The info.tdep_info
field is used as a generic pointer; different architectures use
it for diffferent purposes.
Maybe in this case the correct fix would be to leave the (void *)
casts in place and actually change the type of the field to void * ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/2] Add some more casts (2/2)
2015-09-28 15:45 ` Ulrich Weigand
@ 2015-09-28 17:14 ` Simon Marchi
2015-09-30 14:53 ` Simon Marchi
0 siblings, 1 reply; 12+ messages in thread
From: Simon Marchi @ 2015-09-28 17:14 UTC (permalink / raw)
To: Ulrich Weigand; +Cc: Yao Qi, gdb-patches
On 15-09-28 11:45 AM, Ulrich Weigand wrote:
> Simon Marchi wrote:
>
>> @@ -1350,7 +1352,7 @@ ppu2spu_sniffer (const struct frame_unwind *self,
>> info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
>> info.byte_order = BFD_ENDIAN_BIG;
>> info.osabi = GDB_OSABI_LINUX;
>> - info.tdep_info = (void *) &data.id;
>> + info.tdep_info = (struct gdbarch_tdep_info *) &data.id;
>> data.gdbarch = gdbarch_find_by_info (info);
>> if (!data.gdbarch)
>> return 0;
>
> This causes compilation to fail (with the RHEL5 system compiler):
>
> gdb/ppc-linux-tdep.c: In function 'ppu2spu_sniffer':
> gdb/ppc-linux-tdep.c:1355: warning: type-punning to incomplete type might break strict-aliasing rules
>
> The problem seems to be that "struct gdbarch_tdep_info" actually
> does not exist and is not defined anywhere. The info.tdep_info
> field is used as a generic pointer; different architectures use
> it for diffferent purposes.
>
> Maybe in this case the correct fix would be to leave the (void *)
> casts in place and actually change the type of the field to void * ...
>
> Bye,
> Ulrich
Thanks for pointing this out. I was able to reproduce it using a Centos 5
docker container.
Changing the field and the cast to void* is ok to me. I don't see any real
value in casting to a pointer to a type that doesn't exist. Any other
opinions?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/2] Add some more casts (2/2)
2015-09-28 17:14 ` Simon Marchi
@ 2015-09-30 14:53 ` Simon Marchi
2015-09-30 15:16 ` Ulrich Weigand
0 siblings, 1 reply; 12+ messages in thread
From: Simon Marchi @ 2015-09-30 14:53 UTC (permalink / raw)
To: Ulrich Weigand; +Cc: Yao Qi, gdb-patches
On 15-09-28 01:14 PM, Simon Marchi wrote:
> On 15-09-28 11:45 AM, Ulrich Weigand wrote:
>> Simon Marchi wrote:
>>
>>> @@ -1350,7 +1352,7 @@ ppu2spu_sniffer (const struct frame_unwind *self,
>>> info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
>>> info.byte_order = BFD_ENDIAN_BIG;
>>> info.osabi = GDB_OSABI_LINUX;
>>> - info.tdep_info = (void *) &data.id;
>>> + info.tdep_info = (struct gdbarch_tdep_info *) &data.id;
>>> data.gdbarch = gdbarch_find_by_info (info);
>>> if (!data.gdbarch)
>>> return 0;
>>
>> This causes compilation to fail (with the RHEL5 system compiler):
>>
>> gdb/ppc-linux-tdep.c: In function 'ppu2spu_sniffer':
>> gdb/ppc-linux-tdep.c:1355: warning: type-punning to incomplete type might break strict-aliasing rules
>>
>> The problem seems to be that "struct gdbarch_tdep_info" actually
>> does not exist and is not defined anywhere. The info.tdep_info
>> field is used as a generic pointer; different architectures use
>> it for diffferent purposes.
>>
>> Maybe in this case the correct fix would be to leave the (void *)
>> casts in place and actually change the type of the field to void * ...
>>
>> Bye,
>> Ulrich
>
> Thanks for pointing this out. I was able to reproduce it using a Centos 5
> docker container.
>
> Changing the field and the cast to void* is ok to me. I don't see any real
> value in casting to a pointer to a type that doesn't exist. Any other
> opinions?
Here is the proposed fix. Ok to push?
From 6878d6f114544cc58f5065b66026a706108debc5 Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@ericsson.com>
Date: Wed, 30 Sep 2015 10:14:09 -0400
Subject: [PATCH] gdbarch.h: Change gdbarch_info::tdep_info's type to void *
As reported by Ulrich here:
https://sourceware.org/ml/gdb-patches/2015-09/msg00604.html
The system compiler (gcc 4.1) in Centos 5 doesn't like that we cast to a
pointer to a type that doesn't exist. I see no real value in using this
kind iof construct over just using void *. So this patch changes the
tdep_info field to void * and removes the casts. Even in C++, we
should not need an explicit cast when assigning to a void *.
gdb/ChangeLog:
* gdbarch.sh (struct gdbarch_info): Change tdep_info's type to void *.
* gdbarch.h: Regenerate.
* i386-tdep.c (i386_gdbarch_init): Remove cast to
struct gdbarch_tdep_info *.
* mips-tdep.c (mips_gdbarch_init): Likewise.
* ppc-linux-tdep (ppu2spu_sniffer): Likewise.
* rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
* spu-multiarch.c (spu_gdbarch): Likewise.
---
gdb/gdbarch.h | 2 +-
gdb/gdbarch.sh | 2 +-
gdb/i386-tdep.c | 2 +-
gdb/mips-tdep.c | 2 +-
gdb/ppc-linux-tdep.c | 2 +-
gdb/rs6000-tdep.c | 2 +-
gdb/spu-multiarch.c | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 82e0259..2e4ed3e 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1561,7 +1561,7 @@ struct gdbarch_info
bfd *abfd;
/* Use default: NULL (ZERO). */
- struct gdbarch_tdep_info *tdep_info;
+ void *tdep_info;
/* Use default: GDB_OSABI_UNINITIALIZED (-1). */
enum gdb_osabi osabi;
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 388920f..a13d9b9 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -1429,7 +1429,7 @@ struct gdbarch_info
bfd *abfd;
/* Use default: NULL (ZERO). */
- struct gdbarch_tdep_info *tdep_info;
+ void *tdep_info;
/* Use default: GDB_OSABI_UNINITIALIZED (-1). */
enum gdb_osabi osabi;
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 2ac2f15..92f60fd 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -8478,7 +8478,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_insn_is_jump (gdbarch, i386_insn_is_jump);
/* Hook in ABI-specific overrides, if they have been registered. */
- info.tdep_info = (struct gdbarch_tdep_info *) tdesc_data;
+ info.tdep_info = tdesc_data;
gdbarch_init_osabi (info, gdbarch);
if (!i386_validate_tdesc_p (tdep, tdesc_data))
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 388513e..2275138 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -8898,7 +8898,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
mips_register_g_packet_guesses (gdbarch);
/* Hook in OS ABI-specific overrides, if they have been registered. */
- info.tdep_info = (struct gdbarch_tdep_info *) tdesc_data;
+ info.tdep_info = tdesc_data;
gdbarch_init_osabi (info, gdbarch);
/* The hook may have adjusted num_regs, fetch the final value and
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index ae5edc2..460c503 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -1352,7 +1352,7 @@ ppu2spu_sniffer (const struct frame_unwind *self,
info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
info.byte_order = BFD_ENDIAN_BIG;
info.osabi = GDB_OSABI_LINUX;
- info.tdep_info = (struct gdbarch_tdep_info *) &data.id;
+ info.tdep_info = &data.id;
data.gdbarch = gdbarch_find_by_info (info);
if (!data.gdbarch)
return 0;
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index b37e862..baf6b67 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -5993,7 +5993,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Hook in ABI-specific overrides, if they have been registered. */
info.target_desc = tdesc;
- info.tdep_info = (struct gdbarch_tdep_info *) tdesc_data;
+ info.tdep_info = tdesc_data;
gdbarch_init_osabi (info, gdbarch);
switch (info.osabi)
diff --git a/gdb/spu-multiarch.c b/gdb/spu-multiarch.c
index c61b271..73acdae 100644
--- a/gdb/spu-multiarch.c
+++ b/gdb/spu-multiarch.c
@@ -107,7 +107,7 @@ spu_gdbarch (int spufs_fd)
info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
info.byte_order = BFD_ENDIAN_BIG;
info.osabi = GDB_OSABI_LINUX;
- info.tdep_info = (struct gdbarch_tdep_info *) &spufs_fd;
+ info.tdep_info = &spufs_fd;
return gdbarch_find_by_info (info);
}
--
2.5.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/2] Add some more casts (2/2)
2015-09-30 14:53 ` Simon Marchi
@ 2015-09-30 15:16 ` Ulrich Weigand
2015-09-30 15:25 ` Simon Marchi
0 siblings, 1 reply; 12+ messages in thread
From: Ulrich Weigand @ 2015-09-30 15:16 UTC (permalink / raw)
To: Simon Marchi; +Cc: Yao Qi, gdb-patches
Simon Marchi wrote:
> As reported by Ulrich here:
>
> https://sourceware.org/ml/gdb-patches/2015-09/msg00604.html
>
> The system compiler (gcc 4.1) in Centos 5 doesn't like that we cast to a
> pointer to a type that doesn't exist. I see no real value in using this
> kind iof construct over just using void *. So this patch changes the
> tdep_info field to void * and removes the casts. Even in C++, we
> should not need an explicit cast when assigning to a void *.
>
> gdb/ChangeLog:
>
> * gdbarch.sh (struct gdbarch_info): Change tdep_info's type to void *.
> * gdbarch.h: Regenerate.
> * i386-tdep.c (i386_gdbarch_init): Remove cast to
> struct gdbarch_tdep_info *.
> * mips-tdep.c (mips_gdbarch_init): Likewise.
> * ppc-linux-tdep (ppu2spu_sniffer): Likewise.
> * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
> * spu-multiarch.c (spu_gdbarch): Likewise.
This is OK, thanks!
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/2] Add some more casts (2/2)
2015-09-30 15:16 ` Ulrich Weigand
@ 2015-09-30 15:25 ` Simon Marchi
0 siblings, 0 replies; 12+ messages in thread
From: Simon Marchi @ 2015-09-30 15:25 UTC (permalink / raw)
To: Ulrich Weigand; +Cc: Yao Qi, gdb-patches
On 15-09-30 11:16 AM, Ulrich Weigand wrote:
> Simon Marchi wrote:
>> As reported by Ulrich here:
>>
>> https://sourceware.org/ml/gdb-patches/2015-09/msg00604.html
>>
>> The system compiler (gcc 4.1) in Centos 5 doesn't like that we cast to a
>> pointer to a type that doesn't exist. I see no real value in using this
>> kind iof construct over just using void *. So this patch changes the
>> tdep_info field to void * and removes the casts. Even in C++, we
>> should not need an explicit cast when assigning to a void *.
>>
>> gdb/ChangeLog:
>>
>> * gdbarch.sh (struct gdbarch_info): Change tdep_info's type to void *.
>> * gdbarch.h: Regenerate.
>> * i386-tdep.c (i386_gdbarch_init): Remove cast to
>> struct gdbarch_tdep_info *.
>> * mips-tdep.c (mips_gdbarch_init): Likewise.
>> * ppc-linux-tdep (ppu2spu_sniffer): Likewise.
>> * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
>> * spu-multiarch.c (spu_gdbarch): Likewise.
>
> This is OK, thanks!
>
> Bye,
> Ulrich
>
Pushed, thanks!
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-09-30 15:25 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-23 19:31 [PATCH 2/2] Add some more casts (1/2) Simon Marchi
2015-09-23 19:31 ` [PATCH 3/2] Add some more casts (2/2) Simon Marchi
2015-09-25 13:20 ` Yao Qi
2015-09-25 18:19 ` Simon Marchi
2015-09-28 15:45 ` Ulrich Weigand
2015-09-28 17:14 ` Simon Marchi
2015-09-30 14:53 ` Simon Marchi
2015-09-30 15:16 ` Ulrich Weigand
2015-09-30 15:25 ` Simon Marchi
2015-09-25 13:17 ` [PATCH 2/2] Add some more casts (1/2) Yao Qi
2015-09-25 13:29 ` Simon Marchi
2015-09-25 18:18 ` Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox