s/get_regcache_arch (regcache)/regcache->arch ()/g

This patches removes get_regcache_arch, and use regache->arch () instead.
The motivation of this change is that I am going to move some basic stuff
into a base class of regcache.  I don't need to update "client" code
regcache->arch ().  On the other hand, this patch shortens the code a
little bit.

gdb:

2017-10-25  Yao Qi  <yao.qi@linaro.org>

	* aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
	regcache->arch () instead get_regcache_arch.
	* aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
	Likewise.
	(aarch64_fbsd_store_inferior_registers): Likewise.
	* aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
	(store_gregs_to_thread): Likewise.
	(fetch_fpregs_from_thread): Likewise.
	(store_fpregs_to_thread): Likewise.
	* aarch64-tdep.c (aarch64_extract_return_value): Likewise.
	(aarch64_store_return_value): Likewise.
	(aarch64_software_single_step): Likewise.
	* aix-thread.c (aix_thread_wait): Likewise.
	(supply_reg32): Likewise.
	(supply_sprs64): Likewise.
	(supply_sprs32): Likewise.
	(fill_gprs64): Likewise.
	(fill_gprs32): Likewise.
	(fill_sprs64): Likewise.
	(fill_sprs32): Likewise.
	(store_regs_user_thread): Likewise.
	(store_regs_kernel_thread): Likewise.
	* alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
	(alphabsd_store_inferior_registers): Likewise.
	* alpha-tdep.c (alpha_extract_return_value): Likewise.
	(alpha_store_return_value): Likewise.
	(alpha_deal_with_atomic_sequence): Likewise.
	(alpha_next_pc): Likewise.
	(alpha_software_single_step): Likewise.
	* amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
	(amd64bsd_store_inferior_registers): Likewise.
	* amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
	Likewise.
	(amd64_linux_store_inferior_registers): Likewise.
	* amd64-nat.c (amd64_supply_native_gregset): Likewise.
	(amd64_collect_native_gregset): Likewise.
	* amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
	(amd64obsd_collect_uthread): Likewise.
	* amd64-tdep.c (amd64_supply_fpregset): Likewise.
	(amd64_collect_fpregset): Likewise.
	(amd64_supply_fxsave): Likewise.
	(amd64_supply_xsave): Likewise.
	(amd64_collect_fxsave): Likewise.
	(amd64_collect_xsave): Likewise.
	* arc-tdep.c (arc_write_pc): Likewise.
	* arch-utils.c (default_skip_permanent_breakpoint): Likewise.
	* arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
	(arm_fbsd_store_inferior_registers): Likewise.
	* arm-linux-nat.c (fetch_vfp_regs): Likewise.
	(store_vfp_regs): Likewise.
	(arm_linux_fetch_inferior_registers): Likewise.
	(arm_linux_store_inferior_registers): Likewise.
	* arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
	(arm_linux_sigreturn_next_pc): Likewise.
	(arm_linux_get_next_pcs_syscall_next_pc): Likewise.
	* arm-nbsd-nat.c (arm_supply_gregset): Likewise.
	(fetch_register): Likewise.
	(store_register): Likewise.
	* arm-tdep.c (arm_is_thumb): Likewise.
	(displaced_in_arm_mode): Likewise.
	(bx_write_pc): Likewise.
	(arm_get_next_pcs_addr_bits_remove): Likewise.
	(arm_software_single_step): Likewise.
	(arm_extract_return_value): Likewise.
	(arm_store_return_value): Likewise.
	(arm_write_pc): Likewise.
	* bfin-tdep.c (bfin_extract_return_value): Likewise.
	* bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
	(bsd_uthread_store_registers): Likewise.
	* core-regset.c (fetch_core_registers): Likewise.
	* corelow.c (get_core_registers): Likewise.
	* cris-tdep.c (cris_store_return_value): Likewise.
	(cris_extract_return_value): Likewise.
	(find_step_target): Likewise.
	(find_step_target): Likewise.
	(cris_software_single_step): Likewise.
	* ctf.c (ctf_fetch_registers): Likewise.
	* darwin-nat.c (cancel_breakpoint): Likewise.
	* fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
	* frv-tdep.c (frv_extract_return_value): Likewise.
	* ft32-tdep.c (ft32_store_return_value): Likewise.
	(ft32_extract_return_value): Likewise.
	* go32-nat.c (fetch_register): Likewise.
	(go32_fetch_registers): Likewise.
	(go32_store_registers): Likewise.
	(store_register): Likewise.
	* h8300-tdep.c (h8300_extract_return_value): Likewise.
	(h8300_store_return_value): Likewise.
	* hppa-linux-nat.c (fetch_register): Likewise.
	(store_register): Likewise.
	(hppa_linux_fetch_inferior_registers): Likewise.
	(hppa_linux_store_inferior_registers): Likewise.
	* i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
	(i386_darwin_store_inferior_registers): Likewise.
	* i386-gnu-nat.c (gnu_fetch_registers): Likewise.
	(gnu_store_registers): Likewise.
	* i386-linux-nat.c (fetch_register): Likewise.
	(store_register): Likewise.
	(supply_gregset): Likewise.
	(fill_gregset): Likewise.
	(i386_linux_fetch_inferior_registers): Likewise.
	(i386_linux_store_inferior_registers): Likewise.
	(i386_linux_resume): Likewise.
	* i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
	Likewise.
	* i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
	* i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
	* i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
	(i386obsd_collect_uthread): Likewise.
	* i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
	(i386_supply_gregset): Likewise.
	(i386_collect_gregset): Likewise.
	(i386_supply_fpregset): Likewise.
	(i386_collect_fpregset): Likewise.
	(i386_mpx_bd_base): Likewise.
	* i386-v4-nat.c	(supply_fpregset): Likewise.
	(fill_fpregset): 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-linux-nat.c (ia64_linux_fetch_registers): Likewise.
	(ia64_linux_store_registers): Likewise.
	* ia64-tdep.c (ia64_access_rse_reg): Likewise.
	(ia64_extract_return_value): Likewise.
	(ia64_store_return_value): Likewise.
	(find_func_descr): Likewise.
	* inf-child.c (inf_child_fetch_inferior_registers): Likewise.
	* inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
	(inf_ptrace_store_registers): Likewise.
	* infrun.c (use_displaced_stepping): Likewise.
	(displaced_step_prepare_throw): Likewise.
	(resume): Likewise.
	(proceed): Likewise.
	(do_target_wait): Likewise.
	(adjust_pc_after_break): Likewise.
	(handle_inferior_event_1): Likewise.
	(handle_signal_stop): Likewise.
	(save_infcall_suspend_state): Likewise.
	(restore_infcall_suspend_state): Likewise.
	* iq2000-tdep.c (iq2000_extract_return_value): Likewise.
	* jit.c (jit_frame_prev_register): Likewise.
	* linux-nat.c (save_stop_reason): Likewise.
	(linux_nat_wait_1): Likewise.
	(resume_stopped_resumed_lwps): Likewise.
	* linux-record.c (record_linux_sockaddr): Likewise.
	(record_linux_msghdr): Likewise.
	(record_linux_system_call): Likewise.
	* linux-tdep.c (linux_collect_thread_registers): Likewise.
	* lm32-tdep.c (lm32_extract_return_value): Likewise.
	(lm32_store_return_value): Likewise.
	* m32c-tdep.c (m32c_read_flg): Likewise.
	(m32c_pseudo_register_read): Likewise.
	(m32c_pseudo_register_write): Likewise.
	* m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
	(m32r_linux_collect_gregset): Likewise.
	* m32r-tdep.c (m32r_store_return_value): Likewise.
	(m32r_extract_return_value): Likewise.
	* m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
	(m68kbsd_collect_fpregset): Likewise.
	* m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
	* m68k-linux-nat.c (fetch_register): Likewise.
	(old_fetch_inferior_registers): Likewise.
	(old_store_inferior_registers): Likewise.
	(store_regs): Likewise.
	* m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
	(m68k_svr4_store_return_value): Likewise.
	* m88k-tdep.c (m88k_store_arguments): Likewise.
	* mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
	(mi_cmd_data_write_register_values): Likewise.
	* mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
	(mips_fbsd_store_inferior_registers): Likewise.
	* mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
	(mips_fbsd_supply_gregs): Likewise.
	(mips_fbsd_collect_fpregs): Likewise.
	(mips_fbsd_collect_gregs): Likewise.
	(mips_fbsd_supply_fpregset): Likewise.
	(mips_fbsd_collect_fpregset): Likewise.
	(mips_fbsd_supply_gregset): Likewise.
	(mips_fbsd_collect_gregset): Likewise.
	* mips-linux-nat.c (supply_gregset): Likewise.
	(fill_gregset): Likewise.
	(supply_fpregset): Likewise.
	(fill_fpregset): Likewise.
	* mips-linux-tdep.c (mips_supply_gregset): Likewise.
	(mips_fill_gregset): Likewise.
	(mips_supply_fpregset): Likewise.
	(mips_fill_fpregset): Likewise.
	(mips64_supply_gregset): Likewise.
	(micromips_linux_sigframe_validate): Likewise.
	* mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
	(mipsnbsd_fetch_inferior_registers): Likewise.
	(mipsnbsd_store_inferior_registers): Likewise.
	* mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
	(mipsnbsd_supply_gregset): Likewise.
	(mipsnbsd_iterate_over_regset_sections): Likewise.
	(mipsnbsd_supply_reg): Likewise.
	(mipsnbsd_supply_fpreg): Likewise.
	* mips-tdep.c (mips_in_frame_stub): Likewise.
	(mips_dummy_id): Likewise.
	(is_octeon_bbit_op): Likewise.
	(micromips_bc1_pc): Likewise.
	(extended_mips16_next_pc): Likewise.
	(mips16_next_pc): Likewise.
	(deal_with_atomic_sequence): Likewise.
	* moxie-tdep.c (moxie_process_readu): Likewise.
	* nios2-tdep.c (nios2_get_next_pc): Likewise.
	* nto-procfs.c (procfs_store_registers): Likewise.
	* ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
	(ppcfbsd_store_inferior_registers): Likewise.
	* ppc-linux-nat.c (fetch_vsx_register): Likewise.
	(fetch_altivec_register): Likewise.
	(get_spe_registers): Likewise.
	(fetch_spe_register): Likewise.
	(fetch_altivec_registers): Likewise.
	(fetch_all_gp_regs): Likewise.
	(fetch_all_fp_regs): Likewise.
	(store_vsx_register): Likewise.
	(store_altivec_register): Likewise.
	(set_spe_registers): Likewise.
	(store_spe_register): Likewise.
	(store_altivec_registers): Likewise.
	(store_all_gp_regs): Likewise.
	(store_all_fp_regs): Likewise.
	* ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
	(ppc_linux_collect_gregset): Likewise.
	(ppc_canonicalize_syscall): Likewise.
	(ppc_linux_record_signal): Likewise.
	(ppu2spu_prev_register): Likewise.
	* ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
	* ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
	(ppcobsd_store_registers): Likewise.
	* ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
	Likewise.
	(ppc_ravenscar_generic_store_registers): Likewise.
	* procfs.c (procfs_fetch_registers): Likewise.
	(procfs_store_registers): Likewise.
	* ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
	(ravenscar_store_registers): Likewise.
	(ravenscar_prepare_to_store): Likewise.
	* record-btrace.c (record_btrace_fetch_registers): Likewise.
	* record-full.c (record_full_wait_1): Likewise.
	(record_full_registers_change): Likewise.
	(record_full_store_registers): Likewise.
	(record_full_core_fetch_registers): Likewise.
	(record_full_save): Likewise.
	(record_full_goto_insn): Likewise.
	* regcache.c (regcache_register_size): Likewise.
	(get_regcache_arch): Remove.
	(regcache_read_pc): Likewise.
	* regcache.h (get_regcache_arch): Remove.
	* remote-sim.c (gdbsim_fetch_register): Likewise.
	(gdbsim_store_register): Likewise.
	* remote.c (fetch_register_using_p): Likewise.
	(send_g_packet): Likewise.
	(remote_prepare_to_store): Likewise.
	(store_registers_using_G): Likewise.
	* reverse.c (save_bookmark_command): Likewise.
	(goto_bookmark_command): Likewise.
	* rs6000-aix-tdep.c (branch_dest): Likewise.
	* rs6000-nat.c (rs6000_ptrace64): Likewise.
	(fetch_register): Likewise.
	* rs6000-tdep.c (ppc_supply_reg): Likewise.
	(ppc_collect_reg): Likewise.
	(ppc_collect_gregset): Likewise.
	(ppc_collect_fpregset): Likewise.
	(ppc_collect_vsxregset): Likewise.
	(ppc_collect_vrregset): Likewise.
	(ppc_displaced_step_hw_singlestep): Likewise.
	(rs6000_pseudo_register_read): Likewise.
	(rs6000_pseudo_register_write): Likewise.
	* s390-linux-nat.c (supply_gregset): Likewise.
	(fill_gregset): Likewise.
	(s390_linux_fetch_inferior_registers): Likewise.
	* s390-linux-tdep.c (s390_write_pc): Likewise.
	(s390_software_single_step): Likewise.
	(s390_all_but_pc_registers_record): Likewise.
	(s390_linux_syscall_record): Likewise.
	* sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
	* sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
	(shnbsd_store_inferior_registers): Likewise.
	* sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
	(sh_extract_return_value_fpu): Likewise.
	(sh_store_return_value_nofpu): Likewise.
	(sh_corefile_supply_regset): Likewise.
	(sh_corefile_collect_regset): Likewise.
	* sh64-tdep.c (sh64_extract_return_value): Likewise.
	(sh64_store_return_value): Likewise.
	* sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
	* sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
	(sparc_store_inferior_registers): Likewise.
	* sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
	(sparc_ravenscar_prepare_to_store): Likewise.
	* sparc-tdep.c (sparc32_store_arguments): Likewise.
	(sparc_analyze_control_transfer): Likewise.
	(sparc_step_trap): Likewise.
	(sparc_software_single_step): Likewise.
	(sparc32_gdbarch_init): Likewise.
	(sparc_supply_rwindow): Likewise.
	(sparc_collect_rwindow): Likewise.
	* sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
	* sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
	(sparc64nbsd_collect_gregset): Likewise.
	(sparc64nbsd_supply_fpregset): Likewise.
	(sparc64nbsd_collect_fpregset): Likewise.
	* sparc64-tdep.c (sparc64_store_arguments): Likewise.
	(sparc64_supply_gregset): Likewise.
	(sparc64_collect_gregset): Likewise.
	(sparc64_supply_fpregset): Likewise.
	(sparc64_collect_fpregset): Likewise.
	* spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
	* spu-tdep.c (spu_unwind_sp): Likewise.
	(spu2ppu_prev_register): Likewise.
	(spu_memory_remove_breakpoint): Likewise.
	* stack.c (return_command): Likewise.
	* tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
	* tracefile-tfile.c (tfile_fetch_registers): Likewise.
	* tracefile.c (trace_save_ctf): Likewise.
	* windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
	(do_windows_store_inferior_registers): Likewise.
	(windows_resume): Likewise.
	* xtensa-linux-nat.c (fill_gregset): Likewise.
	(supply_gregset_reg): Likewise.
	* xtensa-tdep.c (xtensa_register_write_masked): Likewise.
	(xtensa_register_read_masked): Likewise.
	(xtensa_supply_gregset): Likewise.
	(xtensa_extract_return_value): Likewise.
	(xtensa_store_return_value): Likewise.
This commit is contained in:
Yao Qi 2017-10-25 16:37:03 +01:00
parent edd079d9f6
commit ac7936dfd0
118 changed files with 738 additions and 416 deletions

View File

@ -1,3 +1,336 @@
2017-10-25 Yao Qi <yao.qi@linaro.org>
* aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
regcache->arch () instead get_regcache_arch.
* aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
Likewise.
(aarch64_fbsd_store_inferior_registers): Likewise.
* aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
(store_gregs_to_thread): Likewise.
(fetch_fpregs_from_thread): Likewise.
(store_fpregs_to_thread): Likewise.
* aarch64-tdep.c (aarch64_extract_return_value): Likewise.
(aarch64_store_return_value): Likewise.
(aarch64_software_single_step): Likewise.
* aix-thread.c (aix_thread_wait): Likewise.
(supply_reg32): Likewise.
(supply_sprs64): Likewise.
(supply_sprs32): Likewise.
(fill_gprs64): Likewise.
(fill_gprs32): Likewise.
(fill_sprs64): Likewise.
(fill_sprs32): Likewise.
(store_regs_user_thread): Likewise.
(store_regs_kernel_thread): Likewise.
* alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
(alphabsd_store_inferior_registers): Likewise.
* alpha-tdep.c (alpha_extract_return_value): Likewise.
(alpha_store_return_value): Likewise.
(alpha_deal_with_atomic_sequence): Likewise.
(alpha_next_pc): Likewise.
(alpha_software_single_step): Likewise.
* amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
(amd64bsd_store_inferior_registers): Likewise.
* amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
Likewise.
(amd64_linux_store_inferior_registers): Likewise.
* amd64-nat.c (amd64_supply_native_gregset): Likewise.
(amd64_collect_native_gregset): Likewise.
* amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
(amd64obsd_collect_uthread): Likewise.
* amd64-tdep.c (amd64_supply_fpregset): Likewise.
(amd64_collect_fpregset): Likewise.
(amd64_supply_fxsave): Likewise.
(amd64_supply_xsave): Likewise.
(amd64_collect_fxsave): Likewise.
(amd64_collect_xsave): Likewise.
* arc-tdep.c (arc_write_pc): Likewise.
* arch-utils.c (default_skip_permanent_breakpoint): Likewise.
* arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
(arm_fbsd_store_inferior_registers): Likewise.
* arm-linux-nat.c (fetch_vfp_regs): Likewise.
(store_vfp_regs): Likewise.
(arm_linux_fetch_inferior_registers): Likewise.
(arm_linux_store_inferior_registers): Likewise.
* arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
(arm_linux_sigreturn_next_pc): Likewise.
(arm_linux_get_next_pcs_syscall_next_pc): Likewise.
* arm-nbsd-nat.c (arm_supply_gregset): Likewise.
(fetch_register): Likewise.
(store_register): Likewise.
* arm-tdep.c (arm_is_thumb): Likewise.
(displaced_in_arm_mode): Likewise.
(bx_write_pc): Likewise.
(arm_get_next_pcs_addr_bits_remove): Likewise.
(arm_software_single_step): Likewise.
(arm_extract_return_value): Likewise.
(arm_store_return_value): Likewise.
(arm_write_pc): Likewise.
* bfin-tdep.c (bfin_extract_return_value): Likewise.
* bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
(bsd_uthread_store_registers): Likewise.
* core-regset.c (fetch_core_registers): Likewise.
* corelow.c (get_core_registers): Likewise.
* cris-tdep.c (cris_store_return_value): Likewise.
(cris_extract_return_value): Likewise.
(find_step_target): Likewise.
(find_step_target): Likewise.
(cris_software_single_step): Likewise.
* ctf.c (ctf_fetch_registers): Likewise.
* darwin-nat.c (cancel_breakpoint): Likewise.
* fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
* frv-tdep.c (frv_extract_return_value): Likewise.
* ft32-tdep.c (ft32_store_return_value): Likewise.
(ft32_extract_return_value): Likewise.
* go32-nat.c (fetch_register): Likewise.
(go32_fetch_registers): Likewise.
(go32_store_registers): Likewise.
(store_register): Likewise.
* h8300-tdep.c (h8300_extract_return_value): Likewise.
(h8300_store_return_value): Likewise.
* hppa-linux-nat.c (fetch_register): Likewise.
(store_register): Likewise.
(hppa_linux_fetch_inferior_registers): Likewise.
(hppa_linux_store_inferior_registers): Likewise.
* i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
(i386_darwin_store_inferior_registers): Likewise.
* i386-gnu-nat.c (gnu_fetch_registers): Likewise.
(gnu_store_registers): Likewise.
* i386-linux-nat.c (fetch_register): Likewise.
(store_register): Likewise.
(supply_gregset): Likewise.
(fill_gregset): Likewise.
(i386_linux_fetch_inferior_registers): Likewise.
(i386_linux_store_inferior_registers): Likewise.
(i386_linux_resume): Likewise.
* i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
Likewise.
* i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
* i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
* i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
(i386obsd_collect_uthread): Likewise.
* i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
(i386_supply_gregset): Likewise.
(i386_collect_gregset): Likewise.
(i386_supply_fpregset): Likewise.
(i386_collect_fpregset): Likewise.
(i386_mpx_bd_base): Likewise.
* i386-v4-nat.c (supply_fpregset): Likewise.
(fill_fpregset): 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-linux-nat.c (ia64_linux_fetch_registers): Likewise.
(ia64_linux_store_registers): Likewise.
* ia64-tdep.c (ia64_access_rse_reg): Likewise.
(ia64_extract_return_value): Likewise.
(ia64_store_return_value): Likewise.
(find_func_descr): Likewise.
* inf-child.c (inf_child_fetch_inferior_registers): Likewise.
* inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
(inf_ptrace_store_registers): Likewise.
* infrun.c (use_displaced_stepping): Likewise.
(displaced_step_prepare_throw): Likewise.
(resume): Likewise.
(proceed): Likewise.
(do_target_wait): Likewise.
(adjust_pc_after_break): Likewise.
(handle_inferior_event_1): Likewise.
(handle_signal_stop): Likewise.
(save_infcall_suspend_state): Likewise.
(restore_infcall_suspend_state): Likewise.
* iq2000-tdep.c (iq2000_extract_return_value): Likewise.
* jit.c (jit_frame_prev_register): Likewise.
* linux-nat.c (save_stop_reason): Likewise.
(linux_nat_wait_1): Likewise.
(resume_stopped_resumed_lwps): Likewise.
* linux-record.c (record_linux_sockaddr): Likewise.
(record_linux_msghdr): Likewise.
(record_linux_system_call): Likewise.
* linux-tdep.c (linux_collect_thread_registers): Likewise.
* lm32-tdep.c (lm32_extract_return_value): Likewise.
(lm32_store_return_value): Likewise.
* m32c-tdep.c (m32c_read_flg): Likewise.
(m32c_pseudo_register_read): Likewise.
(m32c_pseudo_register_write): Likewise.
* m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
(m32r_linux_collect_gregset): Likewise.
* m32r-tdep.c (m32r_store_return_value): Likewise.
(m32r_extract_return_value): Likewise.
* m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
(m68kbsd_collect_fpregset): Likewise.
* m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
* m68k-linux-nat.c (fetch_register): Likewise.
(old_fetch_inferior_registers): Likewise.
(old_store_inferior_registers): Likewise.
(store_regs): Likewise.
* m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
(m68k_svr4_store_return_value): Likewise.
* m88k-tdep.c (m88k_store_arguments): Likewise.
* mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
(mi_cmd_data_write_register_values): Likewise.
* mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
(mips_fbsd_store_inferior_registers): Likewise.
* mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
(mips_fbsd_supply_gregs): Likewise.
(mips_fbsd_collect_fpregs): Likewise.
(mips_fbsd_collect_gregs): Likewise.
(mips_fbsd_supply_fpregset): Likewise.
(mips_fbsd_collect_fpregset): Likewise.
(mips_fbsd_supply_gregset): Likewise.
(mips_fbsd_collect_gregset): Likewise.
* mips-linux-nat.c (supply_gregset): Likewise.
(fill_gregset): Likewise.
(supply_fpregset): Likewise.
(fill_fpregset): Likewise.
* mips-linux-tdep.c (mips_supply_gregset): Likewise.
(mips_fill_gregset): Likewise.
(mips_supply_fpregset): Likewise.
(mips_fill_fpregset): Likewise.
(mips64_supply_gregset): Likewise.
(micromips_linux_sigframe_validate): Likewise.
* mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
(mipsnbsd_fetch_inferior_registers): Likewise.
(mipsnbsd_store_inferior_registers): Likewise.
* mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
(mipsnbsd_supply_gregset): Likewise.
(mipsnbsd_iterate_over_regset_sections): Likewise.
(mipsnbsd_supply_reg): Likewise.
(mipsnbsd_supply_fpreg): Likewise.
* mips-tdep.c (mips_in_frame_stub): Likewise.
(mips_dummy_id): Likewise.
(is_octeon_bbit_op): Likewise.
(micromips_bc1_pc): Likewise.
(extended_mips16_next_pc): Likewise.
(mips16_next_pc): Likewise.
(deal_with_atomic_sequence): Likewise.
* moxie-tdep.c (moxie_process_readu): Likewise.
* nios2-tdep.c (nios2_get_next_pc): Likewise.
* nto-procfs.c (procfs_store_registers): Likewise.
* ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
(ppcfbsd_store_inferior_registers): Likewise.
* ppc-linux-nat.c (fetch_vsx_register): Likewise.
(fetch_altivec_register): Likewise.
(get_spe_registers): Likewise.
(fetch_spe_register): Likewise.
(fetch_altivec_registers): Likewise.
(fetch_all_gp_regs): Likewise.
(fetch_all_fp_regs): Likewise.
(store_vsx_register): Likewise.
(store_altivec_register): Likewise.
(set_spe_registers): Likewise.
(store_spe_register): Likewise.
(store_altivec_registers): Likewise.
(store_all_gp_regs): Likewise.
(store_all_fp_regs): Likewise.
* ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
(ppc_linux_collect_gregset): Likewise.
(ppc_canonicalize_syscall): Likewise.
(ppc_linux_record_signal): Likewise.
(ppu2spu_prev_register): Likewise.
* ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
* ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
(ppcobsd_store_registers): Likewise.
* ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
Likewise.
(ppc_ravenscar_generic_store_registers): Likewise.
* procfs.c (procfs_fetch_registers): Likewise.
(procfs_store_registers): Likewise.
* ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
(ravenscar_store_registers): Likewise.
(ravenscar_prepare_to_store): Likewise.
* record-btrace.c (record_btrace_fetch_registers): Likewise.
* record-full.c (record_full_wait_1): Likewise.
(record_full_registers_change): Likewise.
(record_full_store_registers): Likewise.
(record_full_core_fetch_registers): Likewise.
(record_full_save): Likewise.
(record_full_goto_insn): Likewise.
* regcache.c (regcache_register_size): Likewise.
(get_regcache_arch): Remove.
(regcache_read_pc): Likewise.
* regcache.h (get_regcache_arch): Remove.
* remote-sim.c (gdbsim_fetch_register): Likewise.
(gdbsim_store_register): Likewise.
* remote.c (fetch_register_using_p): Likewise.
(send_g_packet): Likewise.
(remote_prepare_to_store): Likewise.
(store_registers_using_G): Likewise.
* reverse.c (save_bookmark_command): Likewise.
(goto_bookmark_command): Likewise.
* rs6000-aix-tdep.c (branch_dest): Likewise.
* rs6000-nat.c (rs6000_ptrace64): Likewise.
(fetch_register): Likewise.
* rs6000-tdep.c (ppc_supply_reg): Likewise.
(ppc_collect_reg): Likewise.
(ppc_collect_gregset): Likewise.
(ppc_collect_fpregset): Likewise.
(ppc_collect_vsxregset): Likewise.
(ppc_collect_vrregset): Likewise.
(ppc_displaced_step_hw_singlestep): Likewise.
(rs6000_pseudo_register_read): Likewise.
(rs6000_pseudo_register_write): Likewise.
* s390-linux-nat.c (supply_gregset): Likewise.
(fill_gregset): Likewise.
(s390_linux_fetch_inferior_registers): Likewise.
* s390-linux-tdep.c (s390_write_pc): Likewise.
(s390_software_single_step): Likewise.
(s390_all_but_pc_registers_record): Likewise.
(s390_linux_syscall_record): Likewise.
* sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
* sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
(shnbsd_store_inferior_registers): Likewise.
* sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
(sh_extract_return_value_fpu): Likewise.
(sh_store_return_value_nofpu): Likewise.
(sh_corefile_supply_regset): Likewise.
(sh_corefile_collect_regset): Likewise.
* sh64-tdep.c (sh64_extract_return_value): Likewise.
(sh64_store_return_value): Likewise.
* sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
* sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
(sparc_store_inferior_registers): Likewise.
* sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
(sparc_ravenscar_prepare_to_store): Likewise.
* sparc-tdep.c (sparc32_store_arguments): Likewise.
(sparc_analyze_control_transfer): Likewise.
(sparc_step_trap): Likewise.
(sparc_software_single_step): Likewise.
(sparc32_gdbarch_init): Likewise.
(sparc_supply_rwindow): Likewise.
(sparc_collect_rwindow): Likewise.
* sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
* sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
(sparc64nbsd_collect_gregset): Likewise.
(sparc64nbsd_supply_fpregset): Likewise.
(sparc64nbsd_collect_fpregset): Likewise.
* sparc64-tdep.c (sparc64_store_arguments): Likewise.
(sparc64_supply_gregset): Likewise.
(sparc64_collect_gregset): Likewise.
(sparc64_supply_fpregset): Likewise.
(sparc64_collect_fpregset): Likewise.
* spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
* spu-tdep.c (spu_unwind_sp): Likewise.
(spu2ppu_prev_register): Likewise.
(spu_memory_remove_breakpoint): Likewise.
* stack.c (return_command): Likewise.
* tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
* tracefile-tfile.c (tfile_fetch_registers): Likewise.
* tracefile.c (trace_save_ctf): Likewise.
* windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
(do_windows_store_inferior_registers): Likewise.
(windows_resume): Likewise.
* xtensa-linux-nat.c (fill_gregset): Likewise.
(supply_gregset_reg): Likewise.
* xtensa-tdep.c (xtensa_register_write_masked): Likewise.
(xtensa_register_read_masked): Likewise.
(xtensa_supply_gregset): Likewise.
(xtensa_extract_return_value): Likewise.
(xtensa_store_return_value): Likewise.
2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
* doublest.c (floatformat_from_string): New function.

View File

@ -46,7 +46,7 @@ aarch32_gp_regcache_supply (struct regcache *regcache, uint32_t *regs,
regcache_raw_supply (regcache, ARM_PS_REGNUM, &regs[ARM_PC_REGNUM]);
regs[ARM_PC_REGNUM] = gdbarch_addr_bits_remove
(get_regcache_arch (regcache), regs[ARM_PC_REGNUM]);
(regcache->arch (), regs[ARM_PC_REGNUM]);
regcache_raw_supply (regcache, ARM_PC_REGNUM, &regs[ARM_PC_REGNUM]);
}

View File

@ -54,7 +54,7 @@ aarch64_fbsd_fetch_inferior_registers (struct target_ops *ops,
{
pid_t pid = get_ptrace_pid (regcache_get_ptid (regcache));
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (regnum == -1 || getregs_supplies (gdbarch, regnum))
{
struct reg regs;
@ -87,7 +87,7 @@ aarch64_fbsd_store_inferior_registers (struct target_ops *ops,
{
pid_t pid = get_ptrace_pid (regcache_get_ptid (regcache));
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (regnum == -1 || getregs_supplies (gdbarch, regnum))
{
struct reg regs;

View File

@ -155,7 +155,7 @@ static void
fetch_gregs_from_thread (struct regcache *regcache)
{
int ret, tid;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
elf_gregset_t regs;
struct iovec iovec;
@ -195,7 +195,7 @@ store_gregs_to_thread (const struct regcache *regcache)
int ret, tid;
elf_gregset_t regs;
struct iovec iovec;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
/* Make sure REGS can hold all registers contents on both aarch64
and arm. */
@ -238,7 +238,7 @@ fetch_fpregs_from_thread (struct regcache *regcache)
int ret, tid;
elf_fpregset_t regs;
struct iovec iovec;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
/* Make sure REGS can hold all VFP registers contents on both aarch64
and arm. */
@ -286,7 +286,7 @@ store_fpregs_to_thread (const struct regcache *regcache)
int ret, tid;
elf_fpregset_t regs;
struct iovec iovec;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
/* Make sure REGS can hold all VFP registers contents on both aarch64
and arm. */

View File

@ -1785,7 +1785,7 @@ static void
aarch64_extract_return_value (struct type *type, struct regcache *regs,
gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regs);
struct gdbarch *gdbarch = regs->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
if (TYPE_CODE (type) == TYPE_CODE_FLT)
@ -1923,7 +1923,7 @@ static void
aarch64_store_return_value (struct type *type, struct regcache *regs,
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regs);
struct gdbarch *gdbarch = regs->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
if (TYPE_CODE (type) == TYPE_CODE_FLT)
@ -2410,7 +2410,7 @@ value_of_aarch64_user_reg (struct frame_info *frame, const void *baton)
static std::vector<CORE_ADDR>
aarch64_software_single_step (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
const int insn_size = 4;
const int atomic_sequence_length = 16; /* Instruction sequence length. */

View File

@ -1040,7 +1040,7 @@ aix_thread_wait (struct target_ops *ops,
&& status->value.sig == GDB_SIGNAL_TRAP)
{
struct regcache *regcache = get_thread_regcache (ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (regcache_read_pc (regcache)
- gdbarch_decr_pc_after_break (gdbarch) == pd_brk_addr)
@ -1055,7 +1055,7 @@ aix_thread_wait (struct target_ops *ops,
static void
supply_gprs64 (struct regcache *regcache, uint64_t *vals)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
int regno;
for (regno = 0; regno < ppc_num_gprs; regno++)
@ -1076,7 +1076,7 @@ supply_reg32 (struct regcache *regcache, int regno, uint32_t val)
static void
supply_fprs (struct regcache *regcache, double *vals)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int regno;
@ -1117,7 +1117,7 @@ supply_sprs64 (struct regcache *regcache,
uint64_t lr, uint64_t ctr, uint32_t xer,
uint32_t fpscr)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch),
@ -1141,7 +1141,7 @@ supply_sprs32 (struct regcache *regcache,
uint32_t lr, uint32_t ctr, uint32_t xer,
uint32_t fpscr)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch),
@ -1166,7 +1166,7 @@ supply_sprs32 (struct regcache *regcache,
static void
fetch_regs_user_thread (struct regcache *regcache, pthdb_pthread_t pdtid)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int status, i;
pthdb_context_t ctx;
@ -1221,7 +1221,7 @@ static void
fetch_regs_kernel_thread (struct regcache *regcache, int regno,
pthdb_tid_t tid)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
uint64_t gprs64[ppc_num_gprs];
uint32_t gprs32[ppc_num_gprs];
@ -1328,7 +1328,7 @@ aix_thread_fetch_registers (struct target_ops *ops,
static void
fill_gprs64 (const struct regcache *regcache, uint64_t *vals)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
int regno;
for (regno = 0; regno < ppc_num_gprs; regno++)
@ -1341,7 +1341,7 @@ fill_gprs64 (const struct regcache *regcache, uint64_t *vals)
static void
fill_gprs32 (const struct regcache *regcache, uint32_t *vals)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
int regno;
for (regno = 0; regno < ppc_num_gprs; regno++)
@ -1355,7 +1355,7 @@ fill_gprs32 (const struct regcache *regcache, uint32_t *vals)
static void
fill_fprs (const struct regcache *regcache, double *vals)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int regno;
@ -1380,7 +1380,7 @@ fill_sprs64 (const struct regcache *regcache,
uint64_t *lr, uint64_t *ctr, uint32_t *xer,
uint32_t *fpscr)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
/* Verify that the size of the size of the IAR buffer is the
@ -1416,7 +1416,7 @@ fill_sprs32 (const struct regcache *regcache,
uint32_t *lr, uint32_t *ctr, uint32_t *xer,
uint32_t *fpscr)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
/* Verify that the size of the size of the IAR buffer is the
@ -1454,7 +1454,7 @@ fill_sprs32 (const struct regcache *regcache,
static void
store_regs_user_thread (const struct regcache *regcache, pthdb_pthread_t pdtid)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int status, i;
pthdb_context_t ctx;
@ -1551,7 +1551,7 @@ static void
store_regs_kernel_thread (const struct regcache *regcache, int regno,
pthdb_tid_t tid)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
uint64_t gprs64[ppc_num_gprs];
uint32_t gprs32[ppc_num_gprs];

View File

@ -101,7 +101,7 @@ alphabsd_fetch_inferior_registers (struct target_ops *ops,
}
if (regno == -1
|| regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
|| regno >= gdbarch_fp0_regnum (regcache->arch ()))
{
struct fpreg fpregs;
@ -138,7 +138,7 @@ alphabsd_store_inferior_registers (struct target_ops *ops,
}
if (regno == -1
|| regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
|| regno >= gdbarch_fp0_regnum (regcache->arch ()))
{
struct fpreg fpregs;

View File

@ -474,7 +474,7 @@ static void
alpha_extract_return_value (struct type *valtype, struct regcache *regcache,
gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
gdb_byte raw_buffer[ALPHA_REGISTER_SIZE];
ULONGEST l;
@ -543,7 +543,7 @@ static void
alpha_store_return_value (struct type *valtype, struct regcache *regcache,
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
gdb_byte raw_buffer[ALPHA_REGISTER_SIZE];
ULONGEST l;
@ -769,7 +769,7 @@ static const int stq_c_opcode = 0x2f;
static std::vector<CORE_ADDR>
alpha_deal_with_atomic_sequence (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
CORE_ADDR pc = regcache_read_pc (regcache);
CORE_ADDR breaks[2] = {-1, -1};
CORE_ADDR loc = pc;
@ -1601,7 +1601,7 @@ fp_register_sign_bit (LONGEST reg)
static CORE_ADDR
alpha_next_pc (struct regcache *regcache, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
unsigned int insn;
unsigned int op;
int regno;
@ -1722,7 +1722,7 @@ alpha_next_pc (struct regcache *regcache, CORE_ADDR pc)
std::vector<CORE_ADDR>
alpha_software_single_step (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
CORE_ADDR pc;
pc = alpha_next_pc (regcache, regcache_read_pc (regcache));

View File

@ -42,7 +42,7 @@ static void
amd64bsd_fetch_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
pid_t pid = get_ptrace_pid (regcache_get_ptid (regcache));
if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum))
@ -116,7 +116,7 @@ static void
amd64bsd_store_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
pid_t pid = get_ptrace_pid (regcache_get_ptid (regcache));
if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum))

View File

@ -134,7 +134,7 @@ static void
amd64_linux_fetch_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int tid;
/* GNU/Linux LWP ID's are process ID's. */
@ -213,7 +213,7 @@ static void
amd64_linux_store_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int tid;
/* GNU/Linux LWP ID's are process ID's. */

View File

@ -96,7 +96,7 @@ amd64_supply_native_gregset (struct regcache *regcache,
const void *gregs, int regnum)
{
const char *regs = (const char *) gregs;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int num_regs = amd64_native_gregset64_num_regs;
int i;
@ -127,7 +127,7 @@ amd64_collect_native_gregset (const struct regcache *regcache,
void *gregs, int regnum)
{
char *regs = (char *) gregs;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int num_regs = amd64_native_gregset64_num_regs;
int i;

View File

@ -221,7 +221,7 @@ static void
amd64obsd_supply_uthread (struct regcache *regcache,
int regnum, CORE_ADDR addr)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR sp_addr = addr + AMD64OBSD_UTHREAD_RSP_OFFSET;
CORE_ADDR sp = 0;
@ -265,7 +265,7 @@ static void
amd64obsd_collect_uthread (const struct regcache *regcache,
int regnum, CORE_ADDR addr)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR sp_addr = addr + AMD64OBSD_UTHREAD_RSP_OFFSET;
CORE_ADDR sp = 0;

View File

@ -2922,7 +2922,7 @@ static void
amd64_supply_fpregset (const struct regset *regset, struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
gdb_assert (len >= tdep->sizeof_fpregset);
@ -2939,7 +2939,7 @@ amd64_collect_fpregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *fpregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
gdb_assert (len >= tdep->sizeof_fpregset);
@ -3264,7 +3264,7 @@ void
amd64_supply_fxsave (struct regcache *regcache, int regnum,
const void *fxsave)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
i387_supply_fxsave (regcache, regnum, fxsave);
@ -3287,7 +3287,7 @@ void
amd64_supply_xsave (struct regcache *regcache, int regnum,
const void *xsave)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
i387_supply_xsave (regcache, regnum, xsave);
@ -3315,7 +3315,7 @@ void
amd64_collect_fxsave (const struct regcache *regcache, int regnum,
void *fxsave)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
gdb_byte *regs = (gdb_byte *) fxsave;
@ -3336,7 +3336,7 @@ void
amd64_collect_xsave (const struct regcache *regcache, int regnum,
void *xsave, int gcore)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
gdb_byte *regs = (gdb_byte *) xsave;

View File

@ -447,7 +447,7 @@ arc_insn_get_linear_next_pc (const struct arc_instruction &insn)
static void
arc_write_pc (struct regcache *regcache, CORE_ADDR new_pc)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (arc_debug)
debug_printf ("arc: Writing PC, new value=%s\n",

View File

@ -874,7 +874,7 @@ int default_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr)
void
default_skip_permanent_breakpoint (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
CORE_ADDR current_pc = regcache_read_pc (regcache);
int bp_len;

View File

@ -58,7 +58,7 @@ arm_fbsd_fetch_inferior_registers (struct target_ops *ops,
{
pid_t pid = get_ptrace_pid (regcache_get_ptid (regcache));
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (regnum == -1 || getregs_supplies (gdbarch, regnum))
{
struct reg regs;
@ -93,7 +93,7 @@ arm_fbsd_store_inferior_registers (struct target_ops *ops,
{
pid_t pid = get_ptrace_pid (regcache_get_ptid (regcache));
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (regnum == -1 || getregs_supplies (gdbarch, regnum))
{
struct reg regs;

View File

@ -303,7 +303,7 @@ fetch_vfp_regs (struct regcache *regcache)
{
gdb_byte regbuf[VFP_REGS_SIZE];
int ret, regno, tid;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
/* Get the thread id for the ptrace call. */
@ -332,7 +332,7 @@ store_vfp_regs (const struct regcache *regcache)
{
gdb_byte regbuf[VFP_REGS_SIZE];
int ret, regno, tid;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
/* Get the thread id for the ptrace call. */
@ -378,7 +378,7 @@ static void
arm_linux_fetch_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (-1 == regno)
@ -416,7 +416,7 @@ static void
arm_linux_store_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (-1 == regno)

View File

@ -478,7 +478,7 @@ arm_linux_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs_buf, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
const gdb_byte *gregs = (const gdb_byte *) gregs_buf;
int regno;
@ -790,7 +790,7 @@ arm_linux_sigreturn_next_pc (struct regcache *regcache,
ULONGEST sp;
unsigned long sp_data;
CORE_ADDR next_pc = 0;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int pc_offset = 0;
int is_sigreturn = 0;
@ -882,7 +882,7 @@ arm_linux_get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self)
}
else
{
struct gdbarch *gdbarch = get_regcache_arch (self->regcache);
struct gdbarch *gdbarch = self->regcache->arch ();
enum bfd_endian byte_order_for_code =
gdbarch_byte_order_for_code (gdbarch);
unsigned long this_instr =
@ -922,7 +922,7 @@ arm_linux_get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self)
static std::vector<CORE_ADDR>
arm_linux_software_single_step (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct arm_get_next_pcs next_pcs_ctx;
/* If the target does have hardware single step, GDB doesn't have

View File

@ -47,7 +47,7 @@ arm_supply_gregset (struct regcache *regcache, struct reg *gregset)
regcache_raw_supply (regcache, ARM_LR_REGNUM,
(char *) &gregset->r_lr);
/* This is ok: we're running native... */
r_pc = gdbarch_addr_bits_remove (get_regcache_arch (regcache), gregset->r_pc);
r_pc = gdbarch_addr_bits_remove (regcache->arch (), gregset->r_pc);
regcache_raw_supply (regcache, ARM_PC_REGNUM, (char *) &r_pc);
if (arm_apcs_32)
@ -101,7 +101,7 @@ fetch_register (struct regcache *regcache, int regno)
case ARM_PC_REGNUM:
/* This is ok: we're running native... */
inferior_registers.r_pc = gdbarch_addr_bits_remove
(get_regcache_arch (regcache),
(regcache->arch (),
inferior_registers.r_pc);
regcache_raw_supply (regcache, ARM_PC_REGNUM,
(char *) &inferior_registers.r_pc);
@ -212,7 +212,7 @@ armnbsd_fetch_registers (struct target_ops *ops,
static void
store_register (const struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct reg inferior_registers;
int ret;
@ -289,7 +289,7 @@ store_register (const struct regcache *regcache, int regno)
static void
store_regs (const struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct reg inferior_registers;
int ret;
int regno;

View File

@ -297,7 +297,7 @@ int
arm_is_thumb (struct regcache *regcache)
{
ULONGEST cpsr;
ULONGEST t_bit = arm_psr_thumb_bit (get_regcache_arch (regcache));
ULONGEST t_bit = arm_psr_thumb_bit (regcache->arch ());
cpsr = regcache_raw_get_unsigned (regcache, ARM_PS_REGNUM);
@ -4452,7 +4452,7 @@ static int
displaced_in_arm_mode (struct regcache *regs)
{
ULONGEST ps;
ULONGEST t_bit = arm_psr_thumb_bit (get_regcache_arch (regs));
ULONGEST t_bit = arm_psr_thumb_bit (regs->arch ());
regcache_cooked_read_unsigned (regs, ARM_PS_REGNUM, &ps);
@ -4481,7 +4481,7 @@ static void
bx_write_pc (struct regcache *regs, ULONGEST val)
{
ULONGEST ps;
ULONGEST t_bit = arm_psr_thumb_bit (get_regcache_arch (regs));
ULONGEST t_bit = arm_psr_thumb_bit (regs->arch ());
regcache_cooked_read_unsigned (regs, ARM_PS_REGNUM, &ps);
@ -6223,7 +6223,7 @@ CORE_ADDR
arm_get_next_pcs_addr_bits_remove (struct arm_get_next_pcs *self,
CORE_ADDR val)
{
return gdbarch_addr_bits_remove (get_regcache_arch (self->regcache), val);
return gdbarch_addr_bits_remove (self->regcache->arch (), val);
}
/* Wrapper over syscall_next_pc for use in get_next_pcs. */
@ -6250,7 +6250,7 @@ arm_get_next_pcs_is_thumb (struct arm_get_next_pcs *self)
std::vector<CORE_ADDR>
arm_software_single_step (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct arm_get_next_pcs next_pcs_ctx;
arm_get_next_pcs_ctor (&next_pcs_ctx,
@ -7887,7 +7887,7 @@ static void
arm_extract_return_value (struct type *type, struct regcache *regs,
gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regs);
struct gdbarch *gdbarch = regs->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
if (TYPE_CODE_FLT == TYPE_CODE (type))
@ -8096,7 +8096,7 @@ static void
arm_store_return_value (struct type *type, struct regcache *regs,
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regs);
struct gdbarch *gdbarch = regs->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
if (TYPE_CODE (type) == TYPE_CODE_FLT)
@ -8652,7 +8652,7 @@ arm_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile,
static void
arm_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
regcache_cooked_write_unsigned (regcache, ARM_PC_REGNUM, pc);
/* If necessary, set the T bit. */

View File

@ -608,7 +608,7 @@ bfin_extract_return_value (struct type *type,
struct regcache *regs,
gdb_byte *dst)
{
struct gdbarch *gdbarch = get_regcache_arch (regs);
struct gdbarch *gdbarch = regs->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
bfd_byte *valbuf = dst;
int len = TYPE_LENGTH (type);

View File

@ -287,7 +287,7 @@ static void
bsd_uthread_fetch_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct bsd_uthread_ops *uthread_ops
= (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
ptid_t ptid = regcache_get_ptid (regcache);
@ -321,7 +321,7 @@ static void
bsd_uthread_store_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct bsd_uthread_ops *uthread_ops
= (struct bsd_uthread_ops *) gdbarch_data (gdbarch, bsd_uthread_data);
struct target_ops *beneath = find_target_beneath (ops);

View File

@ -84,7 +84,7 @@ fetch_core_registers (struct regcache *regcache,
else
{
memcpy (&fpregset, core_reg_sect, sizeof (fpregset));
if (gdbarch_fp0_regnum (get_regcache_arch (regcache)) >= 0)
if (gdbarch_fp0_regnum (regcache->arch ()) >= 0)
supply_fpregset (regcache,
(const gdb_fpregset_t *) fpregset_p);
}

View File

@ -603,7 +603,7 @@ get_core_registers (struct target_ops *ops,
return;
}
gdbarch = get_regcache_arch (regcache);
gdbarch = regcache->arch ();
if (gdbarch_iterate_over_regset_sections_p (gdbarch))
gdbarch_iterate_over_regset_sections (gdbarch,
get_core_registers_cb,
@ -617,7 +617,7 @@ get_core_registers (struct target_ops *ops,
}
/* Mark all registers not found in the core as unavailable. */
for (i = 0; i < gdbarch_num_regs (get_regcache_arch (regcache)); i++)
for (i = 0; i < gdbarch_num_regs (regcache->arch ()); i++)
if (regcache_register_status (regcache, i) == REG_UNKNOWN)
regcache_raw_supply (regcache, i, NULL);
}

View File

@ -1643,7 +1643,7 @@ static void
cris_store_return_value (struct type *type, struct regcache *regcache,
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST val;
int len = TYPE_LENGTH (type);
@ -1811,7 +1811,7 @@ static void
cris_extract_return_value (struct type *type, struct regcache *regcache,
gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST val;
int len = TYPE_LENGTH (type);
@ -1994,7 +1994,7 @@ find_step_target (struct regcache *regcache, inst_env_type *inst_env)
int i;
int offset;
unsigned short insn;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
/* Create a local register image and set the initial state. */
@ -2063,7 +2063,7 @@ find_step_target (struct regcache *regcache, inst_env_type *inst_env)
static std::vector<CORE_ADDR>
cris_software_single_step (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
inst_env_type inst_env;
std::vector<CORE_ADDR> next_pcs;
@ -3800,7 +3800,7 @@ typedef cris_elf_greg_t crisv32_elf_gregset_t[CRISV32_ELF_NGREG];
static void
cris_supply_gregset (struct regcache *regcache, cris_elf_gregset_t *gregsetp)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int i;
cris_elf_greg_t *regp = *gregsetp;

View File

@ -1186,7 +1186,7 @@ static void
ctf_fetch_registers (struct target_ops *ops,
struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct bt_ctf_event *event = NULL;
struct bt_iter_pos *pos;

View File

@ -1191,7 +1191,7 @@ cancel_breakpoint (ptid_t ptid)
tripped on it. */
struct regcache *regcache = get_thread_regcache (ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
CORE_ADDR pc;
pc = regcache_read_pc (regcache) - gdbarch_decr_pc_after_break (gdbarch);

View File

@ -246,7 +246,7 @@ fbsd_collect_thread_registers (const struct regcache *regcache,
char *note_data, int *note_size,
enum gdb_signal stop_signal)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct fbsd_collect_regset_section_cb_data data;
data.regcache = regcache;

View File

@ -1110,7 +1110,7 @@ static void
frv_extract_return_value (struct type *type, struct regcache *regcache,
gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int len = TYPE_LENGTH (type);

View File

@ -123,7 +123,7 @@ static void
ft32_store_return_value (struct type *type, struct regcache *regcache,
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR regval;
int len = TYPE_LENGTH (type);
@ -400,7 +400,7 @@ static void
ft32_extract_return_value (struct type *type, struct regcache *regcache,
gdb_byte *dst)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
bfd_byte *valbuf = dst;
int len = TYPE_LENGTH (type);

View File

@ -493,7 +493,7 @@ go32_wait (struct target_ops *ops,
static void
fetch_register (struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (regno < gdbarch_fp0_regnum (gdbarch))
regcache_raw_supply (regcache, regno,
(char *) &a_tss + regno_mapping[regno].tss_ofs);
@ -514,7 +514,7 @@ go32_fetch_registers (struct target_ops *ops,
else
{
for (regno = 0;
regno < gdbarch_fp0_regnum (get_regcache_arch (regcache));
regno < gdbarch_fp0_regnum (regcache->arch ());
regno++)
fetch_register (regcache, regno);
i387_supply_fsave (regcache, -1, &npx);
@ -524,7 +524,7 @@ go32_fetch_registers (struct target_ops *ops,
static void
store_register (const struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (regno < gdbarch_fp0_regnum (gdbarch))
regcache_raw_collect (regcache, regno,
(char *) &a_tss + regno_mapping[regno].tss_ofs);
@ -546,7 +546,7 @@ go32_store_registers (struct target_ops *ops,
store_register (regcache, regno);
else
{
for (r = 0; r < gdbarch_fp0_regnum (get_regcache_arch (regcache)); r++)
for (r = 0; r < gdbarch_fp0_regnum (regcache->arch ()); r++)
store_register (regcache, r);
i387_collect_fsave (regcache, -1, &npx);
}

View File

@ -742,7 +742,7 @@ static void
h8300_extract_return_value (struct type *type, struct regcache *regcache,
gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int len = TYPE_LENGTH (type);
ULONGEST c, addr;
@ -779,7 +779,7 @@ static void
h8300h_extract_return_value (struct type *type, struct regcache *regcache,
gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST c;
@ -844,7 +844,7 @@ static void
h8300_store_return_value (struct type *type, struct regcache *regcache,
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST val;
@ -873,7 +873,7 @@ static void
h8300h_store_return_value (struct type *type, struct regcache *regcache,
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST val;

View File

@ -213,7 +213,7 @@ static const int greg_map[] =
static void
fetch_register (struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
pid_t tid;
int val;
@ -240,7 +240,7 @@ fetch_register (struct regcache *regcache, int regno)
static void
store_register (const struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
pid_t tid;
int val;
@ -269,7 +269,7 @@ hppa_linux_fetch_inferior_registers (struct target_ops *ops,
if (-1 == regno)
{
for (regno = 0;
regno < gdbarch_num_regs (get_regcache_arch (regcache));
regno < gdbarch_num_regs (regcache->arch ());
regno++)
fetch_register (regcache, regno);
}
@ -290,7 +290,7 @@ hppa_linux_store_inferior_registers (struct target_ops *ops,
if (-1 == regno)
{
for (regno = 0;
regno < gdbarch_num_regs (get_regcache_arch (regcache));
regno < gdbarch_num_regs (regcache->arch ());
regno++)
store_register (regcache, regno);
}

View File

@ -52,7 +52,7 @@ i386_darwin_fetch_inferior_registers (struct target_ops *ops,
{
thread_t current_thread = ptid_get_tid (regcache_get_ptid (regcache));
int fetched = 0;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
#ifdef BFD64
if (gdbarch_ptr_bit (gdbarch) == 64)
@ -168,7 +168,7 @@ i386_darwin_store_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regno)
{
thread_t current_thread = ptid_get_tid (regcache_get_ptid (regcache));
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
#ifdef BFD64
if (gdbarch_ptr_bit (gdbarch) == 64)

View File

@ -127,7 +127,7 @@ gnu_fetch_registers (struct target_ops *ops,
else
{
proc_debug (thread, "fetching register %s",
gdbarch_register_name (get_regcache_arch (regcache),
gdbarch_register_name (regcache->arch (),
regno));
regcache_raw_supply (regcache, regno,
@ -183,7 +183,7 @@ gnu_store_registers (struct target_ops *ops,
struct regcache *regcache, int regno)
{
struct proc *thread;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
ptid_t ptid = regcache_get_ptid (regcache);
/* Make sure we know about new threads. */

View File

@ -112,7 +112,7 @@ fetch_register (struct regcache *regcache, int regno)
i386_linux_gregset_reg_offset[regno], 0);
if (errno != 0)
error (_("Couldn't read register %s (#%d): %s."),
gdbarch_register_name (get_regcache_arch (regcache), regno),
gdbarch_register_name (regcache->arch (), regno),
regno, safe_strerror (errno));
regcache_raw_supply (regcache, regno, &val);
@ -138,7 +138,7 @@ store_register (const struct regcache *regcache, int regno)
i386_linux_gregset_reg_offset[regno], val);
if (errno != 0)
error (_("Couldn't write register %s (#%d): %s."),
gdbarch_register_name (get_regcache_arch (regcache), regno),
gdbarch_register_name (regcache->arch (), regno),
regno, safe_strerror (errno));
}
@ -160,7 +160,7 @@ supply_gregset (struct regcache *regcache, const elf_gregset_t *gregsetp)
regp + i386_linux_gregset_reg_offset[i]);
if (I386_LINUX_ORIG_EAX_REGNUM
< gdbarch_num_regs (get_regcache_arch (regcache)))
< gdbarch_num_regs (regcache->arch ()))
regcache_raw_supply (regcache, I386_LINUX_ORIG_EAX_REGNUM, regp
+ i386_linux_gregset_reg_offset[I386_LINUX_ORIG_EAX_REGNUM]);
}
@ -183,7 +183,7 @@ fill_gregset (const struct regcache *regcache,
if ((regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
&& I386_LINUX_ORIG_EAX_REGNUM
< gdbarch_num_regs (get_regcache_arch (regcache)))
< gdbarch_num_regs (regcache->arch ()))
regcache_raw_collect (regcache, I386_LINUX_ORIG_EAX_REGNUM, regp
+ i386_linux_gregset_reg_offset[I386_LINUX_ORIG_EAX_REGNUM]);
}
@ -458,7 +458,7 @@ i386_linux_fetch_inferior_registers (struct target_ops *ops,
{
int i;
for (i = 0; i < gdbarch_num_regs (get_regcache_arch (regcache)); i++)
for (i = 0; i < gdbarch_num_regs (regcache->arch ()); i++)
if (regno == -1 || regno == i)
fetch_register (regcache, i);
@ -536,7 +536,7 @@ i386_linux_store_inferior_registers (struct target_ops *ops,
{
int i;
for (i = 0; i < gdbarch_num_regs (get_regcache_arch (regcache)); i++)
for (i = 0; i < gdbarch_num_regs (regcache->arch ()); i++)
if (regno == -1 || regno == i)
store_register (regcache, i);
@ -650,7 +650,7 @@ i386_linux_resume (struct target_ops *ops,
if (step)
{
struct regcache *regcache = get_thread_regcache (ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST pc;
gdb_byte buf[LINUX_SYSCALL_LEN];

View File

@ -537,7 +537,7 @@ i386_linux_record_signal (struct gdbarch *gdbarch,
static LONGEST
i386_linux_get_syscall_number_from_regcache (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
/* The content of a register. */
gdb_byte buf[4];

View File

@ -76,7 +76,7 @@ nto_reg_offset (int regnum)
static void
i386nto_supply_gregset (struct regcache *regcache, char *gpregs)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
gdb_assert (tdep->gregset_reg_offset == i386nto_gregset_reg_offset);

View File

@ -34,7 +34,7 @@
static int
i386obsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct switchframe sf;

View File

@ -190,7 +190,7 @@ static void
i386obsd_supply_uthread (struct regcache *regcache,
int regnum, CORE_ADDR addr)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR sp_addr = addr + I386OBSD_UTHREAD_ESP_OFFSET;
CORE_ADDR sp = 0;
@ -234,7 +234,7 @@ static void
i386obsd_collect_uthread (const struct regcache *regcache,
int regnum, CORE_ADDR addr)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR sp_addr = addr + I386OBSD_UTHREAD_ESP_OFFSET;
CORE_ADDR sp = 0;

View File

@ -3250,7 +3250,7 @@ i386_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
static int
i386_mmx_regnum_to_fp_regnum (struct regcache *regcache, int regnum)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
int mmxreg, fpreg;
ULONGEST fstat;
int tos;
@ -3839,7 +3839,7 @@ void
i386_supply_gregset (const struct regset *regset, struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
@ -3864,7 +3864,7 @@ i386_collect_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
gdb_byte *regs = (gdb_byte *) gregs;
int i;
@ -3887,7 +3887,7 @@ static void
i386_supply_fpregset (const struct regset *regset, struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (len == I387_SIZEOF_FXSAVE)
@ -3910,7 +3910,7 @@ i386_collect_fpregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *fpregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (len == I387_SIZEOF_FXSAVE)
@ -8742,7 +8742,7 @@ i386_mpx_bd_base (void)
enum register_status regstatus;
rcache = get_current_regcache ();
tdep = gdbarch_tdep (get_regcache_arch (rcache));
tdep = gdbarch_tdep (rcache->arch ());
regstatus = regcache_raw_read_unsigned (rcache, tdep->bndcfgu_regnum, &ret);

View File

@ -136,7 +136,7 @@ fill_gregset (const struct regcache *regcache,
void
supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp)
{
if (gdbarch_fp0_regnum (get_regcache_arch (regcache)) == 0)
if (gdbarch_fp0_regnum (regcache->arch ()) == 0)
return;
i387_supply_fsave (regcache, -1, fpregsetp);
@ -150,7 +150,7 @@ void
fill_fpregset (const struct regcache *regcache,
fpregset_t *fpregsetp, int regno)
{
if (gdbarch_fp0_regnum (get_regcache_arch (regcache)) == 0)
if (gdbarch_fp0_regnum (regcache->arch ()) == 0)
return;
i387_collect_fsave (regcache, regno, fpregsetp);

View File

@ -438,7 +438,7 @@ static int fsave_offset[] =
void
i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
const gdb_byte *regs = (const gdb_byte *) fsave;
@ -493,7 +493,7 @@ i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
void
i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
gdb_byte *regs = (gdb_byte *) fsave;
int i;
@ -586,7 +586,7 @@ static int i387_tag (const gdb_byte *raw);
void
i387_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
const gdb_byte *regs = (const gdb_byte *) fxsave;
int i;
@ -669,7 +669,7 @@ i387_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave)
void
i387_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
gdb_byte *regs = (gdb_byte *) fxsave;
int i;
@ -899,7 +899,7 @@ void
i387_supply_xsave (struct regcache *regcache, int regnum,
const void *xsave)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
const gdb_byte *regs = (const gdb_byte *) xsave;
int i;
@ -1307,7 +1307,7 @@ void
i387_collect_xsave (const struct regcache *regcache, int regnum,
void *xsave, int gcore)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
gdb_byte *regs = (gdb_byte *) xsave;
int i;

View File

@ -694,7 +694,7 @@ ia64_linux_can_use_hw_breakpoint (struct target_ops *self,
static void
ia64_linux_fetch_register (struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
CORE_ADDR addr;
size_t size;
PTRACE_TYPE_RET *buf;
@ -771,7 +771,7 @@ ia64_linux_fetch_registers (struct target_ops *ops,
{
if (regnum == -1)
for (regnum = 0;
regnum < gdbarch_num_regs (get_regcache_arch (regcache));
regnum < gdbarch_num_regs (regcache->arch ());
regnum++)
ia64_linux_fetch_register (regcache, regnum);
else
@ -783,7 +783,7 @@ ia64_linux_fetch_registers (struct target_ops *ops,
static void
ia64_linux_store_register (const struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
CORE_ADDR addr;
size_t size;
PTRACE_TYPE_RET *buf;
@ -826,7 +826,7 @@ ia64_linux_store_registers (struct target_ops *ops,
{
if (regnum == -1)
for (regnum = 0;
regnum < gdbarch_num_regs (get_regcache_arch (regcache));
regnum < gdbarch_num_regs (regcache->arch ());
regnum++)
ia64_linux_store_register (regcache, regnum);
else

View File

@ -2553,7 +2553,7 @@ ia64_access_rse_reg (unw_addr_space_t as, unw_regnum_t uw_regnum,
int regnum = ia64_uw2gdb_regnum (uw_regnum);
unw_word_t bsp, sof, cfm, psr, ip;
struct regcache *regcache = (struct regcache *) arg;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
long new_sof, old_sof;
@ -3195,7 +3195,7 @@ static void
ia64_extract_return_value (struct type *type, struct regcache *regcache,
gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct type *float_elt_type;
float_elt_type = is_float_or_hfa_type (type);
@ -3260,7 +3260,7 @@ static void
ia64_store_return_value (struct type *type, struct regcache *regcache,
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct type *float_elt_type;
float_elt_type = is_float_or_hfa_type (type);
@ -3560,7 +3560,7 @@ find_extant_func_descr (struct gdbarch *gdbarch, CORE_ADDR faddr)
static CORE_ADDR
find_func_descr (struct regcache *regcache, CORE_ADDR faddr, CORE_ADDR *fdaptr)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR fdesc;

View File

@ -77,7 +77,7 @@ inf_child_fetch_inferior_registers (struct target_ops *ops,
if (regnum == -1)
{
for (regnum = 0;
regnum < gdbarch_num_regs (get_regcache_arch (regcache));
regnum < gdbarch_num_regs (regcache->arch ());
regnum++)
regcache_raw_supply (regcache, regnum, NULL);
}

View File

@ -713,7 +713,7 @@ static CORE_ADDR (*inf_ptrace_register_u_offset)(struct gdbarch *, int, int);
static void
inf_ptrace_fetch_register (struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
CORE_ADDR addr;
size_t size;
PTRACE_TYPE_RET *buf;
@ -759,7 +759,7 @@ inf_ptrace_fetch_registers (struct target_ops *ops,
{
if (regnum == -1)
for (regnum = 0;
regnum < gdbarch_num_regs (get_regcache_arch (regcache));
regnum < gdbarch_num_regs (regcache->arch ());
regnum++)
inf_ptrace_fetch_register (regcache, regnum);
else
@ -771,7 +771,7 @@ inf_ptrace_fetch_registers (struct target_ops *ops,
static void
inf_ptrace_store_register (const struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
CORE_ADDR addr;
size_t size;
PTRACE_TYPE_RET *buf;
@ -814,7 +814,7 @@ inf_ptrace_store_registers (struct target_ops *ops,
{
if (regnum == -1)
for (regnum = 0;
regnum < gdbarch_num_regs (get_regcache_arch (regcache));
regnum < gdbarch_num_regs (regcache->arch ());
regnum++)
inf_ptrace_store_register (regcache, regnum);
else

View File

@ -1690,7 +1690,7 @@ static int
use_displaced_stepping (struct thread_info *tp)
{
struct regcache *regcache = get_thread_regcache (tp->ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct displaced_step_inferior_state *displaced_state;
displaced_state = get_displaced_stepping_state (ptid_get_pid (tp->ptid));
@ -1759,7 +1759,7 @@ displaced_step_prepare_throw (ptid_t ptid)
struct cleanup *ignore_cleanups;
struct thread_info *tp = find_thread_ptid (ptid);
struct regcache *regcache = get_thread_regcache (ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct address_space *aspace = get_regcache_aspace (regcache);
CORE_ADDR original, copy;
ULONGEST len;
@ -2385,7 +2385,7 @@ resume (enum gdb_signal sig)
{
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
struct regcache *regcache = get_current_regcache ();
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct thread_info *tp = inferior_thread ();
CORE_ADDR pc = regcache_read_pc (regcache);
struct address_space *aspace = get_regcache_aspace (regcache);
@ -2736,7 +2736,7 @@ resume (enum gdb_signal sig)
&& !step_over_info_valid_p ())
{
struct regcache *resume_regcache = get_thread_regcache (tp->ptid);
struct gdbarch *resume_gdbarch = get_regcache_arch (resume_regcache);
struct gdbarch *resume_gdbarch = resume_regcache->arch ();
CORE_ADDR actual_pc = regcache_read_pc (resume_regcache);
gdb_byte buf[4];
@ -3006,7 +3006,7 @@ proceed (CORE_ADDR addr, enum gdb_signal siggnal)
previous_inferior_ptid = inferior_ptid;
regcache = get_current_regcache ();
gdbarch = get_regcache_arch (regcache);
gdbarch = regcache->arch ();
aspace = get_regcache_aspace (regcache);
pc = regcache_read_pc (regcache);
tp = inferior_thread ();
@ -3519,7 +3519,7 @@ do_target_wait (ptid_t ptid, struct target_waitstatus *status, int options)
|| tp->suspend.stop_reason == TARGET_STOPPED_BY_HW_BREAKPOINT))
{
struct regcache *regcache = get_thread_regcache (tp->ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
CORE_ADDR pc;
int discard = 0;
@ -3582,7 +3582,7 @@ do_target_wait (ptid_t ptid, struct target_waitstatus *status, int options)
int decr_pc;
regcache = get_thread_regcache (tp->ptid);
gdbarch = get_regcache_arch (regcache);
gdbarch = regcache->arch ();
decr_pc = gdbarch_decr_pc_after_break (gdbarch);
if (decr_pc != 0)
@ -4144,7 +4144,7 @@ adjust_pc_after_break (struct thread_info *thread,
/* If this target does not decrement the PC after breakpoints, then
we have nothing to do. */
regcache = get_thread_regcache (thread->ptid);
gdbarch = get_regcache_arch (regcache);
gdbarch = regcache->arch ();
decr_pc = gdbarch_decr_pc_after_break (gdbarch);
if (decr_pc == 0)
@ -5077,7 +5077,7 @@ handle_inferior_event_1 (struct execution_control_state *ecs)
else
{
struct regcache *regcache = get_thread_regcache (ecs->ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (gdbarch_gdb_signal_to_target_p (gdbarch))
{
@ -5125,7 +5125,7 @@ Cannot fill $_exitsignal with the correct signal number.\n"));
/* Check whether the inferior is displaced stepping. */
{
struct regcache *regcache = get_thread_regcache (ecs->ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
/* If checking displaced stepping is supported, and thread
ecs->ptid is displaced stepping. */
@ -5687,7 +5687,7 @@ handle_signal_stop (struct execution_control_state *ecs)
if (debug_infrun)
{
struct regcache *regcache = get_thread_regcache (ecs->ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
scoped_restore save_inferior_ptid = make_scoped_restore (&inferior_ptid);
inferior_ptid = ecs->ptid;
@ -7922,7 +7922,7 @@ static void
handle_segmentation_fault (struct ui_out *uiout)
{
struct regcache *regcache = get_current_regcache ();
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (gdbarch_handle_segmentation_fault_p (gdbarch))
gdbarch_handle_segmentation_fault (gdbarch, uiout);
@ -8831,7 +8831,7 @@ save_infcall_suspend_state (void)
struct infcall_suspend_state *inf_state;
struct thread_info *tp = inferior_thread ();
struct regcache *regcache = get_current_regcache ();
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
gdb_byte *siginfo_data = NULL;
if (gdbarch_get_siginfo_type_p (gdbarch))
@ -8882,7 +8882,7 @@ restore_infcall_suspend_state (struct infcall_suspend_state *inf_state)
{
struct thread_info *tp = inferior_thread ();
struct regcache *regcache = get_current_regcache ();
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
tp->suspend = inf_state->thread_suspend;

View File

@ -539,7 +539,7 @@ static void
iq2000_extract_return_value (struct type *type, struct regcache *regcache,
gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
/* If the function's return value is 8 bytes or less, it is

View File

@ -1270,7 +1270,7 @@ jit_frame_prev_register (struct frame_info *this_frame, void **cache, int reg)
if (priv == NULL)
return frame_unwind_got_optimized (this_frame, reg);
gdbarch = get_regcache_arch (priv->regcache);
gdbarch = priv->regcache->arch ();
if (reg < gdbarch_num_regs (gdbarch))
{
gdb_byte *buf = (gdb_byte *) alloca (register_size (gdbarch, reg));

View File

@ -2750,7 +2750,7 @@ save_stop_reason (struct lwp_info *lp)
return;
regcache = get_thread_regcache (lp->ptid);
gdbarch = get_regcache_arch (regcache);
gdbarch = regcache->arch ();
pc = regcache_read_pc (regcache);
sw_bp_pc = pc - gdbarch_decr_pc_after_break (gdbarch);
@ -3460,7 +3460,7 @@ linux_nat_wait_1 (struct target_ops *ops,
&& !USE_SIGTRAP_SIGINFO)
{
struct regcache *regcache = get_thread_regcache (lp->ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int decr_pc = gdbarch_decr_pc_after_break (gdbarch);
if (decr_pc != 0)
@ -3563,7 +3563,7 @@ resume_stopped_resumed_lwps (struct lwp_info *lp, void *data)
else
{
struct regcache *regcache = get_thread_regcache (lp->ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
TRY
{

View File

@ -83,7 +83,7 @@
#define RECORD_Q_XGETQUOTA (('3' << 8) + 3)
#define OUTPUT_REG(val, num) phex_nz ((val), \
TYPE_LENGTH (gdbarch_register_type (get_regcache_arch (regcache), (num))))
TYPE_LENGTH (gdbarch_register_type (regcache->arch (), (num))))
/* Record a memory area of length LEN pointed to by register
REGNUM. */
@ -104,7 +104,7 @@ record_linux_sockaddr (struct regcache *regcache,
{
gdb_byte *a;
int addrlen;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
if (!addr)
@ -141,7 +141,7 @@ record_linux_msghdr (struct regcache *regcache,
struct linux_record_tdep *tdep, ULONGEST addr)
{
gdb_byte *a;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR tmpaddr;
int tmpint;
@ -242,7 +242,7 @@ record_linux_system_call (enum gdb_syscall syscall,
struct regcache *regcache,
struct linux_record_tdep *tdep)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST tmpulongest;
CORE_ADDR tmpaddr;

View File

@ -1618,7 +1618,7 @@ linux_collect_thread_registers (const struct regcache *regcache,
char *note_data, int *note_size,
enum gdb_signal stop_signal)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct linux_collect_regset_section_cb_data data;
data.gdbarch = gdbarch;

View File

@ -303,7 +303,7 @@ static void
lm32_extract_return_value (struct type *type, struct regcache *regcache,
gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST l;
CORE_ADDR return_buffer;
@ -340,7 +340,7 @@ static void
lm32_store_return_value (struct type *type, struct regcache *regcache,
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST val;
int len = TYPE_LENGTH (type);

View File

@ -331,7 +331,7 @@ m32c_raw_write (struct m32c_reg *reg, struct regcache *cache,
static int
m32c_read_flg (struct regcache *cache)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (cache));
struct gdbarch_tdep *tdep = gdbarch_tdep (cache->arch ());
ULONGEST flg;
regcache_raw_read_unsigned (cache, tdep->flg->num, &flg);
return flg & 0xffff;
@ -598,7 +598,7 @@ m32c_pseudo_register_read (struct gdbarch *arch,
struct m32c_reg *reg;
gdb_assert (0 <= cookednum && cookednum < tdep->num_regs);
gdb_assert (arch == get_regcache_arch (cache));
gdb_assert (arch == cache->arch ());
gdb_assert (arch == tdep->regs[cookednum].arch);
reg = &tdep->regs[cookednum];
@ -616,7 +616,7 @@ m32c_pseudo_register_write (struct gdbarch *arch,
struct m32c_reg *reg;
gdb_assert (0 <= cookednum && cookednum < tdep->num_regs);
gdb_assert (arch == get_regcache_arch (cache));
gdb_assert (arch == cache->arch ());
gdb_assert (arch == tdep->regs[cookednum].arch);
reg = &tdep->regs[cookednum];

View File

@ -353,7 +353,7 @@ m32r_linux_supply_gregset (const struct regset *regset,
{
const gdb_byte *regs = (const gdb_byte *) gregs;
enum bfd_endian byte_order =
gdbarch_byte_order (get_regcache_arch (regcache));
gdbarch_byte_order (regcache->arch ());
ULONGEST psw, bbpsw;
gdb_byte buf[4];
const gdb_byte *p;
@ -397,7 +397,7 @@ m32r_linux_collect_gregset (const struct regset *regset,
gdb_byte *regs = (gdb_byte *) gregs;
int i;
enum bfd_endian byte_order =
gdbarch_byte_order (get_regcache_arch (regcache));
gdbarch_byte_order (regcache->arch ());
ULONGEST psw;
gdb_byte buf[4];

View File

@ -245,7 +245,7 @@ static void
m32r_store_return_value (struct type *type, struct regcache *regcache,
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR regval;
int len = TYPE_LENGTH (type);
@ -770,7 +770,7 @@ static void
m32r_extract_return_value (struct type *type, struct regcache *regcache,
gdb_byte *dst)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int len = TYPE_LENGTH (type);
ULONGEST tmp;

View File

@ -58,7 +58,7 @@ m68kbsd_supply_gregset (struct regcache *regcache, const void *gregs)
static void
m68kbsd_supply_fpregset (struct regcache *regcache, const void *fpregs)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
const char *regs = fpregs;
int regnum;
@ -91,7 +91,7 @@ static void
m68kbsd_collect_fpregset (struct regcache *regcache,
void *fpregs, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
char *regs = fpregs;
int i;

View File

@ -58,7 +58,7 @@ m68kbsd_supply_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
const gdb_byte *regs = (const gdb_byte *) fpregs;
int i;

View File

@ -104,7 +104,7 @@ static int have_ptrace_getregs =
static void
fetch_register (struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
long regaddr, val;
int i;
gdb_byte buf[M68K_MAX_REGISTER_SIZE];
@ -139,7 +139,7 @@ old_fetch_inferior_registers (struct regcache *regcache, int regno)
else
{
for (regno = 0;
regno < gdbarch_num_regs (get_regcache_arch (regcache));
regno < gdbarch_num_regs (regcache->arch ());
regno++)
{
fetch_register (regcache, regno);
@ -152,7 +152,7 @@ old_fetch_inferior_registers (struct regcache *regcache, int regno)
static void
store_register (const struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
long regaddr, val;
int i;
gdb_byte buf[M68K_MAX_REGISTER_SIZE];
@ -191,7 +191,7 @@ old_store_inferior_registers (const struct regcache *regcache, int regno)
else
{
for (regno = 0;
regno < gdbarch_num_regs (get_regcache_arch (regcache));
regno < gdbarch_num_regs (regcache->arch ());
regno++)
{
store_register (regcache, regno);
@ -206,7 +206,7 @@ old_store_inferior_registers (const struct regcache *regcache, int regno)
void
supply_gregset (struct regcache *regcache, const elf_gregset_t *gregsetp)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
const elf_greg_t *regp = (const elf_greg_t *) gregsetp;
int regi;
@ -302,7 +302,7 @@ static void store_regs (const struct regcache *regcache, int tid, int regno)
void
supply_fpregset (struct regcache *regcache, const elf_fpregset_t *fpregsetp)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int regi;
for (regi = gdbarch_fp0_regnum (gdbarch);
@ -323,7 +323,7 @@ void
fill_fpregset (const struct regcache *regcache,
elf_fpregset_t *fpregsetp, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int i;
/* Fill in the floating-point registers. */

View File

@ -304,7 +304,7 @@ m68k_svr4_extract_return_value (struct type *type, struct regcache *regcache,
gdb_byte *valbuf)
{
gdb_byte buf[M68K_MAX_REGISTER_SIZE];
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (tdep->float_return && TYPE_CODE (type) == TYPE_CODE_FLT)
@ -344,7 +344,7 @@ static void
m68k_svr4_store_return_value (struct type *type, struct regcache *regcache,
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (tdep->float_return && TYPE_CODE (type) == TYPE_CODE_FLT)

View File

@ -252,7 +252,7 @@ static CORE_ADDR
m88k_store_arguments (struct regcache *regcache, int nargs,
struct value **args, CORE_ADDR sp)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int num_register_words = 0;
int num_stack_words = 0;
int i;

View File

@ -1006,7 +1006,7 @@ mi_cmd_data_list_changed_registers (const char *command, char **argv, int argc)
will change depending upon the particular processor being
debugged. */
gdbarch = get_regcache_arch (this_regs.get ());
gdbarch = this_regs->arch ();
numregs = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
ui_out_emit_list list_emitter (uiout, "changed-registers");
@ -1058,13 +1058,13 @@ static int
register_changed_p (int regnum, struct regcache *prev_regs,
struct regcache *this_regs)
{
struct gdbarch *gdbarch = get_regcache_arch (this_regs);
struct gdbarch *gdbarch = this_regs->arch ();
struct value *prev_value, *this_value;
int ret;
/* First time through or after gdbarch change consider all registers
as changed. */
if (!prev_regs || get_regcache_arch (prev_regs) != gdbarch)
if (!prev_regs || prev_regs->arch () != gdbarch)
return 1;
/* Get register contents and compare. */
@ -1231,7 +1231,7 @@ mi_cmd_data_write_register_values (const char *command, char **argv, int argc)
debugged. */
regcache = get_current_regcache ();
gdbarch = get_regcache_arch (regcache);
gdbarch = regcache->arch ();
numregs = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
if (argc == 0)

View File

@ -58,7 +58,7 @@ mips_fbsd_fetch_inferior_registers (struct target_ops *ops,
{
pid_t pid = get_ptrace_pid (regcache_get_ptid (regcache));
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (regnum == -1 || getregs_supplies (gdbarch, regnum))
{
struct reg regs;
@ -90,7 +90,7 @@ mips_fbsd_store_inferior_registers (struct target_ops *ops,
{
pid_t pid = get_ptrace_pid (regcache_get_ptid (regcache));
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (regnum == -1 || getregs_supplies (gdbarch, regnum))
{
struct reg regs;

View File

@ -71,7 +71,7 @@ void
mips_fbsd_supply_fpregs (struct regcache *regcache, int regnum,
const void *fpregs, size_t regsize)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
const gdb_byte *regs = (const gdb_byte *) fpregs;
int i, fp0num;
@ -100,7 +100,7 @@ void
mips_fbsd_supply_gregs (struct regcache *regcache, int regnum,
const void *gregs, size_t regsize)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
@ -117,7 +117,7 @@ void
mips_fbsd_collect_fpregs (const struct regcache *regcache, int regnum,
void *fpregs, size_t regsize)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
gdb_byte *regs = (gdb_byte *) fpregs;
int i, fp0num;
@ -144,7 +144,7 @@ void
mips_fbsd_collect_gregs (const struct regcache *regcache, int regnum,
void *gregs, size_t regsize)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
gdb_byte *regs = (gdb_byte *) gregs;
int i;
@ -162,7 +162,7 @@ mips_fbsd_supply_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
size_t regsize = mips_abi_regsize (get_regcache_arch (regcache));
size_t regsize = mips_abi_regsize (regcache->arch ());
gdb_assert (len >= MIPS_FBSD_NUM_FPREGS * regsize);
@ -179,7 +179,7 @@ mips_fbsd_collect_fpregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *fpregs, size_t len)
{
size_t regsize = mips_abi_regsize (get_regcache_arch (regcache));
size_t regsize = mips_abi_regsize (regcache->arch ());
gdb_assert (len >= MIPS_FBSD_NUM_FPREGS * regsize);
@ -195,7 +195,7 @@ mips_fbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache, int regnum,
const void *gregs, size_t len)
{
size_t regsize = mips_abi_regsize (get_regcache_arch (regcache));
size_t regsize = mips_abi_regsize (regcache->arch ());
gdb_assert (len >= MIPS_FBSD_NUM_GREGS * regsize);
@ -212,7 +212,7 @@ mips_fbsd_collect_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs, size_t len)
{
size_t regsize = mips_abi_regsize (get_regcache_arch (regcache));
size_t regsize = mips_abi_regsize (regcache->arch ());
gdb_assert (len >= MIPS_FBSD_NUM_GREGS * regsize);

View File

@ -167,7 +167,7 @@ ps_get_thread_area (struct ps_prochandle *ph,
void
supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregsetp)
{
if (mips_isa_regsize (get_regcache_arch (regcache)) == 4)
if (mips_isa_regsize (regcache->arch ()) == 4)
mips_supply_gregset (regcache, (const mips_elf_gregset_t *) gregsetp);
else
mips64_supply_gregset (regcache, (const mips64_elf_gregset_t *) gregsetp);
@ -177,7 +177,7 @@ void
fill_gregset (const struct regcache *regcache,
gdb_gregset_t *gregsetp, int regno)
{
if (mips_isa_regsize (get_regcache_arch (regcache)) == 4)
if (mips_isa_regsize (regcache->arch ()) == 4)
mips_fill_gregset (regcache, (mips_elf_gregset_t *) gregsetp, regno);
else
mips64_fill_gregset (regcache, (mips64_elf_gregset_t *) gregsetp, regno);
@ -186,7 +186,7 @@ fill_gregset (const struct regcache *regcache,
void
supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
{
if (mips_isa_regsize (get_regcache_arch (regcache)) == 4)
if (mips_isa_regsize (regcache->arch ()) == 4)
mips_supply_fpregset (regcache, (const mips_elf_fpregset_t *) fpregsetp);
else
mips64_supply_fpregset (regcache,
@ -197,7 +197,7 @@ void
fill_fpregset (const struct regcache *regcache,
gdb_fpregset_t *fpregsetp, int regno)
{
if (mips_isa_regsize (get_regcache_arch (regcache)) == 4)
if (mips_isa_regsize (regcache->arch ()) == 4)
mips_fill_fpregset (regcache, (mips_elf_fpregset_t *) fpregsetp, regno);
else
mips64_fill_fpregset (regcache,
@ -212,7 +212,7 @@ static void
mips64_linux_regsets_fetch_registers (struct target_ops *ops,
struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int is_fp, is_dsp;
int have_dsp;
int regi;
@ -298,7 +298,7 @@ static void
mips64_linux_regsets_store_registers (struct target_ops *ops,
struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int is_fp, is_dsp;
int have_dsp;
int regi;

View File

@ -132,7 +132,7 @@ mips_supply_gregset (struct regcache *regcache,
{
int regi;
const mips_elf_greg_t *regp = *gregsetp;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
for (regi = EF_REG0 + 1; regi <= EF_REG31; regi++)
supply_32bit_reg (regcache, regi - EF_REG0, regp + regi);
@ -171,7 +171,7 @@ void
mips_fill_gregset (const struct regcache *regcache,
mips_elf_gregset_t *gregsetp, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int regaddr, regi;
mips_elf_greg_t *regp = *gregsetp;
void *dst;
@ -239,7 +239,7 @@ void
mips_supply_fpregset (struct regcache *regcache,
const mips_elf_fpregset_t *fpregsetp)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int regi;
for (regi = 0; regi < 32; regi++)
@ -273,7 +273,7 @@ void
mips_fill_fpregset (const struct regcache *regcache,
mips_elf_fpregset_t *fpregsetp, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
char *to;
if ((regno >= gdbarch_fp0_regnum (gdbarch))
@ -355,7 +355,7 @@ static void
supply_64bit_reg (struct regcache *regcache, int regnum,
const gdb_byte *buf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG
&& register_size (gdbarch, regnum) == 4)
regcache_raw_supply (regcache, regnum, buf + 4);
@ -371,7 +371,7 @@ mips64_supply_gregset (struct regcache *regcache,
{
int regi;
const mips64_elf_greg_t *regp = *gregsetp;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
for (regi = MIPS64_EF_REG0 + 1; regi <= MIPS64_EF_REG31; regi++)
supply_64bit_reg (regcache, regi - MIPS64_EF_REG0,
@ -415,7 +415,7 @@ void
mips64_fill_gregset (const struct regcache *regcache,
mips64_elf_gregset_t *gregsetp, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int regaddr, regi;
mips64_elf_greg_t *regp = *gregsetp;
void *dst;
@ -479,7 +479,7 @@ void
mips64_supply_fpregset (struct regcache *regcache,
const mips64_elf_fpregset_t *fpregsetp)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int regi;
/* See mips_linux_o32_sigframe_init for a description of the
@ -529,7 +529,7 @@ void
mips64_fill_fpregset (const struct regcache *regcache,
mips64_elf_fpregset_t *fpregsetp, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
gdb_byte *to;
@ -1352,7 +1352,7 @@ micromips_linux_sigframe_validate (const struct tramp_frame *self,
static void
mips_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
mips_write_pc (regcache, pc);

View File

@ -44,7 +44,7 @@ mipsnbsd_fetch_inferior_registers (struct target_ops *ops,
{
pid_t pid = ptid_get_pid (regcache_get_ptid (regcache));
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (regno == -1 || getregs_supplies (gdbarch, regno))
{
struct reg regs;
@ -58,7 +58,7 @@ mipsnbsd_fetch_inferior_registers (struct target_ops *ops,
}
if (regno == -1
|| regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
|| regno >= gdbarch_fp0_regnum (regcache->arch ()))
{
struct fpreg fpregs;
@ -75,7 +75,7 @@ mipsnbsd_store_inferior_registers (struct target_ops *ops,
{
pid_t pid = ptid_get_pid (regcache_get_ptid (regcache));
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (regno == -1 || getregs_supplies (gdbarch, regno))
{
struct reg regs;
@ -93,7 +93,7 @@ mipsnbsd_store_inferior_registers (struct target_ops *ops,
}
if (regno == -1
|| regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
|| regno >= gdbarch_fp0_regnum (regcache->arch ()))
{
struct fpreg fpregs;

View File

@ -55,7 +55,7 @@ mipsnbsd_supply_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
size_t regsize = mips_isa_regsize (get_regcache_arch (regcache));
size_t regsize = mips_isa_regsize (regcache->arch ());
const char *regs = (const char *) fpregs;
int i;
@ -78,7 +78,7 @@ mipsnbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache, int regnum,
const void *gregs, size_t len)
{
size_t regsize = mips_isa_regsize (get_regcache_arch (regcache));
size_t regsize = mips_isa_regsize (regcache->arch ());
const char *regs = (const char *) gregs;
int i;
@ -137,7 +137,7 @@ mipsnbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
void
mipsnbsd_supply_reg (struct regcache *regcache, const char *regs, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int i;
for (i = 0; i <= gdbarch_pc_regnum (gdbarch); i++)
@ -156,7 +156,7 @@ mipsnbsd_supply_reg (struct regcache *regcache, const char *regs, int regno)
void
mipsnbsd_fill_reg (const struct regcache *regcache, char *regs, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int i;
for (i = 0; i <= gdbarch_pc_regnum (gdbarch); i++)
@ -170,7 +170,7 @@ void
mipsnbsd_supply_fpreg (struct regcache *regcache,
const char *fpregs, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int i;
for (i = gdbarch_fp0_regnum (gdbarch);
@ -193,7 +193,7 @@ mipsnbsd_supply_fpreg (struct regcache *regcache,
void
mipsnbsd_fill_fpreg (const struct regcache *regcache, char *fpregs, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int i;
for (i = gdbarch_fp0_regnum (gdbarch);

View File

@ -1365,7 +1365,7 @@ mips_in_frame_stub (CORE_ADDR pc)
static CORE_ADDR
mips_read_pc (struct regcache *regcache)
{
int regnum = gdbarch_pc_regnum (get_regcache_arch (regcache));
int regnum = gdbarch_pc_regnum (regcache->arch ());
LONGEST pc;
regcache_cooked_read_signed (regcache, regnum, &pc);
@ -1421,7 +1421,7 @@ mips_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
void
mips_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
int regnum = gdbarch_pc_regnum (get_regcache_arch (regcache));
int regnum = gdbarch_pc_regnum (regcache->arch ());
regcache_cooked_write_unsigned (regcache, regnum, pc);
}
@ -1607,7 +1607,7 @@ is_octeon_bbit_op (int op, struct gdbarch *gdbarch)
static CORE_ADDR
mips32_next_pc (struct regcache *regcache, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
unsigned long inst;
int op;
inst = mips_fetch_instruction (gdbarch, ISA_MIPS, pc, NULL);
@ -1874,7 +1874,7 @@ micromips_bc1_pc (struct gdbarch *gdbarch, struct regcache *regcache,
static CORE_ADDR
micromips_next_pc (struct regcache *regcache, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
ULONGEST insn;
insn = mips_fetch_instruction (gdbarch, ISA_MICROMIPS, pc, NULL);
@ -2228,7 +2228,7 @@ static CORE_ADDR
extended_mips16_next_pc (regcache *regcache, CORE_ADDR pc,
unsigned int extension, unsigned int insn)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int op = (insn >> 11);
switch (op)
{
@ -2332,7 +2332,7 @@ extended_mips16_next_pc (regcache *regcache, CORE_ADDR pc,
static CORE_ADDR
mips16_next_pc (struct regcache *regcache, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
unsigned int insn = fetch_mips_16 (gdbarch, pc);
return extended_mips16_next_pc (regcache, pc, 0, insn);
}
@ -2345,7 +2345,7 @@ mips16_next_pc (struct regcache *regcache, CORE_ADDR pc)
static CORE_ADDR
mips_next_pc (struct regcache *regcache, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (mips_pc_is_mips16 (gdbarch, pc))
return mips16_next_pc (regcache, pc);
@ -4156,7 +4156,7 @@ deal_with_atomic_sequence (struct gdbarch *gdbarch, CORE_ADDR pc)
std::vector<CORE_ADDR>
mips_software_single_step (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
CORE_ADDR pc, next_pc;
pc = regcache_read_pc (regcache);

View File

@ -108,7 +108,7 @@ static void
moxie_store_return_value (struct type *type, struct regcache *regcache,
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR regval;
int len = TYPE_LENGTH (type);
@ -298,7 +298,7 @@ moxie_process_readu (CORE_ADDR addr, gdb_byte *buf,
static std::vector<CORE_ADDR>
moxie_software_single_step (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
CORE_ADDR addr;
gdb_byte buf[4];
uint16_t inst;
@ -482,7 +482,7 @@ static void
moxie_extract_return_value (struct type *type, struct regcache *regcache,
gdb_byte *dst)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int len = TYPE_LENGTH (type);
ULONGEST tmp;

View File

@ -2115,7 +2115,7 @@ static const struct frame_unwind nios2_stub_frame_unwind =
static CORE_ADDR
nios2_get_next_pc (struct regcache *regcache, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
unsigned long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
unsigned int insn;
@ -2209,7 +2209,7 @@ nios2_get_next_pc (struct regcache *regcache, CORE_ADDR pc)
static std::vector<CORE_ADDR>
nios2_software_single_step (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
CORE_ADDR next_pc = nios2_get_next_pc (regcache, regcache_read_pc (regcache));
return {next_pc};

View File

@ -1386,7 +1386,7 @@ procfs_store_registers (struct target_ops *ops,
if (dev_set == -1)
return;
len = nto_register_area (get_regcache_arch (regcache),
len = nto_register_area (regcache->arch (),
regno, regset, &off);
if (len < 1)

View File

@ -127,7 +127,7 @@ ppcfbsd_fetch_inferior_registers (struct target_ops *ops,
supply_gregset (regcache, &regs);
if (regno == -1 || getfpregs_supplies (get_regcache_arch (regcache), regno))
if (regno == -1 || getfpregs_supplies (regcache->arch (), regno))
{
const struct regset *fpregset = ppc_fbsd_fpregset ();
gdb_fpregset_t fpregs;
@ -157,7 +157,7 @@ ppcfbsd_store_inferior_registers (struct target_ops *ops,
if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name (_("Couldn't write registers"));
if (regno == -1 || getfpregs_supplies (get_regcache_arch (regcache), regno))
if (regno == -1 || getfpregs_supplies (regcache->arch (), regno))
{
gdb_fpregset_t fpregs;
@ -178,7 +178,7 @@ ppcfbsd_store_inferior_registers (struct target_ops *ops,
static int
ppcfbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int i, regnum;

View File

@ -359,7 +359,7 @@ fetch_vsx_register (struct regcache *regcache, int tid, int regno)
{
int ret;
gdb_vsxregset_t regs;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int vsxregsize = register_size (gdbarch, tdep->ppc_vsr0_upper_regnum);
@ -388,7 +388,7 @@ fetch_altivec_register (struct regcache *regcache, int tid, int regno)
int ret;
int offset = 0;
gdb_vrregset_t regs;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int vrregsize = register_size (gdbarch, tdep->ppc_vr0_regnum);
@ -452,7 +452,7 @@ get_spe_registers (int tid, struct gdb_evrregset_t *evrregset)
static void
fetch_spe_register (struct regcache *regcache, int tid, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
struct gdb_evrregset_t evrregs;
@ -491,7 +491,7 @@ fetch_spe_register (struct regcache *regcache, int tid, int regno)
static void
fetch_register (struct regcache *regcache, int tid, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
/* This isn't really an address. But ptrace thinks of it as one. */
CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
@ -583,7 +583,7 @@ static void
supply_vsxregset (struct regcache *regcache, gdb_vsxregset_t *vsxregsetp)
{
int i;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int vsxregsize = register_size (gdbarch, tdep->ppc_vsr0_upper_regnum);
@ -598,7 +598,7 @@ static void
supply_vrregset (struct regcache *regcache, gdb_vrregset_t *vrregsetp)
{
int i;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int num_of_vrregs = tdep->ppc_vrsave_regnum - tdep->ppc_vr0_regnum + 1;
int vrregsize = register_size (gdbarch, tdep->ppc_vr0_regnum);
@ -668,7 +668,7 @@ fetch_altivec_registers (struct regcache *regcache, int tid)
static int
fetch_all_gp_regs (struct regcache *regcache, int tid)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
gdb_gregset_t gregset;
@ -696,7 +696,7 @@ fetch_all_gp_regs (struct regcache *regcache, int tid)
static void
fetch_gp_regs (struct regcache *regcache, int tid)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int i;
@ -748,7 +748,7 @@ fetch_all_fp_regs (struct regcache *regcache, int tid)
static void
fetch_fp_regs (struct regcache *regcache, int tid)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int i;
@ -767,7 +767,7 @@ static void
fetch_ppc_registers (struct regcache *regcache, int tid)
{
int i;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
fetch_gp_regs (regcache, tid);
@ -824,7 +824,7 @@ store_vsx_register (const struct regcache *regcache, int tid, int regno)
{
int ret;
gdb_vsxregset_t regs;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int vsxregsize = register_size (gdbarch, tdep->ppc_vsr0_upper_regnum);
@ -854,7 +854,7 @@ store_altivec_register (const struct regcache *regcache, int tid, int regno)
int ret;
int offset = 0;
gdb_vrregset_t regs;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int vrregsize = register_size (gdbarch, tdep->ppc_vr0_regnum);
@ -918,7 +918,7 @@ set_spe_registers (int tid, struct gdb_evrregset_t *evrregset)
static void
store_spe_register (const struct regcache *regcache, int tid, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
struct gdb_evrregset_t evrregs;
@ -973,7 +973,7 @@ store_spe_register (const struct regcache *regcache, int tid, int regno)
static void
store_register (const struct regcache *regcache, int tid, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
/* This isn't really an address. But ptrace thinks of it as one. */
CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
@ -1050,7 +1050,7 @@ static void
fill_vsxregset (const struct regcache *regcache, gdb_vsxregset_t *vsxregsetp)
{
int i;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int vsxregsize = register_size (gdbarch, tdep->ppc_vsr0_upper_regnum);
@ -1063,7 +1063,7 @@ static void
fill_vrregset (const struct regcache *regcache, gdb_vrregset_t *vrregsetp)
{
int i;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int num_of_vrregs = tdep->ppc_vrsave_regnum - tdep->ppc_vr0_regnum + 1;
int vrregsize = register_size (gdbarch, tdep->ppc_vr0_regnum);
@ -1139,7 +1139,7 @@ store_altivec_registers (const struct regcache *regcache, int tid)
static int
store_all_gp_regs (const struct regcache *regcache, int tid, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
gdb_gregset_t gregset;
@ -1177,7 +1177,7 @@ store_all_gp_regs (const struct regcache *regcache, int tid, int regno)
static void
store_gp_regs (const struct regcache *regcache, int tid, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int i;
@ -1239,7 +1239,7 @@ store_all_fp_regs (const struct regcache *regcache, int tid, int regno)
static void
store_fp_regs (const struct regcache *regcache, int tid, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int i;
@ -1258,7 +1258,7 @@ static void
store_ppc_registers (const struct regcache *regcache, int tid)
{
int i;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
store_gp_regs (regcache, tid, -1);

View File

@ -375,7 +375,7 @@ ppc_linux_supply_gregset (const struct regset *regset,
ppc_supply_gregset (regset, regcache, regnum, gregs, len);
if (ppc_linux_trap_reg_p (get_regcache_arch (regcache)))
if (ppc_linux_trap_reg_p (regcache->arch ()))
{
/* "orig_r3" is stored 2 slots after "pc". */
if (regnum == -1 || regnum == PPC_ORIG_R3_REGNUM)
@ -405,7 +405,7 @@ ppc_linux_collect_gregset (const struct regset *regset,
ppc_collect_gregset (regset, regcache, regnum, gregs, len);
if (ppc_linux_trap_reg_p (get_regcache_arch (regcache)))
if (ppc_linux_trap_reg_p (regcache->arch ()))
{
/* "orig_r3" is stored 2 slots after "pc". */
if (regnum == -1 || regnum == PPC_ORIG_R3_REGNUM)
@ -798,7 +798,7 @@ ppc_canonicalize_syscall (int syscall)
static int
ppc_linux_syscall_record (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
ULONGEST scnum;
enum gdb_syscall syscall_gdb;
@ -927,7 +927,7 @@ ppc_linux_record_signal (struct gdbarch *gdbarch, struct regcache *regcache,
static void
ppc_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
regcache_cooked_write_unsigned (regcache, gdbarch_pc_regnum (gdbarch), pc);
@ -1257,7 +1257,7 @@ static struct gdbarch *
ppu2spu_prev_arch (struct frame_info *this_frame, void **this_cache)
{
struct ppu2spu_cache *cache = (struct ppu2spu_cache *) *this_cache;
return get_regcache_arch (cache->regcache);
return cache->regcache->arch ();
}
static void
@ -1273,7 +1273,7 @@ ppu2spu_prev_register (struct frame_info *this_frame,
void **this_cache, int regnum)
{
struct ppu2spu_cache *cache = (struct ppu2spu_cache *) *this_cache;
struct gdbarch *gdbarch = get_regcache_arch (cache->regcache);
struct gdbarch *gdbarch = cache->regcache->arch ();
gdb_byte *buf;
buf = (gdb_byte *) alloca (register_size (gdbarch, regnum));

View File

@ -80,7 +80,7 @@ static void
ppcnbsd_fetch_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
pid_t pid = ptid_get_pid (regcache_get_ptid (regcache));
if (regnum == -1 || getregs_supplies (gdbarch, regnum))
@ -110,7 +110,7 @@ static void
ppcnbsd_store_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
pid_t pid = ptid_get_pid (regcache_get_ptid (regcache));
if (regnum == -1 || getregs_supplies (gdbarch, regnum))
@ -147,7 +147,7 @@ ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
{
struct switchframe sf;
struct callframe cf;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int i;

View File

@ -89,7 +89,7 @@ ppcobsd_fetch_registers (struct target_ops *ops,
#ifdef PT_GETFPREGS
if (regnum == -1
|| getfpregs_supplies (get_regcache_arch (regcache), regnum))
|| getfpregs_supplies (regcache->arch (), regnum))
{
struct fpreg fpregs;
@ -127,7 +127,7 @@ ppcobsd_store_registers (struct target_ops *ops,
#ifdef PT_GETFPREGS
if (regnum == -1
|| getfpregs_supplies (get_regcache_arch (regcache), regnum))
|| getfpregs_supplies (regcache->arch (), regnum))
{
struct fpreg fpregs;
@ -147,7 +147,7 @@ ppcobsd_store_registers (struct target_ops *ops,
static int
ppcobsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
struct switchframe sf;
struct callframe cf;

View File

@ -119,7 +119,7 @@ static void
supply_register_at_address (struct regcache *regcache, int regnum,
CORE_ADDR register_addr)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int buf_size = register_size (gdbarch, regnum);
gdb_byte *buf;
@ -147,7 +147,7 @@ ppc_ravenscar_generic_fetch_registers
(const struct ravenscar_reg_info *reg_info,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
const int num_regs = gdbarch_num_regs (gdbarch);
int current_regnum;
CORE_ADDR current_address;
@ -186,7 +186,7 @@ ppc_ravenscar_generic_store_registers
(const struct ravenscar_reg_info *reg_info,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int buf_size = register_size (gdbarch, regnum);
gdb_byte buf[buf_size];
ULONGEST register_address;

View File

@ -3223,7 +3223,7 @@ procfs_fetch_registers (struct target_ops *ops,
ptid_t ptid = regcache_get_ptid (regcache);
int pid = ptid_get_pid (ptid);
int tid = ptid_get_lwp (ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
pi = find_procinfo_or_die (pid, tid);
@ -3273,7 +3273,7 @@ procfs_store_registers (struct target_ops *ops,
ptid_t ptid = regcache_get_ptid (regcache);
int pid = ptid_get_pid (ptid);
int tid = ptid_get_lwp (ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
pi = find_procinfo_or_die (pid, tid);

View File

@ -276,7 +276,7 @@ ravenscar_fetch_registers (struct target_ops *ops,
beneath->to_fetch_registers (beneath, regcache, regnum);
else
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct ravenscar_arch_ops *arch_ops
= gdbarch_ravenscar_ops (gdbarch);
@ -297,7 +297,7 @@ ravenscar_store_registers (struct target_ops *ops,
beneath->to_store_registers (beneath, regcache, regnum);
else
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct ravenscar_arch_ops *arch_ops
= gdbarch_ravenscar_ops (gdbarch);
@ -318,7 +318,7 @@ ravenscar_prepare_to_store (struct target_ops *self,
beneath->to_prepare_to_store (beneath, regcache);
else
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct ravenscar_arch_ops *arch_ops
= gdbarch_ravenscar_ops (gdbarch);

View File

@ -1423,7 +1423,7 @@ record_btrace_fetch_registers (struct target_ops *ops,
struct gdbarch *gdbarch;
int pcreg;
gdbarch = get_regcache_arch (regcache);
gdbarch = regcache->arch ();
pcreg = gdbarch_pc_regnum (gdbarch);
if (pcreg < 0)
return;

View File

@ -244,7 +244,7 @@ static inline struct record_full_entry *
record_full_reg_alloc (struct regcache *regcache, int regnum)
{
struct record_full_entry *rec;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
rec = XCNEW (struct record_full_entry);
rec->type = record_full_reg;
@ -569,7 +569,7 @@ static void
record_full_message (struct regcache *regcache, enum gdb_signal signal)
{
int ret;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct cleanup *old_cleanups
= make_cleanup (record_full_arch_list_cleanups, 0);
@ -775,7 +775,7 @@ static void
record_full_core_open_1 (const char *name, int from_tty)
{
struct regcache *regcache = get_current_regcache ();
int regnum = gdbarch_num_regs (get_regcache_arch (regcache));
int regnum = gdbarch_num_regs (regcache->arch ());
int i;
/* Get record_full_core_regbuf. */
@ -1171,7 +1171,7 @@ record_full_wait_1 (struct target_ops *ops,
else
{
struct regcache *regcache = get_current_regcache ();
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct address_space *aspace = get_regcache_aspace (regcache);
int continue_flag = 1;
int first_record_full_end = 1;
@ -1405,7 +1405,7 @@ record_full_registers_change (struct regcache *regcache, int regnum)
{
int i;
for (i = 0; i < gdbarch_num_regs (get_regcache_arch (regcache)); i++)
for (i = 0; i < gdbarch_num_regs (regcache->arch ()); i++)
{
if (record_full_arch_list_add_reg (regcache, i))
{
@ -1462,7 +1462,7 @@ record_full_store_registers (struct target_ops *ops,
query (_("Because GDB is in replay mode, changing the value "
"of a register will make the execution log unusable "
"from this point onward. Change register %s?"),
gdbarch_register_name (get_regcache_arch (regcache),
gdbarch_register_name (regcache->arch (),
regno));
if (!n)
@ -1474,7 +1474,7 @@ record_full_store_registers (struct target_ops *ops,
int i;
for (i = 0;
i < gdbarch_num_regs (get_regcache_arch (regcache));
i < gdbarch_num_regs (regcache->arch ());
i++)
regcache_invalidate (regcache, i);
}
@ -2029,7 +2029,7 @@ record_full_core_fetch_registers (struct target_ops *ops,
{
if (regno < 0)
{
int num = gdbarch_num_regs (get_regcache_arch (regcache));
int num = gdbarch_num_regs (regcache->arch ());
int i;
for (i = 0; i < num; i ++)
@ -2548,7 +2548,7 @@ record_full_save (struct target_ops *self, const char *recfilename)
/* Get the values of regcache and gdbarch. */
regcache = get_current_regcache ();
gdbarch = get_regcache_arch (regcache);
gdbarch = regcache->arch ();
/* Disable the GDB operation record. */
scoped_restore restore_operation_disable
@ -2734,7 +2734,7 @@ record_full_goto_insn (struct record_full_entry *entry,
scoped_restore restore_operation_disable
= record_full_gdb_operation_disable_set ();
struct regcache *regcache = get_current_regcache ();
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
/* Assume everything is valid: we will hit the entry,
and we will not hit the end of the recording. */

View File

@ -185,7 +185,7 @@ register_size (struct gdbarch *gdbarch, int regnum)
int
regcache_register_size (const struct regcache *regcache, int n)
{
return register_size (get_regcache_arch (regcache), n);
return register_size (regcache->arch (), n);
}
regcache::regcache (gdbarch *gdbarch, address_space *aspace_,
@ -272,14 +272,6 @@ private:
int m_regnum;
};
/* Return REGCACHE's architecture. */
struct gdbarch *
get_regcache_arch (const struct regcache *regcache)
{
return regcache->arch ();
}
struct address_space *
get_regcache_aspace (const struct regcache *regcache)
{
@ -1245,7 +1237,7 @@ regcache::collect_regset (const struct regset *regset,
CORE_ADDR
regcache_read_pc (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
CORE_ADDR pc_val;
@ -1272,7 +1264,7 @@ regcache_read_pc (struct regcache *regcache)
void
regcache_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (gdbarch_write_pc_p (gdbarch))
gdbarch_write_pc (gdbarch, regcache, pc);

View File

@ -39,10 +39,6 @@ extern struct regcache *get_thread_arch_aspace_regcache (ptid_t,
extern ptid_t regcache_get_ptid (const struct regcache *regcache);
/* Return REGCACHE's architecture. */
extern struct gdbarch *get_regcache_arch (const struct regcache *regcache);
/* Return REGCACHE's address space. */
extern struct address_space *get_regcache_aspace (const struct regcache *);
@ -258,6 +254,7 @@ public:
xfree (m_register_status);
}
/* Return regcache's architecture. */
gdbarch *arch () const;
address_space *aspace () const

View File

@ -427,7 +427,7 @@ static void
gdbsim_fetch_register (struct target_ops *ops,
struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct inferior *inf = find_inferior_ptid (regcache_get_ptid (regcache));
struct sim_inferior_data *sim_data
= get_sim_inferior_data (inf, SIM_INSTANCE_NEEDED);
@ -497,7 +497,7 @@ static void
gdbsim_store_register (struct target_ops *ops,
struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct inferior *inf = find_inferior_ptid (regcache_get_ptid (regcache));
struct sim_inferior_data *sim_data
= get_sim_inferior_data (inf, SIM_INSTANCE_NEEDED);

View File

@ -7549,7 +7549,7 @@ remote_wait (struct target_ops *ops,
static int
fetch_register_using_p (struct regcache *regcache, struct packet_reg *reg)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct remote_state *rs = get_remote_state ();
char *buf, *p;
gdb_byte *regp = (gdb_byte *) alloca (register_size (gdbarch, reg->regnum));
@ -7578,7 +7578,7 @@ fetch_register_using_p (struct regcache *regcache, struct packet_reg *reg)
return 0;
case PACKET_ERROR:
error (_("Could not fetch register \"%s\"; remote failure reply '%s'"),
gdbarch_register_name (get_regcache_arch (regcache),
gdbarch_register_name (regcache->arch (),
reg->regnum),
buf);
}
@ -7642,7 +7642,7 @@ send_g_packet (void)
static void
process_g_packet (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct remote_state *rs = get_remote_state ();
remote_arch_state *rsa = get_remote_arch_state (gdbarch);
int i, buf_len;
@ -7778,7 +7778,7 @@ static void
remote_fetch_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
remote_arch_state *rsa = get_remote_arch_state (gdbarch);
int i;
@ -7838,7 +7838,7 @@ remote_prepare_to_store (struct target_ops *self, struct regcache *regcache)
case PACKET_DISABLE:
case PACKET_SUPPORT_UNKNOWN:
/* Make sure all the necessary registers are cached. */
for (i = 0; i < gdbarch_num_regs (get_regcache_arch (regcache)); i++)
for (i = 0; i < gdbarch_num_regs (regcache->arch ()); i++)
if (rsa->regs[i].in_g_packet)
regcache_raw_update (regcache, rsa->regs[i].regnum);
break;
@ -7854,7 +7854,7 @@ static int
store_register_using_P (const struct regcache *regcache,
struct packet_reg *reg)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct remote_state *rs = get_remote_state ();
/* Try storing a single register. */
char *buf = rs->buf;
@ -7906,7 +7906,7 @@ store_registers_using_G (const struct regcache *regcache)
regs = (gdb_byte *) alloca (rsa->sizeof_g_packet);
memset (regs, 0, rsa->sizeof_g_packet);
for (i = 0; i < gdbarch_num_regs (get_regcache_arch (regcache)); i++)
for (i = 0; i < gdbarch_num_regs (regcache->arch ()); i++)
{
struct packet_reg *r = &rsa->regs[i];

View File

@ -121,7 +121,7 @@ save_bookmark_command (char *args, int from_tty)
{
/* Get target's idea of a bookmark. */
gdb_byte *bookmark_id = target_get_bookmark (args, from_tty);
struct gdbarch *gdbarch = get_regcache_arch (get_current_regcache ());
struct gdbarch *gdbarch = get_current_regcache ()->arch ();
/* CR should not cause another identical bookmark. */
dont_repeat ();
@ -280,7 +280,7 @@ goto_bookmark_command (char *args, int from_tty)
static int
bookmark_1 (int bnum)
{
struct gdbarch *gdbarch = get_regcache_arch (get_current_regcache ());
struct gdbarch *gdbarch = get_current_regcache ()->arch ();
struct bookmark *b;
int matched = 0;

View File

@ -600,7 +600,7 @@ static CORE_ADDR
branch_dest (struct regcache *regcache, int opcode, int instr,
CORE_ADDR pc, CORE_ADDR safety)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR dest;
@ -676,7 +676,7 @@ branch_dest (struct regcache *regcache, int opcode, int instr,
static std::vector<CORE_ADDR>
rs6000_software_single_step (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int ii, insn;
CORE_ADDR loc;

View File

@ -161,7 +161,7 @@ rs6000_ptrace64 (int req, int id, long long addr, int data, void *buf)
static void
fetch_register (struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int addr[PPC_MAX_REGISTER_SIZE];
int nr, isfloat;
pid_t pid = ptid_get_pid (regcache_get_ptid (regcache));
@ -220,7 +220,7 @@ fetch_register (struct regcache *regcache, int regno)
static void
store_register (struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int addr[PPC_MAX_REGISTER_SIZE];
int nr, isfloat;
pid_t pid = ptid_get_pid (regcache_get_ptid (regcache));
@ -281,7 +281,7 @@ static void
rs6000_fetch_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (regno != -1)
fetch_register (regcache, regno);
@ -324,7 +324,7 @@ static void
rs6000_store_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (regno != -1)
store_register (regcache, regno);

View File

@ -393,7 +393,7 @@ ppc_supply_reg (struct regcache *regcache, int regnum,
{
if (regsize > 4)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int gdb_regsize = register_size (gdbarch, regnum);
if (gdb_regsize < regsize
&& gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
@ -414,7 +414,7 @@ ppc_collect_reg (const struct regcache *regcache, int regnum,
{
if (regsize > 4)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int gdb_regsize = register_size (gdbarch, regnum);
if (gdb_regsize < regsize)
{
@ -511,7 +511,7 @@ void
ppc_supply_gregset (const struct regset *regset, struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
const struct ppc_reg_offsets *offsets
= (const struct ppc_reg_offsets *) regset->regmap;
@ -561,7 +561,7 @@ void
ppc_supply_fpregset (const struct regset *regset, struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep;
const struct ppc_reg_offsets *offsets;
size_t offset;
@ -599,7 +599,7 @@ void
ppc_supply_vsxregset (const struct regset *regset, struct regcache *regcache,
int regnum, const void *vsxregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep;
if (!ppc_vsx_support_p (gdbarch))
@ -630,7 +630,7 @@ void
ppc_supply_vrregset (const struct regset *regset, struct regcache *regcache,
int regnum, const void *vrregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep;
const struct ppc_reg_offsets *offsets;
size_t offset;
@ -676,7 +676,7 @@ ppc_collect_gregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *gregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
const struct ppc_reg_offsets *offsets
= (const struct ppc_reg_offsets *) regset->regmap;
@ -727,7 +727,7 @@ ppc_collect_fpregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *fpregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep;
const struct ppc_reg_offsets *offsets;
size_t offset;
@ -767,7 +767,7 @@ ppc_collect_vsxregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *vsxregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep;
if (!ppc_vsx_support_p (gdbarch))
@ -801,7 +801,7 @@ ppc_collect_vrregset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *vrregs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep;
const struct ppc_reg_offsets *offsets;
size_t offset;
@ -1170,7 +1170,7 @@ ppc_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
std::vector<CORE_ADDR>
ppc_deal_with_atomic_sequence (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR pc = regcache_read_pc (regcache);
CORE_ADDR breaks[2] = {-1, -1};
@ -2677,7 +2677,7 @@ static enum register_status
e500_move_ev_register (move_ev_register_func move,
struct regcache *regcache, int ev_reg, void *buffer)
{
struct gdbarch *arch = get_regcache_arch (regcache);
struct gdbarch *arch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (arch);
int reg_index;
gdb_byte *byte_buffer = (gdb_byte *) buffer;
@ -2891,7 +2891,7 @@ rs6000_pseudo_register_read (struct gdbarch *gdbarch,
struct regcache *regcache,
int reg_nr, gdb_byte *buffer)
{
struct gdbarch *regcache_arch = get_regcache_arch (regcache);
struct gdbarch *regcache_arch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
gdb_assert (regcache_arch == gdbarch);
@ -2916,7 +2916,7 @@ rs6000_pseudo_register_write (struct gdbarch *gdbarch,
struct regcache *regcache,
int reg_nr, const gdb_byte *buffer)
{
struct gdbarch *regcache_arch = get_regcache_arch (regcache);
struct gdbarch *regcache_arch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
gdb_assert (regcache_arch == gdbarch);

View File

@ -119,7 +119,7 @@ void
supply_gregset (struct regcache *regcache, const gregset_t *regp)
{
#ifdef __s390x__
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (gdbarch_ptr_bit (gdbarch) == 32)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@ -153,7 +153,7 @@ void
fill_gregset (const struct regcache *regcache, gregset_t *regp, int regno)
{
#ifdef __s390x__
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (gdbarch_ptr_bit (gdbarch) == 32)
{
regcache_collect_regset (&s390_64_gregset, regcache, regno,
@ -383,7 +383,7 @@ s390_linux_fetch_inferior_registers (struct target_ops *ops,
if (have_regset_last_break)
if (regnum == -1 || regnum == S390_LAST_BREAK_REGNUM)
fetch_regset (regcache, tid, NT_S390_LAST_BREAK, 8,
(gdbarch_ptr_bit (get_regcache_arch (regcache)) == 32
(gdbarch_ptr_bit (regcache->arch ()) == 32
? &s390_last_break_regset : &s390x_last_break_regset));
if (have_regset_system_call)

View File

@ -157,7 +157,7 @@ s390_cannot_store_register (struct gdbarch *gdbarch, int regnum)
static void
s390_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
regcache_cooked_write_unsigned (regcache, tdep->pc_regnum, pc);
@ -730,7 +730,7 @@ s390_is_partial_instruction (struct gdbarch *gdbarch, CORE_ADDR loc, int *len)
static std::vector<CORE_ADDR>
s390_software_single_step (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
CORE_ADDR loc = regcache_read_pc (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int len;
@ -2697,7 +2697,7 @@ static struct linux_record_tdep s390x_linux_record_tdep;
static int
s390_all_but_pc_registers_record (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int i;
@ -2899,7 +2899,7 @@ s390_canonicalize_syscall (int syscall, enum s390_abi_kind abi)
static int
s390_linux_syscall_record (struct regcache *regcache, LONGEST syscall_native)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int ret;
enum gdb_syscall syscall_gdb;

View File

@ -74,7 +74,7 @@ sentinel_frame_prev_arch (struct frame_info *this_frame,
struct frame_unwind_cache *cache
= (struct frame_unwind_cache *) *this_prologue_cache;
return get_regcache_arch (cache->regcache);
return cache->regcache->arch ();
}
const struct frame_unwind sentinel_frame_unwind =

View File

@ -47,7 +47,7 @@ shnbsd_fetch_inferior_registers (struct target_ops *ops,
{
pid_t pid = ptid_get_pid (regcache_get_ptid (regcache));
if (regno == -1 || GETREGS_SUPPLIES (get_regcache_arch (regcache), regno))
if (regno == -1 || GETREGS_SUPPLIES (regcache->arch (), regno))
{
struct reg inferior_registers;
@ -70,7 +70,7 @@ shnbsd_store_inferior_registers (struct target_ops *ops,
{
pid_t pid = ptid_get_pid (regcache_get_ptid (regcache));
if (regno == -1 || GETREGS_SUPPLIES (get_regcache_arch (regcache), regno))
if (regno == -1 || GETREGS_SUPPLIES (regcache->arch (), regno))
{
struct reg inferior_registers;

View File

@ -1310,7 +1310,7 @@ static void
sh_extract_return_value_nofpu (struct type *type, struct regcache *regcache,
gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int len = TYPE_LENGTH (type);
@ -1335,7 +1335,7 @@ static void
sh_extract_return_value_fpu (struct type *type, struct regcache *regcache,
gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (sh_treat_as_flt_p (type))
{
int len = TYPE_LENGTH (type);
@ -1361,7 +1361,7 @@ static void
sh_store_return_value_nofpu (struct type *type, struct regcache *regcache,
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST val;
int len = TYPE_LENGTH (type);
@ -1383,7 +1383,7 @@ static void
sh_store_return_value_fpu (struct type *type, struct regcache *regcache,
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
if (sh_treat_as_flt_p (type))
{
int len = TYPE_LENGTH (type);
@ -2165,7 +2165,7 @@ sh_corefile_supply_regset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *regs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
const struct sh_corefile_regmap *regmap = (regset == &sh_corefile_gregset
? tdep->core_gregmap
@ -2191,7 +2191,7 @@ sh_corefile_collect_regset (const struct regset *regset,
const struct regcache *regcache,
int regnum, void *regs, size_t len)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
const struct sh_corefile_regmap *regmap = (regset == &sh_corefile_gregset
? tdep->core_gregmap

View File

@ -1241,7 +1241,7 @@ static void
sh64_extract_return_value (struct type *type, struct regcache *regcache,
gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
int len = TYPE_LENGTH (type);
if (TYPE_CODE (type) == TYPE_CODE_FLT)
@ -1295,7 +1295,7 @@ static void
sh64_store_return_value (struct type *type, struct regcache *regcache,
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
gdb_byte buf[64]; /* more than enough... */
int len = TYPE_LENGTH (type);

View File

@ -253,7 +253,7 @@ sparc32_linux_collect_core_fpregset (const struct regset *regset,
static void
sparc_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
ULONGEST psr;
regcache_cooked_write_unsigned (regcache, tdep->pc_regnum, pc);

View File

@ -137,7 +137,7 @@ void
sparc_fetch_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
pid_t pid;
/* NOTE: cagney/2002-12-03: This code assumes that the currently
@ -190,7 +190,7 @@ void
sparc_store_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
pid_t pid;
/* NOTE: cagney/2002-12-02: See comment in fetch_inferior_registers

View File

@ -152,7 +152,7 @@ static void
sparc32obsd_supply_uthread (struct regcache *regcache,
int regnum, CORE_ADDR addr)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR fp, fp_addr = addr + SPARC32OBSD_UTHREAD_FP_OFFSET;
gdb_byte buf[4];
@ -197,7 +197,7 @@ static void
sparc32obsd_collect_uthread(const struct regcache *regcache,
int regnum, CORE_ADDR addr)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR sp;
gdb_byte buf[4];

Some files were not shown because too many files have changed in this diff Show More