binutils-gdb/gdb/s390-linux-tdep.c

1207 lines
36 KiB
C
Raw Normal View History

s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
/* Target-dependent code for GNU/Linux on s390.
2002-02-24 23:31:19 +01:00
Copyright (C) 2001-2020 Free Software Foundation, Inc.
2002-02-24 23:31:19 +01:00
Contributed by D.J. Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
for IBM Deutschland Entwicklung GmbH, IBM Corporation.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
#include "defs.h"
#include "auxv.h"
#include "elf/common.h"
#include "frame-base.h"
#include "frame-unwind.h"
#include "gdbarch.h"
#include "gdbcore.h"
#include "linux-record.h"
#include "linux-tdep.h"
#include "objfiles.h"
#include "osabi.h"
#include "regcache.h"
#include "record-full.h"
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
#include "regset.h"
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
#include "s390-tdep.h"
#include "s390-linux-tdep.h"
#include "solib-svr4.h"
#include "target.h"
#include "trad-frame.h"
#include "xml-syscall.h"
ChangeLog: * s390-tdep.h (S390_ORIG_R2_REGNUM): Define. (S390_LAST_BREAK_REGNUM): Likewise. (S390_SYSTEM_CALL_REGNUM): Likewise. (S390_NUM_REGS): Update. (s390_regmap_last_break): Add declaration. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (tdesc_s390_linux32v1): Add declaration. (tdesc_s390_linux32v2): Likewise. (tdesc_s390_linux64v1): Likewise. (tdesc_s390_linux64v2): Likewise. (tdesc_s390x_linux64v1): Likewise. (tdesc_s390x_linux64v2): Likewise. * s390-tdep.c: Include new target description files "features/s390-linux32v1.c", "features/s390-linux32v2.c", "features/s390-linux64v1.c", "features/s390-linux64v2.c", "features/s390x-linux64v1.c", and "features/s390x-linux64v2.c". (s390_cannot_store_register): New function. (s390_write_pc): Likewise. (s390_dwarf_regmap): Add fields for new registers. (s390_regmap_gregset): Likewise. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): Likewise. (s390_regmap_last_break): New variable. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (s390_last_break_regset): Likewise. (s390x_last_break_regset): Likewise. (s390_system_call_regset): Likewise. (s390_upper_regset_sections): Rename to ... (s390_linux64_regset_sections): ... this. (s390_linux32_regset_sections): New variable. (s390x_linux64_regset_sections): Likewise. (s390_linux32v1_regset_sections): Likewise. (s390_linux32v2_regset_sections): Likewise. (s390_linux64v1_regset_sections): Likewise. (s390_linux64v2_regset_sections): Likewise. (s390x_linux64v1_regset_sections): Likewise. (s390x_linux64v2_regset_sections): Likewise. (s390_regset_from_core_section): Handle .reg-s390-last-break and .reg-s390-system-call core file sections. (s390_core_read_description): Check for presence of .reg-s390-last-break and .reg-s390-system-call core file sections and return appropriate target description. (s390_gdbarch_init): Detect Linux-specific registers "orig_r2", "last_break" and "system_call" in target description. Install appropriate gdbarch_core_regset_sections array. Call set_gdbarch_cannot_store_register and set_gdbarch_write_pc. (_initialize_s390_tdep): Initialize additional target descriptions. * s390-nat.c: Include "elf/common.h". (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (have_regset_last_break): New static variable. (have_regset_system_call): Likewise. (s390_native_supply): Handle S390_ORIG_R2_REGNUM. (s390_native_collect): Likewise. (fetch_regset, store_regset, check_regset): New functions. (s390_linux_fetch_inferior_registers): Handle S390_LAST_BREAK_REGNUM and S390_SYSTEM_CALL_REGNUM. (s390_linux_store_inferior_registers): Likewise. (s390_read_description): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. * features/Makefile (WHICH): Add s390-linux32v1, s390-linux64v1, s390x-linux64v1, s390-linux32v2, s390-linux64v2, and s390x-linux64v2. (s390-linux32v1-expedite): Define. (s390-linux32v2-expedite): Likewise. (s390-linux64v1-expedite): Likewise. (s390-linux64v2-expedite): Likewise. (s390x-linux64v1-expedite): Likewise. (s390x-linux64v2-expedite): Likewise. * features/s390-linux32.xml: Add orig_r2 register. * features/s390-linux64.xml: Likewise. * features/s390x-linux64.xml: Likewise. * features/s390-linux32v1.xml: New file. * features/s390-linux32v2.xml: Likewise. * features/s390-linux64v1.xml: Likewise. * features/s390-linux64v2.xml: Likewise. * features/s390x-linux64v1.xml: Likewise. * features/s390x-linux64v2.xml: Likewise. * features/s390-linux32.c: Regenerate. * features/s390-linux64.c: Likewise. * features/s390x-linux64.c: Likewise. * features/s390-linux32v1.c: New generated file. * features/s390-linux32v2.c: Likewise. * features/s390-linux64v1.c: Likewise. * features/s390-linux64v2.c: Likewise. * features/s390x-linux64v1.c: Likewise. * features/s390x-linux64v2.c: Likewise. * regformats/s390-linux32.dat: Regenerate. * regformats/s390-linux64.dat: Regenerate. * regformats/s390x-linux64.dat: Regenerate. * regformats/s390-linux32v1.dat: New generated file. * regformats/s390-linux32v2.dat: Likewise. * regformats/s390-linux64v1.dat: Likewise. * regformats/s390-linux64v2.dat: Likewise. * regformats/s390x-linux64v1.dat: Likewise. * regformats/s390x-linux64v2.dat: Likewise. gdbserver/ChangeLog: * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules. (s390-linux32v2.o, s390-linux32v2.c): Likewise. (s390-linux64v1.o, s390-linux64v1.c): Likewise. (s390-linux64v2.o, s390-linux64v2.c): Likewise. (s390x-linux64v1.o, s390x-linux64v1.c): Likewise. (s390x-linux64v2.o, s390x-linux64v2.c): Likewise. * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects. (srv_xmlfiles): Add new XML files. * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>, and <sys/uio.h>. (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (init_registers_s390_linux32v1): Add prototype. (init_registers_s390_linux32v2): Likewise. (init_registers_s390_linux64v1): Likewise. (init_registers_s390_linux64v2): Likewise. (init_registers_s390x_linux64v1): Likewise. (init_registers_s390x_linux64v2): Likewise. (s390_num_regs): Increment to 52. (s390_regmap): Add orig_r2 register. (s390_num_regs_3264): Increment to 68. (s390_regmap_3264): Add orig_r2 register. (s390_collect_ptrace_register): Handle orig_r2 register. (s390_supply_ptrace_register): Likewise. (s390_fill_last_break): New function. (s390_store_last_break): Likewise. (s390_fill_system_call): New function. (s390_store_system_call): Likewise. (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL register sets. (s390_check_regset): New function. (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. Update target_regsets for available register sets. testsuite/ChangeLog: * gdb.base/callfuncs.exp (fetch_all_registers): Filter out read-only last_break register on s390*-*-* targets.
2011-12-06 15:14:50 +01:00
#include "features/s390-linux32v1.c"
#include "features/s390-linux32v2.c"
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
#include "features/s390-linux64.c"
ChangeLog: * s390-tdep.h (S390_ORIG_R2_REGNUM): Define. (S390_LAST_BREAK_REGNUM): Likewise. (S390_SYSTEM_CALL_REGNUM): Likewise. (S390_NUM_REGS): Update. (s390_regmap_last_break): Add declaration. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (tdesc_s390_linux32v1): Add declaration. (tdesc_s390_linux32v2): Likewise. (tdesc_s390_linux64v1): Likewise. (tdesc_s390_linux64v2): Likewise. (tdesc_s390x_linux64v1): Likewise. (tdesc_s390x_linux64v2): Likewise. * s390-tdep.c: Include new target description files "features/s390-linux32v1.c", "features/s390-linux32v2.c", "features/s390-linux64v1.c", "features/s390-linux64v2.c", "features/s390x-linux64v1.c", and "features/s390x-linux64v2.c". (s390_cannot_store_register): New function. (s390_write_pc): Likewise. (s390_dwarf_regmap): Add fields for new registers. (s390_regmap_gregset): Likewise. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): Likewise. (s390_regmap_last_break): New variable. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (s390_last_break_regset): Likewise. (s390x_last_break_regset): Likewise. (s390_system_call_regset): Likewise. (s390_upper_regset_sections): Rename to ... (s390_linux64_regset_sections): ... this. (s390_linux32_regset_sections): New variable. (s390x_linux64_regset_sections): Likewise. (s390_linux32v1_regset_sections): Likewise. (s390_linux32v2_regset_sections): Likewise. (s390_linux64v1_regset_sections): Likewise. (s390_linux64v2_regset_sections): Likewise. (s390x_linux64v1_regset_sections): Likewise. (s390x_linux64v2_regset_sections): Likewise. (s390_regset_from_core_section): Handle .reg-s390-last-break and .reg-s390-system-call core file sections. (s390_core_read_description): Check for presence of .reg-s390-last-break and .reg-s390-system-call core file sections and return appropriate target description. (s390_gdbarch_init): Detect Linux-specific registers "orig_r2", "last_break" and "system_call" in target description. Install appropriate gdbarch_core_regset_sections array. Call set_gdbarch_cannot_store_register and set_gdbarch_write_pc. (_initialize_s390_tdep): Initialize additional target descriptions. * s390-nat.c: Include "elf/common.h". (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (have_regset_last_break): New static variable. (have_regset_system_call): Likewise. (s390_native_supply): Handle S390_ORIG_R2_REGNUM. (s390_native_collect): Likewise. (fetch_regset, store_regset, check_regset): New functions. (s390_linux_fetch_inferior_registers): Handle S390_LAST_BREAK_REGNUM and S390_SYSTEM_CALL_REGNUM. (s390_linux_store_inferior_registers): Likewise. (s390_read_description): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. * features/Makefile (WHICH): Add s390-linux32v1, s390-linux64v1, s390x-linux64v1, s390-linux32v2, s390-linux64v2, and s390x-linux64v2. (s390-linux32v1-expedite): Define. (s390-linux32v2-expedite): Likewise. (s390-linux64v1-expedite): Likewise. (s390-linux64v2-expedite): Likewise. (s390x-linux64v1-expedite): Likewise. (s390x-linux64v2-expedite): Likewise. * features/s390-linux32.xml: Add orig_r2 register. * features/s390-linux64.xml: Likewise. * features/s390x-linux64.xml: Likewise. * features/s390-linux32v1.xml: New file. * features/s390-linux32v2.xml: Likewise. * features/s390-linux64v1.xml: Likewise. * features/s390-linux64v2.xml: Likewise. * features/s390x-linux64v1.xml: Likewise. * features/s390x-linux64v2.xml: Likewise. * features/s390-linux32.c: Regenerate. * features/s390-linux64.c: Likewise. * features/s390x-linux64.c: Likewise. * features/s390-linux32v1.c: New generated file. * features/s390-linux32v2.c: Likewise. * features/s390-linux64v1.c: Likewise. * features/s390-linux64v2.c: Likewise. * features/s390x-linux64v1.c: Likewise. * features/s390x-linux64v2.c: Likewise. * regformats/s390-linux32.dat: Regenerate. * regformats/s390-linux64.dat: Regenerate. * regformats/s390x-linux64.dat: Regenerate. * regformats/s390-linux32v1.dat: New generated file. * regformats/s390-linux32v2.dat: Likewise. * regformats/s390-linux64v1.dat: Likewise. * regformats/s390-linux64v2.dat: Likewise. * regformats/s390x-linux64v1.dat: Likewise. * regformats/s390x-linux64v2.dat: Likewise. gdbserver/ChangeLog: * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules. (s390-linux32v2.o, s390-linux32v2.c): Likewise. (s390-linux64v1.o, s390-linux64v1.c): Likewise. (s390-linux64v2.o, s390-linux64v2.c): Likewise. (s390x-linux64v1.o, s390x-linux64v1.c): Likewise. (s390x-linux64v2.o, s390x-linux64v2.c): Likewise. * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects. (srv_xmlfiles): Add new XML files. * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>, and <sys/uio.h>. (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (init_registers_s390_linux32v1): Add prototype. (init_registers_s390_linux32v2): Likewise. (init_registers_s390_linux64v1): Likewise. (init_registers_s390_linux64v2): Likewise. (init_registers_s390x_linux64v1): Likewise. (init_registers_s390x_linux64v2): Likewise. (s390_num_regs): Increment to 52. (s390_regmap): Add orig_r2 register. (s390_num_regs_3264): Increment to 68. (s390_regmap_3264): Add orig_r2 register. (s390_collect_ptrace_register): Handle orig_r2 register. (s390_supply_ptrace_register): Likewise. (s390_fill_last_break): New function. (s390_store_last_break): Likewise. (s390_fill_system_call): New function. (s390_store_system_call): Likewise. (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL register sets. (s390_check_regset): New function. (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. Update target_regsets for available register sets. testsuite/ChangeLog: * gdb.base/callfuncs.exp (fetch_all_registers): Filter out read-only last_break register on s390*-*-* targets.
2011-12-06 15:14:50 +01:00
#include "features/s390-linux64v1.c"
#include "features/s390-linux64v2.c"
gdb/ChangeLog: 2013-09-13 Andreas Arnez <arnez@linux.vnet.ibm.com> * NEWS: Mention TDB support. * features/s390-tdb.xml: New file. * features/s390-te-linux64.xml: New file. * features/s390x-te-linux64.xml: New file. * features/Makefile (WHICH): Add new tdescs above. (s390-te-linux64-expedite): Set. (s390x-te-linux64-expedite): Set. * features/s390-te-linux64.c: New file (generated). * features/s390x-te-linux64.c: New file (generated). * regformats/s390-te-linux64.dat: New file (generated). * regformats/s390x-te-linux64.dat: New file (generated). * s390-tdep.h (HWCAP_S390_HIGH_GPRS): Define. (HWCAP_S390_TE): Likewise. (S390_TDB_DWORD0_REGNUM): Likewise. (S390_TDB_DWORD0_REGNUM): Likewise. (S390_TDB_ABORT_CODE_REGNUM): Likewise. (S390_TDB_CONFLICT_TOKEN_REGNUM): Likewise. (S390_TDB_ATIA_REGNUM): Likewise. (S390_TDB_R0_REGNUM): Likewise. (S390_TDB_R1_REGNUM): Likewise. (S390_TDB_R2_REGNUM): Likewise. (S390_TDB_R3_REGNUM): Likewise. (S390_TDB_R4_REGNUM): Likewise. (S390_TDB_R5_REGNUM): Likewise. (S390_TDB_R6_REGNUM): Likewise. (S390_TDB_R7_REGNUM): Likewise. (S390_TDB_R8_REGNUM): Likewise. (S390_TDB_R9_REGNUM): Likewise. (S390_TDB_R10_REGNUM): Likewise. (S390_TDB_R11_REGNUM): Likewise. (S390_TDB_R12_REGNUM): Likewise. (S390_TDB_R13_REGNUM): Likewise. (S390_TDB_R14_REGNUM): Likewise. (S390_TDB_R15_REGNUM): Likewise. (S390_NUM_REGS): Increase. (S390_IS_TDBREGSET_REGNUM): New macro. (s390_regmap_tdb): Declare. (s390_sizeof_tdbregset): Define. (tdesc_s390_te_linux64): Declare. (tdesc_s390x_te_linux64): Likewise. * s390-tdep.c: Add includes for "auxv.h", <elf.h>, "features/s390-te-linux64.c", and "features/s390x-te-linux64.c". (s390_regmap_tdb): New regmap. (s390_supply_tdb_regset): New function. (s390_tdb_regset): New regset. (s390_linux64v2_regset_sections): Add TDB regset to list. (s390x_linux64v2_regset_sections): Likewise. (s390_regset_from_core_section): Recognize TDB core note section. (s390_core_read_description): If HWCAP indicates TE support, select tdesc_s390_te_linux64 or tdesc_s390_s390x_te_linux64. (s390_gdbarch_init): Handle TDB regset. (_initialize_s390_tdep): Initialize new tdescs. * s390-nat.c (HWCAP_S390_HIGH_GPRS): Remove define. (have_regset_tdb): New variable. (s390_native_supply): Support register invalidation. (fetch_regset): Invalidate registers if ptrace yields ENODATA. (check_regset): Treat ENODATA as "regset exists". (s390_linux_fetch_inferior_registers): Add TDB. (s390_read_description): Check for TDB existence and select appropriate tdesc. * gdbserver/Makefile.in (clean): Add removal of new makefile targets. (s390-te-linux64.c): New makefile target. (s390x-te-linux64.c): Likewise. * gdbserver/configure.srv (srv_regobj): Append new objects s390-te-linux64.o and s390x-te-linux64.o. (srv_xmlfiles): Append new files s390-te-linux64.xml, s390x-te-linux64.xml, and s390-tdb.xml. * gdbserver/linux-s390-low.c (init_registers_s390_te_linux64): New declaration. (tdesc_s390_te_linux64): Likewise. (init_registers_s390x_te_linux64): Likewise. (tdesc_s390x_te_linux64): Likewise. (s390_check_regset): Treat ENODATA as "regset exists". (s390_arch_setup): Add TDB regset support. (initialize_low_arch): Initialize registers for new tdescs. gdb/doc/ChangeLog: 2013-09-13 Andreas Arnez <arnez@linux.vnet.ibm.com> * gdb.texinfo (Decimal Floating Point format): Mention S/390. (Standard Target Features): Add new node to menu. (S/390 and System z Features): New node. gdb/testsuite/ChangeLog: 2013-09-13 Andreas Arnez <arnez@linux.vnet.ibm.com> * gdb.arch/s390-tdbregs.c: New file. * gdb.arch/s390-tdbregs.exp: New file.
2013-09-13 16:17:31 +02:00
#include "features/s390-te-linux64.c"
S390: Add vector register support to gdb Recognize S/390 targets with the new vector feature and present their vector registers appropriately: as 32 new 128-bit wide registers v0-v31, where the first 16 embed the floating point registers f0-f15. Each of the full registers v0-v15 is modelled as a pseudo register. gdb/ChangeLog: * s390-linux-nat.c (have_regset_vxrs): New static variable. (s390_linux_fetch_inferior_registers): Handle vector registers, if present. (s390_linux_store_inferior_registers): Likewise. (s390_get_hwcap): Remove function. Embed its logic... (s390_read_description): ...here. Yield a target description with vector registers if applicable. * s390-linux-tdep.c: Include "features/s390-vx-linux64.c", "features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and "features/s390x-tevx-linux64.c". (struct gdbarch_tdep) <v0_full_regnum>: New field. (s390_dwarf_regmap): Add vector registers. Remove bogus entries for "GNU/Linux-specific registers". (s390_dwarf_reg_r0l): New enum value. (s390_dwarf_reg_to_regnum): Support vector registers. (s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers of GPR lower halves. (regnum_is_vxr_full): New function. (s390_register_name): New function. (s390_pseudo_register_name): Handle v0-v15, which are composed of f0-f15 and v0l-v15l. (s390_pseudo_register_type): Likewise. (s390_pseudo_register_read): Likewise. (s390_pseudo_register_write): Likewise. (s390_value_from_register): Account for the fact that values are placed left-justified in vector registers. (s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to the vector reggroup and omit them from the general reggroup. (s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps. (s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets. (s390_iterate_over_regset_sections): Add iterations for the two new vector regsets. (s390_core_read_description): Yield a target description with vector registers if applicable. (s390_gdbarch_init): Handle target descriptions with vector registers. Add "register_name" gdbarch method. (_initialize_s390_tdep): Call new tdesc initialization functions. * s390-linux-tdep.h (HWCAP_S390_VX): New macro. (S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM) (S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM) (S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM) (S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM) (S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM) (S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM) (S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM) (S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM) (S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM) (S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM) (S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM) (S390_V30_REGNUM, S390_V31_REGNUM): New macros. (S390_NUM_REGS): Adjust value. (s390_vxrs_low_regset, s390_vxrs_high_regset): Declare. (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64) (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise. * NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
#include "features/s390-vx-linux64.c"
#include "features/s390-tevx-linux64.c"
#include "features/s390-gs-linux64.c"
ChangeLog: * s390-tdep.h (S390_ORIG_R2_REGNUM): Define. (S390_LAST_BREAK_REGNUM): Likewise. (S390_SYSTEM_CALL_REGNUM): Likewise. (S390_NUM_REGS): Update. (s390_regmap_last_break): Add declaration. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (tdesc_s390_linux32v1): Add declaration. (tdesc_s390_linux32v2): Likewise. (tdesc_s390_linux64v1): Likewise. (tdesc_s390_linux64v2): Likewise. (tdesc_s390x_linux64v1): Likewise. (tdesc_s390x_linux64v2): Likewise. * s390-tdep.c: Include new target description files "features/s390-linux32v1.c", "features/s390-linux32v2.c", "features/s390-linux64v1.c", "features/s390-linux64v2.c", "features/s390x-linux64v1.c", and "features/s390x-linux64v2.c". (s390_cannot_store_register): New function. (s390_write_pc): Likewise. (s390_dwarf_regmap): Add fields for new registers. (s390_regmap_gregset): Likewise. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): Likewise. (s390_regmap_last_break): New variable. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (s390_last_break_regset): Likewise. (s390x_last_break_regset): Likewise. (s390_system_call_regset): Likewise. (s390_upper_regset_sections): Rename to ... (s390_linux64_regset_sections): ... this. (s390_linux32_regset_sections): New variable. (s390x_linux64_regset_sections): Likewise. (s390_linux32v1_regset_sections): Likewise. (s390_linux32v2_regset_sections): Likewise. (s390_linux64v1_regset_sections): Likewise. (s390_linux64v2_regset_sections): Likewise. (s390x_linux64v1_regset_sections): Likewise. (s390x_linux64v2_regset_sections): Likewise. (s390_regset_from_core_section): Handle .reg-s390-last-break and .reg-s390-system-call core file sections. (s390_core_read_description): Check for presence of .reg-s390-last-break and .reg-s390-system-call core file sections and return appropriate target description. (s390_gdbarch_init): Detect Linux-specific registers "orig_r2", "last_break" and "system_call" in target description. Install appropriate gdbarch_core_regset_sections array. Call set_gdbarch_cannot_store_register and set_gdbarch_write_pc. (_initialize_s390_tdep): Initialize additional target descriptions. * s390-nat.c: Include "elf/common.h". (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (have_regset_last_break): New static variable. (have_regset_system_call): Likewise. (s390_native_supply): Handle S390_ORIG_R2_REGNUM. (s390_native_collect): Likewise. (fetch_regset, store_regset, check_regset): New functions. (s390_linux_fetch_inferior_registers): Handle S390_LAST_BREAK_REGNUM and S390_SYSTEM_CALL_REGNUM. (s390_linux_store_inferior_registers): Likewise. (s390_read_description): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. * features/Makefile (WHICH): Add s390-linux32v1, s390-linux64v1, s390x-linux64v1, s390-linux32v2, s390-linux64v2, and s390x-linux64v2. (s390-linux32v1-expedite): Define. (s390-linux32v2-expedite): Likewise. (s390-linux64v1-expedite): Likewise. (s390-linux64v2-expedite): Likewise. (s390x-linux64v1-expedite): Likewise. (s390x-linux64v2-expedite): Likewise. * features/s390-linux32.xml: Add orig_r2 register. * features/s390-linux64.xml: Likewise. * features/s390x-linux64.xml: Likewise. * features/s390-linux32v1.xml: New file. * features/s390-linux32v2.xml: Likewise. * features/s390-linux64v1.xml: Likewise. * features/s390-linux64v2.xml: Likewise. * features/s390x-linux64v1.xml: Likewise. * features/s390x-linux64v2.xml: Likewise. * features/s390-linux32.c: Regenerate. * features/s390-linux64.c: Likewise. * features/s390x-linux64.c: Likewise. * features/s390-linux32v1.c: New generated file. * features/s390-linux32v2.c: Likewise. * features/s390-linux64v1.c: Likewise. * features/s390-linux64v2.c: Likewise. * features/s390x-linux64v1.c: Likewise. * features/s390x-linux64v2.c: Likewise. * regformats/s390-linux32.dat: Regenerate. * regformats/s390-linux64.dat: Regenerate. * regformats/s390x-linux64.dat: Regenerate. * regformats/s390-linux32v1.dat: New generated file. * regformats/s390-linux32v2.dat: Likewise. * regformats/s390-linux64v1.dat: Likewise. * regformats/s390-linux64v2.dat: Likewise. * regformats/s390x-linux64v1.dat: Likewise. * regformats/s390x-linux64v2.dat: Likewise. gdbserver/ChangeLog: * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules. (s390-linux32v2.o, s390-linux32v2.c): Likewise. (s390-linux64v1.o, s390-linux64v1.c): Likewise. (s390-linux64v2.o, s390-linux64v2.c): Likewise. (s390x-linux64v1.o, s390x-linux64v1.c): Likewise. (s390x-linux64v2.o, s390x-linux64v2.c): Likewise. * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects. (srv_xmlfiles): Add new XML files. * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>, and <sys/uio.h>. (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (init_registers_s390_linux32v1): Add prototype. (init_registers_s390_linux32v2): Likewise. (init_registers_s390_linux64v1): Likewise. (init_registers_s390_linux64v2): Likewise. (init_registers_s390x_linux64v1): Likewise. (init_registers_s390x_linux64v2): Likewise. (s390_num_regs): Increment to 52. (s390_regmap): Add orig_r2 register. (s390_num_regs_3264): Increment to 68. (s390_regmap_3264): Add orig_r2 register. (s390_collect_ptrace_register): Handle orig_r2 register. (s390_supply_ptrace_register): Likewise. (s390_fill_last_break): New function. (s390_store_last_break): Likewise. (s390_fill_system_call): New function. (s390_store_system_call): Likewise. (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL register sets. (s390_check_regset): New function. (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. Update target_regsets for available register sets. testsuite/ChangeLog: * gdb.base/callfuncs.exp (fetch_all_registers): Filter out read-only last_break register on s390*-*-* targets.
2011-12-06 15:14:50 +01:00
#include "features/s390x-linux64v1.c"
#include "features/s390x-linux64v2.c"
gdb/ChangeLog: 2013-09-13 Andreas Arnez <arnez@linux.vnet.ibm.com> * NEWS: Mention TDB support. * features/s390-tdb.xml: New file. * features/s390-te-linux64.xml: New file. * features/s390x-te-linux64.xml: New file. * features/Makefile (WHICH): Add new tdescs above. (s390-te-linux64-expedite): Set. (s390x-te-linux64-expedite): Set. * features/s390-te-linux64.c: New file (generated). * features/s390x-te-linux64.c: New file (generated). * regformats/s390-te-linux64.dat: New file (generated). * regformats/s390x-te-linux64.dat: New file (generated). * s390-tdep.h (HWCAP_S390_HIGH_GPRS): Define. (HWCAP_S390_TE): Likewise. (S390_TDB_DWORD0_REGNUM): Likewise. (S390_TDB_DWORD0_REGNUM): Likewise. (S390_TDB_ABORT_CODE_REGNUM): Likewise. (S390_TDB_CONFLICT_TOKEN_REGNUM): Likewise. (S390_TDB_ATIA_REGNUM): Likewise. (S390_TDB_R0_REGNUM): Likewise. (S390_TDB_R1_REGNUM): Likewise. (S390_TDB_R2_REGNUM): Likewise. (S390_TDB_R3_REGNUM): Likewise. (S390_TDB_R4_REGNUM): Likewise. (S390_TDB_R5_REGNUM): Likewise. (S390_TDB_R6_REGNUM): Likewise. (S390_TDB_R7_REGNUM): Likewise. (S390_TDB_R8_REGNUM): Likewise. (S390_TDB_R9_REGNUM): Likewise. (S390_TDB_R10_REGNUM): Likewise. (S390_TDB_R11_REGNUM): Likewise. (S390_TDB_R12_REGNUM): Likewise. (S390_TDB_R13_REGNUM): Likewise. (S390_TDB_R14_REGNUM): Likewise. (S390_TDB_R15_REGNUM): Likewise. (S390_NUM_REGS): Increase. (S390_IS_TDBREGSET_REGNUM): New macro. (s390_regmap_tdb): Declare. (s390_sizeof_tdbregset): Define. (tdesc_s390_te_linux64): Declare. (tdesc_s390x_te_linux64): Likewise. * s390-tdep.c: Add includes for "auxv.h", <elf.h>, "features/s390-te-linux64.c", and "features/s390x-te-linux64.c". (s390_regmap_tdb): New regmap. (s390_supply_tdb_regset): New function. (s390_tdb_regset): New regset. (s390_linux64v2_regset_sections): Add TDB regset to list. (s390x_linux64v2_regset_sections): Likewise. (s390_regset_from_core_section): Recognize TDB core note section. (s390_core_read_description): If HWCAP indicates TE support, select tdesc_s390_te_linux64 or tdesc_s390_s390x_te_linux64. (s390_gdbarch_init): Handle TDB regset. (_initialize_s390_tdep): Initialize new tdescs. * s390-nat.c (HWCAP_S390_HIGH_GPRS): Remove define. (have_regset_tdb): New variable. (s390_native_supply): Support register invalidation. (fetch_regset): Invalidate registers if ptrace yields ENODATA. (check_regset): Treat ENODATA as "regset exists". (s390_linux_fetch_inferior_registers): Add TDB. (s390_read_description): Check for TDB existence and select appropriate tdesc. * gdbserver/Makefile.in (clean): Add removal of new makefile targets. (s390-te-linux64.c): New makefile target. (s390x-te-linux64.c): Likewise. * gdbserver/configure.srv (srv_regobj): Append new objects s390-te-linux64.o and s390x-te-linux64.o. (srv_xmlfiles): Append new files s390-te-linux64.xml, s390x-te-linux64.xml, and s390-tdb.xml. * gdbserver/linux-s390-low.c (init_registers_s390_te_linux64): New declaration. (tdesc_s390_te_linux64): Likewise. (init_registers_s390x_te_linux64): Likewise. (tdesc_s390x_te_linux64): Likewise. (s390_check_regset): Treat ENODATA as "regset exists". (s390_arch_setup): Add TDB regset support. (initialize_low_arch): Initialize registers for new tdescs. gdb/doc/ChangeLog: 2013-09-13 Andreas Arnez <arnez@linux.vnet.ibm.com> * gdb.texinfo (Decimal Floating Point format): Mention S/390. (Standard Target Features): Add new node to menu. (S/390 and System z Features): New node. gdb/testsuite/ChangeLog: 2013-09-13 Andreas Arnez <arnez@linux.vnet.ibm.com> * gdb.arch/s390-tdbregs.c: New file. * gdb.arch/s390-tdbregs.exp: New file.
2013-09-13 16:17:31 +02:00
#include "features/s390x-te-linux64.c"
S390: Add vector register support to gdb Recognize S/390 targets with the new vector feature and present their vector registers appropriately: as 32 new 128-bit wide registers v0-v31, where the first 16 embed the floating point registers f0-f15. Each of the full registers v0-v15 is modelled as a pseudo register. gdb/ChangeLog: * s390-linux-nat.c (have_regset_vxrs): New static variable. (s390_linux_fetch_inferior_registers): Handle vector registers, if present. (s390_linux_store_inferior_registers): Likewise. (s390_get_hwcap): Remove function. Embed its logic... (s390_read_description): ...here. Yield a target description with vector registers if applicable. * s390-linux-tdep.c: Include "features/s390-vx-linux64.c", "features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and "features/s390x-tevx-linux64.c". (struct gdbarch_tdep) <v0_full_regnum>: New field. (s390_dwarf_regmap): Add vector registers. Remove bogus entries for "GNU/Linux-specific registers". (s390_dwarf_reg_r0l): New enum value. (s390_dwarf_reg_to_regnum): Support vector registers. (s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers of GPR lower halves. (regnum_is_vxr_full): New function. (s390_register_name): New function. (s390_pseudo_register_name): Handle v0-v15, which are composed of f0-f15 and v0l-v15l. (s390_pseudo_register_type): Likewise. (s390_pseudo_register_read): Likewise. (s390_pseudo_register_write): Likewise. (s390_value_from_register): Account for the fact that values are placed left-justified in vector registers. (s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to the vector reggroup and omit them from the general reggroup. (s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps. (s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets. (s390_iterate_over_regset_sections): Add iterations for the two new vector regsets. (s390_core_read_description): Yield a target description with vector registers if applicable. (s390_gdbarch_init): Handle target descriptions with vector registers. Add "register_name" gdbarch method. (_initialize_s390_tdep): Call new tdesc initialization functions. * s390-linux-tdep.h (HWCAP_S390_VX): New macro. (S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM) (S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM) (S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM) (S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM) (S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM) (S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM) (S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM) (S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM) (S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM) (S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM) (S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM) (S390_V30_REGNUM, S390_V31_REGNUM): New macros. (S390_NUM_REGS): Adjust value. (s390_vxrs_low_regset, s390_vxrs_high_regset): Declare. (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64) (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise. * NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
#include "features/s390x-vx-linux64.c"
#include "features/s390x-tevx-linux64.c"
#include "features/s390x-gs-linux64.c"
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
#define XML_SYSCALL_FILENAME_S390 "syscalls/s390-linux.xml"
#define XML_SYSCALL_FILENAME_S390X "syscalls/s390x-linux.xml"
/* Register handling. */
/* Implement cannot_store_register gdbarch method. */
ChangeLog: * s390-tdep.h (S390_ORIG_R2_REGNUM): Define. (S390_LAST_BREAK_REGNUM): Likewise. (S390_SYSTEM_CALL_REGNUM): Likewise. (S390_NUM_REGS): Update. (s390_regmap_last_break): Add declaration. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (tdesc_s390_linux32v1): Add declaration. (tdesc_s390_linux32v2): Likewise. (tdesc_s390_linux64v1): Likewise. (tdesc_s390_linux64v2): Likewise. (tdesc_s390x_linux64v1): Likewise. (tdesc_s390x_linux64v2): Likewise. * s390-tdep.c: Include new target description files "features/s390-linux32v1.c", "features/s390-linux32v2.c", "features/s390-linux64v1.c", "features/s390-linux64v2.c", "features/s390x-linux64v1.c", and "features/s390x-linux64v2.c". (s390_cannot_store_register): New function. (s390_write_pc): Likewise. (s390_dwarf_regmap): Add fields for new registers. (s390_regmap_gregset): Likewise. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): Likewise. (s390_regmap_last_break): New variable. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (s390_last_break_regset): Likewise. (s390x_last_break_regset): Likewise. (s390_system_call_regset): Likewise. (s390_upper_regset_sections): Rename to ... (s390_linux64_regset_sections): ... this. (s390_linux32_regset_sections): New variable. (s390x_linux64_regset_sections): Likewise. (s390_linux32v1_regset_sections): Likewise. (s390_linux32v2_regset_sections): Likewise. (s390_linux64v1_regset_sections): Likewise. (s390_linux64v2_regset_sections): Likewise. (s390x_linux64v1_regset_sections): Likewise. (s390x_linux64v2_regset_sections): Likewise. (s390_regset_from_core_section): Handle .reg-s390-last-break and .reg-s390-system-call core file sections. (s390_core_read_description): Check for presence of .reg-s390-last-break and .reg-s390-system-call core file sections and return appropriate target description. (s390_gdbarch_init): Detect Linux-specific registers "orig_r2", "last_break" and "system_call" in target description. Install appropriate gdbarch_core_regset_sections array. Call set_gdbarch_cannot_store_register and set_gdbarch_write_pc. (_initialize_s390_tdep): Initialize additional target descriptions. * s390-nat.c: Include "elf/common.h". (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (have_regset_last_break): New static variable. (have_regset_system_call): Likewise. (s390_native_supply): Handle S390_ORIG_R2_REGNUM. (s390_native_collect): Likewise. (fetch_regset, store_regset, check_regset): New functions. (s390_linux_fetch_inferior_registers): Handle S390_LAST_BREAK_REGNUM and S390_SYSTEM_CALL_REGNUM. (s390_linux_store_inferior_registers): Likewise. (s390_read_description): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. * features/Makefile (WHICH): Add s390-linux32v1, s390-linux64v1, s390x-linux64v1, s390-linux32v2, s390-linux64v2, and s390x-linux64v2. (s390-linux32v1-expedite): Define. (s390-linux32v2-expedite): Likewise. (s390-linux64v1-expedite): Likewise. (s390-linux64v2-expedite): Likewise. (s390x-linux64v1-expedite): Likewise. (s390x-linux64v2-expedite): Likewise. * features/s390-linux32.xml: Add orig_r2 register. * features/s390-linux64.xml: Likewise. * features/s390x-linux64.xml: Likewise. * features/s390-linux32v1.xml: New file. * features/s390-linux32v2.xml: Likewise. * features/s390-linux64v1.xml: Likewise. * features/s390-linux64v2.xml: Likewise. * features/s390x-linux64v1.xml: Likewise. * features/s390x-linux64v2.xml: Likewise. * features/s390-linux32.c: Regenerate. * features/s390-linux64.c: Likewise. * features/s390x-linux64.c: Likewise. * features/s390-linux32v1.c: New generated file. * features/s390-linux32v2.c: Likewise. * features/s390-linux64v1.c: Likewise. * features/s390-linux64v2.c: Likewise. * features/s390x-linux64v1.c: Likewise. * features/s390x-linux64v2.c: Likewise. * regformats/s390-linux32.dat: Regenerate. * regformats/s390-linux64.dat: Regenerate. * regformats/s390x-linux64.dat: Regenerate. * regformats/s390-linux32v1.dat: New generated file. * regformats/s390-linux32v2.dat: Likewise. * regformats/s390-linux64v1.dat: Likewise. * regformats/s390-linux64v2.dat: Likewise. * regformats/s390x-linux64v1.dat: Likewise. * regformats/s390x-linux64v2.dat: Likewise. gdbserver/ChangeLog: * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules. (s390-linux32v2.o, s390-linux32v2.c): Likewise. (s390-linux64v1.o, s390-linux64v1.c): Likewise. (s390-linux64v2.o, s390-linux64v2.c): Likewise. (s390x-linux64v1.o, s390x-linux64v1.c): Likewise. (s390x-linux64v2.o, s390x-linux64v2.c): Likewise. * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects. (srv_xmlfiles): Add new XML files. * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>, and <sys/uio.h>. (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (init_registers_s390_linux32v1): Add prototype. (init_registers_s390_linux32v2): Likewise. (init_registers_s390_linux64v1): Likewise. (init_registers_s390_linux64v2): Likewise. (init_registers_s390x_linux64v1): Likewise. (init_registers_s390x_linux64v2): Likewise. (s390_num_regs): Increment to 52. (s390_regmap): Add orig_r2 register. (s390_num_regs_3264): Increment to 68. (s390_regmap_3264): Add orig_r2 register. (s390_collect_ptrace_register): Handle orig_r2 register. (s390_supply_ptrace_register): Likewise. (s390_fill_last_break): New function. (s390_store_last_break): Likewise. (s390_fill_system_call): New function. (s390_store_system_call): Likewise. (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL register sets. (s390_check_regset): New function. (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. Update target_regsets for available register sets. testsuite/ChangeLog: * gdb.base/callfuncs.exp (fetch_all_registers): Filter out read-only last_break register on s390*-*-* targets.
2011-12-06 15:14:50 +01:00
static int
s390_cannot_store_register (struct gdbarch *gdbarch, int regnum)
{
/* The last-break address is read-only. */
return regnum == S390_LAST_BREAK_REGNUM;
}
/* Implement write_pc gdbarch method. */
ChangeLog: * s390-tdep.h (S390_ORIG_R2_REGNUM): Define. (S390_LAST_BREAK_REGNUM): Likewise. (S390_SYSTEM_CALL_REGNUM): Likewise. (S390_NUM_REGS): Update. (s390_regmap_last_break): Add declaration. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (tdesc_s390_linux32v1): Add declaration. (tdesc_s390_linux32v2): Likewise. (tdesc_s390_linux64v1): Likewise. (tdesc_s390_linux64v2): Likewise. (tdesc_s390x_linux64v1): Likewise. (tdesc_s390x_linux64v2): Likewise. * s390-tdep.c: Include new target description files "features/s390-linux32v1.c", "features/s390-linux32v2.c", "features/s390-linux64v1.c", "features/s390-linux64v2.c", "features/s390x-linux64v1.c", and "features/s390x-linux64v2.c". (s390_cannot_store_register): New function. (s390_write_pc): Likewise. (s390_dwarf_regmap): Add fields for new registers. (s390_regmap_gregset): Likewise. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): Likewise. (s390_regmap_last_break): New variable. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (s390_last_break_regset): Likewise. (s390x_last_break_regset): Likewise. (s390_system_call_regset): Likewise. (s390_upper_regset_sections): Rename to ... (s390_linux64_regset_sections): ... this. (s390_linux32_regset_sections): New variable. (s390x_linux64_regset_sections): Likewise. (s390_linux32v1_regset_sections): Likewise. (s390_linux32v2_regset_sections): Likewise. (s390_linux64v1_regset_sections): Likewise. (s390_linux64v2_regset_sections): Likewise. (s390x_linux64v1_regset_sections): Likewise. (s390x_linux64v2_regset_sections): Likewise. (s390_regset_from_core_section): Handle .reg-s390-last-break and .reg-s390-system-call core file sections. (s390_core_read_description): Check for presence of .reg-s390-last-break and .reg-s390-system-call core file sections and return appropriate target description. (s390_gdbarch_init): Detect Linux-specific registers "orig_r2", "last_break" and "system_call" in target description. Install appropriate gdbarch_core_regset_sections array. Call set_gdbarch_cannot_store_register and set_gdbarch_write_pc. (_initialize_s390_tdep): Initialize additional target descriptions. * s390-nat.c: Include "elf/common.h". (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (have_regset_last_break): New static variable. (have_regset_system_call): Likewise. (s390_native_supply): Handle S390_ORIG_R2_REGNUM. (s390_native_collect): Likewise. (fetch_regset, store_regset, check_regset): New functions. (s390_linux_fetch_inferior_registers): Handle S390_LAST_BREAK_REGNUM and S390_SYSTEM_CALL_REGNUM. (s390_linux_store_inferior_registers): Likewise. (s390_read_description): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. * features/Makefile (WHICH): Add s390-linux32v1, s390-linux64v1, s390x-linux64v1, s390-linux32v2, s390-linux64v2, and s390x-linux64v2. (s390-linux32v1-expedite): Define. (s390-linux32v2-expedite): Likewise. (s390-linux64v1-expedite): Likewise. (s390-linux64v2-expedite): Likewise. (s390x-linux64v1-expedite): Likewise. (s390x-linux64v2-expedite): Likewise. * features/s390-linux32.xml: Add orig_r2 register. * features/s390-linux64.xml: Likewise. * features/s390x-linux64.xml: Likewise. * features/s390-linux32v1.xml: New file. * features/s390-linux32v2.xml: Likewise. * features/s390-linux64v1.xml: Likewise. * features/s390-linux64v2.xml: Likewise. * features/s390x-linux64v1.xml: Likewise. * features/s390x-linux64v2.xml: Likewise. * features/s390-linux32.c: Regenerate. * features/s390-linux64.c: Likewise. * features/s390x-linux64.c: Likewise. * features/s390-linux32v1.c: New generated file. * features/s390-linux32v2.c: Likewise. * features/s390-linux64v1.c: Likewise. * features/s390-linux64v2.c: Likewise. * features/s390x-linux64v1.c: Likewise. * features/s390x-linux64v2.c: Likewise. * regformats/s390-linux32.dat: Regenerate. * regformats/s390-linux64.dat: Regenerate. * regformats/s390x-linux64.dat: Regenerate. * regformats/s390-linux32v1.dat: New generated file. * regformats/s390-linux32v2.dat: Likewise. * regformats/s390-linux64v1.dat: Likewise. * regformats/s390-linux64v2.dat: Likewise. * regformats/s390x-linux64v1.dat: Likewise. * regformats/s390x-linux64v2.dat: Likewise. gdbserver/ChangeLog: * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules. (s390-linux32v2.o, s390-linux32v2.c): Likewise. (s390-linux64v1.o, s390-linux64v1.c): Likewise. (s390-linux64v2.o, s390-linux64v2.c): Likewise. (s390x-linux64v1.o, s390x-linux64v1.c): Likewise. (s390x-linux64v2.o, s390x-linux64v2.c): Likewise. * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects. (srv_xmlfiles): Add new XML files. * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>, and <sys/uio.h>. (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (init_registers_s390_linux32v1): Add prototype. (init_registers_s390_linux32v2): Likewise. (init_registers_s390_linux64v1): Likewise. (init_registers_s390_linux64v2): Likewise. (init_registers_s390x_linux64v1): Likewise. (init_registers_s390x_linux64v2): Likewise. (s390_num_regs): Increment to 52. (s390_regmap): Add orig_r2 register. (s390_num_regs_3264): Increment to 68. (s390_regmap_3264): Add orig_r2 register. (s390_collect_ptrace_register): Handle orig_r2 register. (s390_supply_ptrace_register): Likewise. (s390_fill_last_break): New function. (s390_store_last_break): Likewise. (s390_fill_system_call): New function. (s390_store_system_call): Likewise. (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL register sets. (s390_check_regset): New function. (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. Update target_regsets for available register sets. testsuite/ChangeLog: * gdb.base/callfuncs.exp (fetch_all_registers): Filter out read-only last_break register on s390*-*-* targets.
2011-12-06 15:14:50 +01:00
static void
s390_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
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.
2017-10-25 17:37:03 +02:00
struct gdbarch *gdbarch = regcache->arch ();
ChangeLog: * s390-tdep.h (S390_ORIG_R2_REGNUM): Define. (S390_LAST_BREAK_REGNUM): Likewise. (S390_SYSTEM_CALL_REGNUM): Likewise. (S390_NUM_REGS): Update. (s390_regmap_last_break): Add declaration. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (tdesc_s390_linux32v1): Add declaration. (tdesc_s390_linux32v2): Likewise. (tdesc_s390_linux64v1): Likewise. (tdesc_s390_linux64v2): Likewise. (tdesc_s390x_linux64v1): Likewise. (tdesc_s390x_linux64v2): Likewise. * s390-tdep.c: Include new target description files "features/s390-linux32v1.c", "features/s390-linux32v2.c", "features/s390-linux64v1.c", "features/s390-linux64v2.c", "features/s390x-linux64v1.c", and "features/s390x-linux64v2.c". (s390_cannot_store_register): New function. (s390_write_pc): Likewise. (s390_dwarf_regmap): Add fields for new registers. (s390_regmap_gregset): Likewise. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): Likewise. (s390_regmap_last_break): New variable. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (s390_last_break_regset): Likewise. (s390x_last_break_regset): Likewise. (s390_system_call_regset): Likewise. (s390_upper_regset_sections): Rename to ... (s390_linux64_regset_sections): ... this. (s390_linux32_regset_sections): New variable. (s390x_linux64_regset_sections): Likewise. (s390_linux32v1_regset_sections): Likewise. (s390_linux32v2_regset_sections): Likewise. (s390_linux64v1_regset_sections): Likewise. (s390_linux64v2_regset_sections): Likewise. (s390x_linux64v1_regset_sections): Likewise. (s390x_linux64v2_regset_sections): Likewise. (s390_regset_from_core_section): Handle .reg-s390-last-break and .reg-s390-system-call core file sections. (s390_core_read_description): Check for presence of .reg-s390-last-break and .reg-s390-system-call core file sections and return appropriate target description. (s390_gdbarch_init): Detect Linux-specific registers "orig_r2", "last_break" and "system_call" in target description. Install appropriate gdbarch_core_regset_sections array. Call set_gdbarch_cannot_store_register and set_gdbarch_write_pc. (_initialize_s390_tdep): Initialize additional target descriptions. * s390-nat.c: Include "elf/common.h". (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (have_regset_last_break): New static variable. (have_regset_system_call): Likewise. (s390_native_supply): Handle S390_ORIG_R2_REGNUM. (s390_native_collect): Likewise. (fetch_regset, store_regset, check_regset): New functions. (s390_linux_fetch_inferior_registers): Handle S390_LAST_BREAK_REGNUM and S390_SYSTEM_CALL_REGNUM. (s390_linux_store_inferior_registers): Likewise. (s390_read_description): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. * features/Makefile (WHICH): Add s390-linux32v1, s390-linux64v1, s390x-linux64v1, s390-linux32v2, s390-linux64v2, and s390x-linux64v2. (s390-linux32v1-expedite): Define. (s390-linux32v2-expedite): Likewise. (s390-linux64v1-expedite): Likewise. (s390-linux64v2-expedite): Likewise. (s390x-linux64v1-expedite): Likewise. (s390x-linux64v2-expedite): Likewise. * features/s390-linux32.xml: Add orig_r2 register. * features/s390-linux64.xml: Likewise. * features/s390x-linux64.xml: Likewise. * features/s390-linux32v1.xml: New file. * features/s390-linux32v2.xml: Likewise. * features/s390-linux64v1.xml: Likewise. * features/s390-linux64v2.xml: Likewise. * features/s390x-linux64v1.xml: Likewise. * features/s390x-linux64v2.xml: Likewise. * features/s390-linux32.c: Regenerate. * features/s390-linux64.c: Likewise. * features/s390x-linux64.c: Likewise. * features/s390-linux32v1.c: New generated file. * features/s390-linux32v2.c: Likewise. * features/s390-linux64v1.c: Likewise. * features/s390-linux64v2.c: Likewise. * features/s390x-linux64v1.c: Likewise. * features/s390x-linux64v2.c: Likewise. * regformats/s390-linux32.dat: Regenerate. * regformats/s390-linux64.dat: Regenerate. * regformats/s390x-linux64.dat: Regenerate. * regformats/s390-linux32v1.dat: New generated file. * regformats/s390-linux32v2.dat: Likewise. * regformats/s390-linux64v1.dat: Likewise. * regformats/s390-linux64v2.dat: Likewise. * regformats/s390x-linux64v1.dat: Likewise. * regformats/s390x-linux64v2.dat: Likewise. gdbserver/ChangeLog: * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules. (s390-linux32v2.o, s390-linux32v2.c): Likewise. (s390-linux64v1.o, s390-linux64v1.c): Likewise. (s390-linux64v2.o, s390-linux64v2.c): Likewise. (s390x-linux64v1.o, s390x-linux64v1.c): Likewise. (s390x-linux64v2.o, s390x-linux64v2.c): Likewise. * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects. (srv_xmlfiles): Add new XML files. * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>, and <sys/uio.h>. (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (init_registers_s390_linux32v1): Add prototype. (init_registers_s390_linux32v2): Likewise. (init_registers_s390_linux64v1): Likewise. (init_registers_s390_linux64v2): Likewise. (init_registers_s390x_linux64v1): Likewise. (init_registers_s390x_linux64v2): Likewise. (s390_num_regs): Increment to 52. (s390_regmap): Add orig_r2 register. (s390_num_regs_3264): Increment to 68. (s390_regmap_3264): Add orig_r2 register. (s390_collect_ptrace_register): Handle orig_r2 register. (s390_supply_ptrace_register): Likewise. (s390_fill_last_break): New function. (s390_store_last_break): Likewise. (s390_fill_system_call): New function. (s390_store_system_call): Likewise. (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL register sets. (s390_check_regset): New function. (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. Update target_regsets for available register sets. testsuite/ChangeLog: * gdb.base/callfuncs.exp (fetch_all_registers): Filter out read-only last_break register on s390*-*-* targets.
2011-12-06 15:14:50 +01:00
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
regcache_cooked_write_unsigned (regcache, tdep->pc_regnum, pc);
/* Set special SYSTEM_CALL register to 0 to prevent the kernel from
messing with the PC we just installed, if we happen to be within
an interrupted system call that the kernel wants to restart.
Note that after we return from the dummy call, the SYSTEM_CALL and
ORIG_R2 registers will be automatically restored, and the kernel
continues to restart the system call at this point. */
if (register_size (gdbarch, S390_SYSTEM_CALL_REGNUM) > 0)
regcache_cooked_write_unsigned (regcache, S390_SYSTEM_CALL_REGNUM, 0);
}
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
/* Maps for register sets. */
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static const struct regcache_map_entry s390_gregmap[] =
{
{ 1, S390_PSWM_REGNUM },
{ 1, S390_PSWA_REGNUM },
{ 16, S390_R0_REGNUM },
{ 16, S390_A0_REGNUM },
{ 1, S390_ORIG_R2_REGNUM },
{ 0 }
};
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static const struct regcache_map_entry s390_fpregmap[] =
{
{ 1, S390_FPC_REGNUM, 8 },
{ 16, S390_F0_REGNUM, 8 },
{ 0 }
};
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static const struct regcache_map_entry s390_regmap_upper[] =
{
{ 16, S390_R0_UPPER_REGNUM, 4 },
{ 0 }
};
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static const struct regcache_map_entry s390_regmap_last_break[] =
{
{ 1, REGCACHE_MAP_SKIP, 4 },
{ 1, S390_LAST_BREAK_REGNUM, 4 },
{ 0 }
};
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static const struct regcache_map_entry s390x_regmap_last_break[] =
{
{ 1, S390_LAST_BREAK_REGNUM, 8 },
{ 0 }
};
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static const struct regcache_map_entry s390_regmap_system_call[] =
{
{ 1, S390_SYSTEM_CALL_REGNUM, 4 },
{ 0 }
};
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static const struct regcache_map_entry s390_regmap_tdb[] =
{
{ 1, S390_TDB_DWORD0_REGNUM, 8 },
{ 1, S390_TDB_ABORT_CODE_REGNUM, 8 },
{ 1, S390_TDB_CONFLICT_TOKEN_REGNUM, 8 },
{ 1, S390_TDB_ATIA_REGNUM, 8 },
{ 12, REGCACHE_MAP_SKIP, 8 },
{ 16, S390_TDB_R0_REGNUM, 8 },
{ 0 }
};
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static const struct regcache_map_entry s390_regmap_vxrs_low[] =
{
{ 16, S390_V0_LOWER_REGNUM, 8 },
{ 0 }
};
S390: Add vector register support to gdb Recognize S/390 targets with the new vector feature and present their vector registers appropriately: as 32 new 128-bit wide registers v0-v31, where the first 16 embed the floating point registers f0-f15. Each of the full registers v0-v15 is modelled as a pseudo register. gdb/ChangeLog: * s390-linux-nat.c (have_regset_vxrs): New static variable. (s390_linux_fetch_inferior_registers): Handle vector registers, if present. (s390_linux_store_inferior_registers): Likewise. (s390_get_hwcap): Remove function. Embed its logic... (s390_read_description): ...here. Yield a target description with vector registers if applicable. * s390-linux-tdep.c: Include "features/s390-vx-linux64.c", "features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and "features/s390x-tevx-linux64.c". (struct gdbarch_tdep) <v0_full_regnum>: New field. (s390_dwarf_regmap): Add vector registers. Remove bogus entries for "GNU/Linux-specific registers". (s390_dwarf_reg_r0l): New enum value. (s390_dwarf_reg_to_regnum): Support vector registers. (s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers of GPR lower halves. (regnum_is_vxr_full): New function. (s390_register_name): New function. (s390_pseudo_register_name): Handle v0-v15, which are composed of f0-f15 and v0l-v15l. (s390_pseudo_register_type): Likewise. (s390_pseudo_register_read): Likewise. (s390_pseudo_register_write): Likewise. (s390_value_from_register): Account for the fact that values are placed left-justified in vector registers. (s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to the vector reggroup and omit them from the general reggroup. (s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps. (s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets. (s390_iterate_over_regset_sections): Add iterations for the two new vector regsets. (s390_core_read_description): Yield a target description with vector registers if applicable. (s390_gdbarch_init): Handle target descriptions with vector registers. Add "register_name" gdbarch method. (_initialize_s390_tdep): Call new tdesc initialization functions. * s390-linux-tdep.h (HWCAP_S390_VX): New macro. (S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM) (S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM) (S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM) (S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM) (S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM) (S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM) (S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM) (S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM) (S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM) (S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM) (S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM) (S390_V30_REGNUM, S390_V31_REGNUM): New macros. (S390_NUM_REGS): Adjust value. (s390_vxrs_low_regset, s390_vxrs_high_regset): Declare. (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64) (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise. * NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static const struct regcache_map_entry s390_regmap_vxrs_high[] =
{
{ 16, S390_V16_REGNUM, 16 },
{ 0 }
};
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static const struct regcache_map_entry s390_regmap_gs[] =
{
{ 1, REGCACHE_MAP_SKIP, 8 },
{ 1, S390_GSD_REGNUM, 8 },
{ 1, S390_GSSM_REGNUM, 8 },
{ 1, S390_GSEPLA_REGNUM, 8 },
{ 0 }
};
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static const struct regcache_map_entry s390_regmap_gsbc[] =
{
{ 1, REGCACHE_MAP_SKIP, 8 },
{ 1, S390_BC_GSD_REGNUM, 8 },
{ 1, S390_BC_GSSM_REGNUM, 8 },
{ 1, S390_BC_GSEPLA_REGNUM, 8 },
{ 0 }
};
S390: Add vector register support to gdb Recognize S/390 targets with the new vector feature and present their vector registers appropriately: as 32 new 128-bit wide registers v0-v31, where the first 16 embed the floating point registers f0-f15. Each of the full registers v0-v15 is modelled as a pseudo register. gdb/ChangeLog: * s390-linux-nat.c (have_regset_vxrs): New static variable. (s390_linux_fetch_inferior_registers): Handle vector registers, if present. (s390_linux_store_inferior_registers): Likewise. (s390_get_hwcap): Remove function. Embed its logic... (s390_read_description): ...here. Yield a target description with vector registers if applicable. * s390-linux-tdep.c: Include "features/s390-vx-linux64.c", "features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and "features/s390x-tevx-linux64.c". (struct gdbarch_tdep) <v0_full_regnum>: New field. (s390_dwarf_regmap): Add vector registers. Remove bogus entries for "GNU/Linux-specific registers". (s390_dwarf_reg_r0l): New enum value. (s390_dwarf_reg_to_regnum): Support vector registers. (s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers of GPR lower halves. (regnum_is_vxr_full): New function. (s390_register_name): New function. (s390_pseudo_register_name): Handle v0-v15, which are composed of f0-f15 and v0l-v15l. (s390_pseudo_register_type): Likewise. (s390_pseudo_register_read): Likewise. (s390_pseudo_register_write): Likewise. (s390_value_from_register): Account for the fact that values are placed left-justified in vector registers. (s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to the vector reggroup and omit them from the general reggroup. (s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps. (s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets. (s390_iterate_over_regset_sections): Add iterations for the two new vector regsets. (s390_core_read_description): Yield a target description with vector registers if applicable. (s390_gdbarch_init): Handle target descriptions with vector registers. Add "register_name" gdbarch method. (_initialize_s390_tdep): Call new tdesc initialization functions. * s390-linux-tdep.h (HWCAP_S390_VX): New macro. (S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM) (S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM) (S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM) (S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM) (S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM) (S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM) (S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM) (S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM) (S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM) (S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM) (S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM) (S390_V30_REGNUM, S390_V31_REGNUM): New macros. (S390_NUM_REGS): Adjust value. (s390_vxrs_low_regset, s390_vxrs_high_regset): Declare. (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64) (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise. * NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
/* Supply the TDB regset. Like regcache_supply_regset, but invalidate
the TDB registers unless the TDB format field is valid. */
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static void
s390_supply_tdb_regset (const struct regset *regset, struct regcache *regcache,
int regnum, const void *regs, size_t len)
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
{
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
ULONGEST tdw;
enum register_status ret;
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
regcache_supply_regset (regset, regcache, regnum, regs, len);
ret = regcache_cooked_read_unsigned (regcache, S390_TDB_DWORD0_REGNUM, &tdw);
if (ret != REG_VALID || (tdw >> 56) != 1)
regcache_supply_regset (regset, regcache, regnum, NULL, len);
}
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
const struct regset s390_gregset = {
s390_gregmap,
regcache_supply_regset,
regcache_collect_regset
};
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
const struct regset s390_fpregset = {
s390_fpregmap,
regcache_supply_regset,
regcache_collect_regset
};
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static const struct regset s390_upper_regset = {
s390_regmap_upper,
regcache_supply_regset,
regcache_collect_regset
};
S390: Add vector register support to gdb Recognize S/390 targets with the new vector feature and present their vector registers appropriately: as 32 new 128-bit wide registers v0-v31, where the first 16 embed the floating point registers f0-f15. Each of the full registers v0-v15 is modelled as a pseudo register. gdb/ChangeLog: * s390-linux-nat.c (have_regset_vxrs): New static variable. (s390_linux_fetch_inferior_registers): Handle vector registers, if present. (s390_linux_store_inferior_registers): Likewise. (s390_get_hwcap): Remove function. Embed its logic... (s390_read_description): ...here. Yield a target description with vector registers if applicable. * s390-linux-tdep.c: Include "features/s390-vx-linux64.c", "features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and "features/s390x-tevx-linux64.c". (struct gdbarch_tdep) <v0_full_regnum>: New field. (s390_dwarf_regmap): Add vector registers. Remove bogus entries for "GNU/Linux-specific registers". (s390_dwarf_reg_r0l): New enum value. (s390_dwarf_reg_to_regnum): Support vector registers. (s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers of GPR lower halves. (regnum_is_vxr_full): New function. (s390_register_name): New function. (s390_pseudo_register_name): Handle v0-v15, which are composed of f0-f15 and v0l-v15l. (s390_pseudo_register_type): Likewise. (s390_pseudo_register_read): Likewise. (s390_pseudo_register_write): Likewise. (s390_value_from_register): Account for the fact that values are placed left-justified in vector registers. (s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to the vector reggroup and omit them from the general reggroup. (s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps. (s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets. (s390_iterate_over_regset_sections): Add iterations for the two new vector regsets. (s390_core_read_description): Yield a target description with vector registers if applicable. (s390_gdbarch_init): Handle target descriptions with vector registers. Add "register_name" gdbarch method. (_initialize_s390_tdep): Call new tdesc initialization functions. * s390-linux-tdep.h (HWCAP_S390_VX): New macro. (S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM) (S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM) (S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM) (S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM) (S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM) (S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM) (S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM) (S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM) (S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM) (S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM) (S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM) (S390_V30_REGNUM, S390_V31_REGNUM): New macros. (S390_NUM_REGS): Adjust value. (s390_vxrs_low_regset, s390_vxrs_high_regset): Declare. (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64) (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise. * NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
const struct regset s390_last_break_regset = {
s390_regmap_last_break,
regcache_supply_regset,
regcache_collect_regset
};
S390: Add vector register support to gdb Recognize S/390 targets with the new vector feature and present their vector registers appropriately: as 32 new 128-bit wide registers v0-v31, where the first 16 embed the floating point registers f0-f15. Each of the full registers v0-v15 is modelled as a pseudo register. gdb/ChangeLog: * s390-linux-nat.c (have_regset_vxrs): New static variable. (s390_linux_fetch_inferior_registers): Handle vector registers, if present. (s390_linux_store_inferior_registers): Likewise. (s390_get_hwcap): Remove function. Embed its logic... (s390_read_description): ...here. Yield a target description with vector registers if applicable. * s390-linux-tdep.c: Include "features/s390-vx-linux64.c", "features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and "features/s390x-tevx-linux64.c". (struct gdbarch_tdep) <v0_full_regnum>: New field. (s390_dwarf_regmap): Add vector registers. Remove bogus entries for "GNU/Linux-specific registers". (s390_dwarf_reg_r0l): New enum value. (s390_dwarf_reg_to_regnum): Support vector registers. (s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers of GPR lower halves. (regnum_is_vxr_full): New function. (s390_register_name): New function. (s390_pseudo_register_name): Handle v0-v15, which are composed of f0-f15 and v0l-v15l. (s390_pseudo_register_type): Likewise. (s390_pseudo_register_read): Likewise. (s390_pseudo_register_write): Likewise. (s390_value_from_register): Account for the fact that values are placed left-justified in vector registers. (s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to the vector reggroup and omit them from the general reggroup. (s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps. (s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets. (s390_iterate_over_regset_sections): Add iterations for the two new vector regsets. (s390_core_read_description): Yield a target description with vector registers if applicable. (s390_gdbarch_init): Handle target descriptions with vector registers. Add "register_name" gdbarch method. (_initialize_s390_tdep): Call new tdesc initialization functions. * s390-linux-tdep.h (HWCAP_S390_VX): New macro. (S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM) (S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM) (S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM) (S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM) (S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM) (S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM) (S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM) (S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM) (S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM) (S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM) (S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM) (S390_V30_REGNUM, S390_V31_REGNUM): New macros. (S390_NUM_REGS): Adjust value. (s390_vxrs_low_regset, s390_vxrs_high_regset): Declare. (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64) (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise. * NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
const struct regset s390x_last_break_regset = {
s390x_regmap_last_break,
regcache_supply_regset,
regcache_collect_regset
};
S390: Add vector register support to gdb Recognize S/390 targets with the new vector feature and present their vector registers appropriately: as 32 new 128-bit wide registers v0-v31, where the first 16 embed the floating point registers f0-f15. Each of the full registers v0-v15 is modelled as a pseudo register. gdb/ChangeLog: * s390-linux-nat.c (have_regset_vxrs): New static variable. (s390_linux_fetch_inferior_registers): Handle vector registers, if present. (s390_linux_store_inferior_registers): Likewise. (s390_get_hwcap): Remove function. Embed its logic... (s390_read_description): ...here. Yield a target description with vector registers if applicable. * s390-linux-tdep.c: Include "features/s390-vx-linux64.c", "features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and "features/s390x-tevx-linux64.c". (struct gdbarch_tdep) <v0_full_regnum>: New field. (s390_dwarf_regmap): Add vector registers. Remove bogus entries for "GNU/Linux-specific registers". (s390_dwarf_reg_r0l): New enum value. (s390_dwarf_reg_to_regnum): Support vector registers. (s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers of GPR lower halves. (regnum_is_vxr_full): New function. (s390_register_name): New function. (s390_pseudo_register_name): Handle v0-v15, which are composed of f0-f15 and v0l-v15l. (s390_pseudo_register_type): Likewise. (s390_pseudo_register_read): Likewise. (s390_pseudo_register_write): Likewise. (s390_value_from_register): Account for the fact that values are placed left-justified in vector registers. (s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to the vector reggroup and omit them from the general reggroup. (s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps. (s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets. (s390_iterate_over_regset_sections): Add iterations for the two new vector regsets. (s390_core_read_description): Yield a target description with vector registers if applicable. (s390_gdbarch_init): Handle target descriptions with vector registers. Add "register_name" gdbarch method. (_initialize_s390_tdep): Call new tdesc initialization functions. * s390-linux-tdep.h (HWCAP_S390_VX): New macro. (S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM) (S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM) (S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM) (S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM) (S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM) (S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM) (S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM) (S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM) (S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM) (S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM) (S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM) (S390_V30_REGNUM, S390_V31_REGNUM): New macros. (S390_NUM_REGS): Adjust value. (s390_vxrs_low_regset, s390_vxrs_high_regset): Declare. (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64) (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise. * NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
const struct regset s390_system_call_regset = {
s390_regmap_system_call,
regcache_supply_regset,
regcache_collect_regset
};
S390: Add vector register support to gdb Recognize S/390 targets with the new vector feature and present their vector registers appropriately: as 32 new 128-bit wide registers v0-v31, where the first 16 embed the floating point registers f0-f15. Each of the full registers v0-v15 is modelled as a pseudo register. gdb/ChangeLog: * s390-linux-nat.c (have_regset_vxrs): New static variable. (s390_linux_fetch_inferior_registers): Handle vector registers, if present. (s390_linux_store_inferior_registers): Likewise. (s390_get_hwcap): Remove function. Embed its logic... (s390_read_description): ...here. Yield a target description with vector registers if applicable. * s390-linux-tdep.c: Include "features/s390-vx-linux64.c", "features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and "features/s390x-tevx-linux64.c". (struct gdbarch_tdep) <v0_full_regnum>: New field. (s390_dwarf_regmap): Add vector registers. Remove bogus entries for "GNU/Linux-specific registers". (s390_dwarf_reg_r0l): New enum value. (s390_dwarf_reg_to_regnum): Support vector registers. (s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers of GPR lower halves. (regnum_is_vxr_full): New function. (s390_register_name): New function. (s390_pseudo_register_name): Handle v0-v15, which are composed of f0-f15 and v0l-v15l. (s390_pseudo_register_type): Likewise. (s390_pseudo_register_read): Likewise. (s390_pseudo_register_write): Likewise. (s390_value_from_register): Account for the fact that values are placed left-justified in vector registers. (s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to the vector reggroup and omit them from the general reggroup. (s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps. (s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets. (s390_iterate_over_regset_sections): Add iterations for the two new vector regsets. (s390_core_read_description): Yield a target description with vector registers if applicable. (s390_gdbarch_init): Handle target descriptions with vector registers. Add "register_name" gdbarch method. (_initialize_s390_tdep): Call new tdesc initialization functions. * s390-linux-tdep.h (HWCAP_S390_VX): New macro. (S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM) (S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM) (S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM) (S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM) (S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM) (S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM) (S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM) (S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM) (S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM) (S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM) (S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM) (S390_V30_REGNUM, S390_V31_REGNUM): New macros. (S390_NUM_REGS): Adjust value. (s390_vxrs_low_regset, s390_vxrs_high_regset): Declare. (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64) (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise. * NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
const struct regset s390_tdb_regset = {
s390_regmap_tdb,
s390_supply_tdb_regset,
regcache_collect_regset
};
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
const struct regset s390_vxrs_low_regset = {
s390_regmap_vxrs_low,
regcache_supply_regset,
regcache_collect_regset
};
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
const struct regset s390_vxrs_high_regset = {
s390_regmap_vxrs_high,
regcache_supply_regset,
regcache_collect_regset
};
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
const struct regset s390_gs_regset = {
s390_regmap_gs,
regcache_supply_regset,
regcache_collect_regset
};
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
const struct regset s390_gsbc_regset = {
s390_regmap_gsbc,
regcache_supply_regset,
regcache_collect_regset
};
S390: Add vector register support to gdb Recognize S/390 targets with the new vector feature and present their vector registers appropriately: as 32 new 128-bit wide registers v0-v31, where the first 16 embed the floating point registers f0-f15. Each of the full registers v0-v15 is modelled as a pseudo register. gdb/ChangeLog: * s390-linux-nat.c (have_regset_vxrs): New static variable. (s390_linux_fetch_inferior_registers): Handle vector registers, if present. (s390_linux_store_inferior_registers): Likewise. (s390_get_hwcap): Remove function. Embed its logic... (s390_read_description): ...here. Yield a target description with vector registers if applicable. * s390-linux-tdep.c: Include "features/s390-vx-linux64.c", "features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and "features/s390x-tevx-linux64.c". (struct gdbarch_tdep) <v0_full_regnum>: New field. (s390_dwarf_regmap): Add vector registers. Remove bogus entries for "GNU/Linux-specific registers". (s390_dwarf_reg_r0l): New enum value. (s390_dwarf_reg_to_regnum): Support vector registers. (s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers of GPR lower halves. (regnum_is_vxr_full): New function. (s390_register_name): New function. (s390_pseudo_register_name): Handle v0-v15, which are composed of f0-f15 and v0l-v15l. (s390_pseudo_register_type): Likewise. (s390_pseudo_register_read): Likewise. (s390_pseudo_register_write): Likewise. (s390_value_from_register): Account for the fact that values are placed left-justified in vector registers. (s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to the vector reggroup and omit them from the general reggroup. (s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps. (s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets. (s390_iterate_over_regset_sections): Add iterations for the two new vector regsets. (s390_core_read_description): Yield a target description with vector registers if applicable. (s390_gdbarch_init): Handle target descriptions with vector registers. Add "register_name" gdbarch method. (_initialize_s390_tdep): Call new tdesc initialization functions. * s390-linux-tdep.h (HWCAP_S390_VX): New macro. (S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM) (S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM) (S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM) (S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM) (S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM) (S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM) (S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM) (S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM) (S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM) (S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM) (S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM) (S390_V30_REGNUM, S390_V31_REGNUM): New macros. (S390_NUM_REGS): Adjust value. (s390_vxrs_low_regset, s390_vxrs_high_regset): Declare. (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64) (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise. * NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
/* Iterate over supported core file register note sections. */
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static void
s390_iterate_over_regset_sections (struct gdbarch *gdbarch,
iterate_over_regset_sections_cb *cb,
void *cb_data,
const struct regcache *regcache)
{
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
const int gregset_size = (tdep->abi == ABI_LINUX_S390 ?
s390_sizeof_gregset : s390x_sizeof_gregset);
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
Split size in regset section iterators In the existing code, when using the regset section iteration functions, the size parameter is used in different ways. With collect, size is used to create the buffer in which to write the regset. (see linux-tdep.c::linux_collect_regset_section_cb). With supply, size is used to confirm the existing regset is the correct size. If REGSET_VARIABLE_SIZE is set then the regset can be bigger than size. Effectively, size is the minimum possible size of the regset. (see corelow.c::get_core_register_section). There are currently no targets with both REGSET_VARIABLE_SIZE and a collect function. In SVE, a corefile can contain one of two formats after the header, both of which are different sizes. However, when writing a core file, we always want to write out the full bigger size. To allow support of collects for REGSET_VARIABLE_SIZE we need two sizes. This is done by adding supply_size and collect_size. gdb/ * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and collect_size. * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections): Likewise. * alpha-linux-tdep.c (alpha_linux_iterate_over_regset_sections): * alpha-nbsd-tdep.c (alphanbsd_iterate_over_regset_sections): Likewise. * amd64-fbsd-tdep.c (amd64fbsd_iterate_over_regset_sections): Likewise. * amd64-linux-tdep.c (amd64_linux_iterate_over_regset_sections): Likewise. * arm-bsd-tdep.c (armbsd_iterate_over_regset_sections): Likewise. * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise. * arm-linux-tdep.c (arm_linux_iterate_over_regset_sections): Likewise. * corelow.c (get_core_registers_cb): Likewise. (core_target::fetch_registers): Likewise. * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise. * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise. * gdbarch.h (void): Regenerate. * gdbarch.sh: Add supply_size and collect_size. * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise. * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise. * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise. * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise. * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise. * i386-tdep.c (i386_iterate_over_regset_sections): Likewise. * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise. * linux-tdep.c (linux_collect_regset_section_cb): Likewise. * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise. * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise. * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise. * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise. * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise. * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise. * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise. * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise. * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise. * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise. * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise. * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise. * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise. * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise. * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise. * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise. * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise. * sh-tdep.c (sh_iterate_over_regset_sections): Likewise. * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise. * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise. * vax-tdep.c (vax_iterate_over_regset_sections): Likewise. * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2018-08-13 11:04:11 +02:00
cb (".reg", gregset_size, gregset_size, &s390_gregset, NULL, cb_data);
cb (".reg2", s390_sizeof_fpregset, s390_sizeof_fpregset, &s390_fpregset, NULL,
cb_data);
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (tdep->abi == ABI_LINUX_S390 && tdep->gpr_full_regnum != -1)
Split size in regset section iterators In the existing code, when using the regset section iteration functions, the size parameter is used in different ways. With collect, size is used to create the buffer in which to write the regset. (see linux-tdep.c::linux_collect_regset_section_cb). With supply, size is used to confirm the existing regset is the correct size. If REGSET_VARIABLE_SIZE is set then the regset can be bigger than size. Effectively, size is the minimum possible size of the regset. (see corelow.c::get_core_register_section). There are currently no targets with both REGSET_VARIABLE_SIZE and a collect function. In SVE, a corefile can contain one of two formats after the header, both of which are different sizes. However, when writing a core file, we always want to write out the full bigger size. To allow support of collects for REGSET_VARIABLE_SIZE we need two sizes. This is done by adding supply_size and collect_size. gdb/ * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and collect_size. * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections): Likewise. * alpha-linux-tdep.c (alpha_linux_iterate_over_regset_sections): * alpha-nbsd-tdep.c (alphanbsd_iterate_over_regset_sections): Likewise. * amd64-fbsd-tdep.c (amd64fbsd_iterate_over_regset_sections): Likewise. * amd64-linux-tdep.c (amd64_linux_iterate_over_regset_sections): Likewise. * arm-bsd-tdep.c (armbsd_iterate_over_regset_sections): Likewise. * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise. * arm-linux-tdep.c (arm_linux_iterate_over_regset_sections): Likewise. * corelow.c (get_core_registers_cb): Likewise. (core_target::fetch_registers): Likewise. * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise. * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise. * gdbarch.h (void): Regenerate. * gdbarch.sh: Add supply_size and collect_size. * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise. * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise. * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise. * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise. * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise. * i386-tdep.c (i386_iterate_over_regset_sections): Likewise. * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise. * linux-tdep.c (linux_collect_regset_section_cb): Likewise. * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise. * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise. * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise. * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise. * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise. * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise. * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise. * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise. * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise. * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise. * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise. * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise. * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise. * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise. * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise. * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise. * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise. * sh-tdep.c (sh_iterate_over_regset_sections): Likewise. * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise. * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise. * vax-tdep.c (vax_iterate_over_regset_sections): Likewise. * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2018-08-13 11:04:11 +02:00
cb (".reg-s390-high-gprs", 16 * 4, 16 * 4, &s390_upper_regset,
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
"s390 GPR upper halves", cb_data);
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (tdep->have_linux_v1)
Split size in regset section iterators In the existing code, when using the regset section iteration functions, the size parameter is used in different ways. With collect, size is used to create the buffer in which to write the regset. (see linux-tdep.c::linux_collect_regset_section_cb). With supply, size is used to confirm the existing regset is the correct size. If REGSET_VARIABLE_SIZE is set then the regset can be bigger than size. Effectively, size is the minimum possible size of the regset. (see corelow.c::get_core_register_section). There are currently no targets with both REGSET_VARIABLE_SIZE and a collect function. In SVE, a corefile can contain one of two formats after the header, both of which are different sizes. However, when writing a core file, we always want to write out the full bigger size. To allow support of collects for REGSET_VARIABLE_SIZE we need two sizes. This is done by adding supply_size and collect_size. gdb/ * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and collect_size. * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections): Likewise. * alpha-linux-tdep.c (alpha_linux_iterate_over_regset_sections): * alpha-nbsd-tdep.c (alphanbsd_iterate_over_regset_sections): Likewise. * amd64-fbsd-tdep.c (amd64fbsd_iterate_over_regset_sections): Likewise. * amd64-linux-tdep.c (amd64_linux_iterate_over_regset_sections): Likewise. * arm-bsd-tdep.c (armbsd_iterate_over_regset_sections): Likewise. * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise. * arm-linux-tdep.c (arm_linux_iterate_over_regset_sections): Likewise. * corelow.c (get_core_registers_cb): Likewise. (core_target::fetch_registers): Likewise. * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise. * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise. * gdbarch.h (void): Regenerate. * gdbarch.sh: Add supply_size and collect_size. * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise. * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise. * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise. * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise. * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise. * i386-tdep.c (i386_iterate_over_regset_sections): Likewise. * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise. * linux-tdep.c (linux_collect_regset_section_cb): Likewise. * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise. * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise. * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise. * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise. * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise. * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise. * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise. * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise. * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise. * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise. * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise. * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise. * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise. * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise. * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise. * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise. * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise. * sh-tdep.c (sh_iterate_over_regset_sections): Likewise. * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise. * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise. * vax-tdep.c (vax_iterate_over_regset_sections): Likewise. * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2018-08-13 11:04:11 +02:00
cb (".reg-s390-last-break", 8, 8,
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
(gdbarch_ptr_bit (gdbarch) == 32
? &s390_last_break_regset : &s390x_last_break_regset),
"s390 last-break address", cb_data);
S390: Add vector register support to gdb Recognize S/390 targets with the new vector feature and present their vector registers appropriately: as 32 new 128-bit wide registers v0-v31, where the first 16 embed the floating point registers f0-f15. Each of the full registers v0-v15 is modelled as a pseudo register. gdb/ChangeLog: * s390-linux-nat.c (have_regset_vxrs): New static variable. (s390_linux_fetch_inferior_registers): Handle vector registers, if present. (s390_linux_store_inferior_registers): Likewise. (s390_get_hwcap): Remove function. Embed its logic... (s390_read_description): ...here. Yield a target description with vector registers if applicable. * s390-linux-tdep.c: Include "features/s390-vx-linux64.c", "features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and "features/s390x-tevx-linux64.c". (struct gdbarch_tdep) <v0_full_regnum>: New field. (s390_dwarf_regmap): Add vector registers. Remove bogus entries for "GNU/Linux-specific registers". (s390_dwarf_reg_r0l): New enum value. (s390_dwarf_reg_to_regnum): Support vector registers. (s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers of GPR lower halves. (regnum_is_vxr_full): New function. (s390_register_name): New function. (s390_pseudo_register_name): Handle v0-v15, which are composed of f0-f15 and v0l-v15l. (s390_pseudo_register_type): Likewise. (s390_pseudo_register_read): Likewise. (s390_pseudo_register_write): Likewise. (s390_value_from_register): Account for the fact that values are placed left-justified in vector registers. (s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to the vector reggroup and omit them from the general reggroup. (s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps. (s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets. (s390_iterate_over_regset_sections): Add iterations for the two new vector regsets. (s390_core_read_description): Yield a target description with vector registers if applicable. (s390_gdbarch_init): Handle target descriptions with vector registers. Add "register_name" gdbarch method. (_initialize_s390_tdep): Call new tdesc initialization functions. * s390-linux-tdep.h (HWCAP_S390_VX): New macro. (S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM) (S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM) (S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM) (S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM) (S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM) (S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM) (S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM) (S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM) (S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM) (S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM) (S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM) (S390_V30_REGNUM, S390_V31_REGNUM): New macros. (S390_NUM_REGS): Adjust value. (s390_vxrs_low_regset, s390_vxrs_high_regset): Declare. (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64) (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise. * NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (tdep->have_linux_v2)
Split size in regset section iterators In the existing code, when using the regset section iteration functions, the size parameter is used in different ways. With collect, size is used to create the buffer in which to write the regset. (see linux-tdep.c::linux_collect_regset_section_cb). With supply, size is used to confirm the existing regset is the correct size. If REGSET_VARIABLE_SIZE is set then the regset can be bigger than size. Effectively, size is the minimum possible size of the regset. (see corelow.c::get_core_register_section). There are currently no targets with both REGSET_VARIABLE_SIZE and a collect function. In SVE, a corefile can contain one of two formats after the header, both of which are different sizes. However, when writing a core file, we always want to write out the full bigger size. To allow support of collects for REGSET_VARIABLE_SIZE we need two sizes. This is done by adding supply_size and collect_size. gdb/ * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and collect_size. * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections): Likewise. * alpha-linux-tdep.c (alpha_linux_iterate_over_regset_sections): * alpha-nbsd-tdep.c (alphanbsd_iterate_over_regset_sections): Likewise. * amd64-fbsd-tdep.c (amd64fbsd_iterate_over_regset_sections): Likewise. * amd64-linux-tdep.c (amd64_linux_iterate_over_regset_sections): Likewise. * arm-bsd-tdep.c (armbsd_iterate_over_regset_sections): Likewise. * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise. * arm-linux-tdep.c (arm_linux_iterate_over_regset_sections): Likewise. * corelow.c (get_core_registers_cb): Likewise. (core_target::fetch_registers): Likewise. * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise. * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise. * gdbarch.h (void): Regenerate. * gdbarch.sh: Add supply_size and collect_size. * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise. * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise. * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise. * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise. * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise. * i386-tdep.c (i386_iterate_over_regset_sections): Likewise. * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise. * linux-tdep.c (linux_collect_regset_section_cb): Likewise. * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise. * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise. * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise. * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise. * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise. * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise. * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise. * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise. * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise. * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise. * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise. * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise. * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise. * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise. * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise. * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise. * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise. * sh-tdep.c (sh_iterate_over_regset_sections): Likewise. * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise. * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise. * vax-tdep.c (vax_iterate_over_regset_sections): Likewise. * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2018-08-13 11:04:11 +02:00
cb (".reg-s390-system-call", 4, 4, &s390_system_call_regset,
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
"s390 system-call", cb_data);
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
/* If regcache is set, we are in "write" (gcore) mode. In this
case, don't iterate over the TDB unless its registers are
available. */
if (tdep->have_tdb
&& (regcache == NULL
|| (REG_VALID
== regcache->get_register_status (S390_TDB_DWORD0_REGNUM))))
Split size in regset section iterators In the existing code, when using the regset section iteration functions, the size parameter is used in different ways. With collect, size is used to create the buffer in which to write the regset. (see linux-tdep.c::linux_collect_regset_section_cb). With supply, size is used to confirm the existing regset is the correct size. If REGSET_VARIABLE_SIZE is set then the regset can be bigger than size. Effectively, size is the minimum possible size of the regset. (see corelow.c::get_core_register_section). There are currently no targets with both REGSET_VARIABLE_SIZE and a collect function. In SVE, a corefile can contain one of two formats after the header, both of which are different sizes. However, when writing a core file, we always want to write out the full bigger size. To allow support of collects for REGSET_VARIABLE_SIZE we need two sizes. This is done by adding supply_size and collect_size. gdb/ * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and collect_size. * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections): Likewise. * alpha-linux-tdep.c (alpha_linux_iterate_over_regset_sections): * alpha-nbsd-tdep.c (alphanbsd_iterate_over_regset_sections): Likewise. * amd64-fbsd-tdep.c (amd64fbsd_iterate_over_regset_sections): Likewise. * amd64-linux-tdep.c (amd64_linux_iterate_over_regset_sections): Likewise. * arm-bsd-tdep.c (armbsd_iterate_over_regset_sections): Likewise. * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise. * arm-linux-tdep.c (arm_linux_iterate_over_regset_sections): Likewise. * corelow.c (get_core_registers_cb): Likewise. (core_target::fetch_registers): Likewise. * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise. * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise. * gdbarch.h (void): Regenerate. * gdbarch.sh: Add supply_size and collect_size. * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise. * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise. * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise. * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise. * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise. * i386-tdep.c (i386_iterate_over_regset_sections): Likewise. * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise. * linux-tdep.c (linux_collect_regset_section_cb): Likewise. * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise. * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise. * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise. * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise. * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise. * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise. * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise. * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise. * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise. * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise. * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise. * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise. * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise. * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise. * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise. * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise. * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise. * sh-tdep.c (sh_iterate_over_regset_sections): Likewise. * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise. * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise. * vax-tdep.c (vax_iterate_over_regset_sections): Likewise. * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2018-08-13 11:04:11 +02:00
cb (".reg-s390-tdb", s390_sizeof_tdbregset, s390_sizeof_tdbregset,
&s390_tdb_regset, "s390 TDB", cb_data);
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (tdep->v0_full_regnum != -1)
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
{
Split size in regset section iterators In the existing code, when using the regset section iteration functions, the size parameter is used in different ways. With collect, size is used to create the buffer in which to write the regset. (see linux-tdep.c::linux_collect_regset_section_cb). With supply, size is used to confirm the existing regset is the correct size. If REGSET_VARIABLE_SIZE is set then the regset can be bigger than size. Effectively, size is the minimum possible size of the regset. (see corelow.c::get_core_register_section). There are currently no targets with both REGSET_VARIABLE_SIZE and a collect function. In SVE, a corefile can contain one of two formats after the header, both of which are different sizes. However, when writing a core file, we always want to write out the full bigger size. To allow support of collects for REGSET_VARIABLE_SIZE we need two sizes. This is done by adding supply_size and collect_size. gdb/ * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and collect_size. * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections): Likewise. * alpha-linux-tdep.c (alpha_linux_iterate_over_regset_sections): * alpha-nbsd-tdep.c (alphanbsd_iterate_over_regset_sections): Likewise. * amd64-fbsd-tdep.c (amd64fbsd_iterate_over_regset_sections): Likewise. * amd64-linux-tdep.c (amd64_linux_iterate_over_regset_sections): Likewise. * arm-bsd-tdep.c (armbsd_iterate_over_regset_sections): Likewise. * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise. * arm-linux-tdep.c (arm_linux_iterate_over_regset_sections): Likewise. * corelow.c (get_core_registers_cb): Likewise. (core_target::fetch_registers): Likewise. * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise. * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise. * gdbarch.h (void): Regenerate. * gdbarch.sh: Add supply_size and collect_size. * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise. * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise. * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise. * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise. * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise. * i386-tdep.c (i386_iterate_over_regset_sections): Likewise. * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise. * linux-tdep.c (linux_collect_regset_section_cb): Likewise. * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise. * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise. * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise. * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise. * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise. * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise. * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise. * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise. * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise. * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise. * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise. * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise. * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise. * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise. * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise. * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise. * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise. * sh-tdep.c (sh_iterate_over_regset_sections): Likewise. * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise. * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise. * vax-tdep.c (vax_iterate_over_regset_sections): Likewise. * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2018-08-13 11:04:11 +02:00
cb (".reg-s390-vxrs-low", 16 * 8, 16 * 8, &s390_vxrs_low_regset,
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
"s390 vector registers 0-15 lower half", cb_data);
Split size in regset section iterators In the existing code, when using the regset section iteration functions, the size parameter is used in different ways. With collect, size is used to create the buffer in which to write the regset. (see linux-tdep.c::linux_collect_regset_section_cb). With supply, size is used to confirm the existing regset is the correct size. If REGSET_VARIABLE_SIZE is set then the regset can be bigger than size. Effectively, size is the minimum possible size of the regset. (see corelow.c::get_core_register_section). There are currently no targets with both REGSET_VARIABLE_SIZE and a collect function. In SVE, a corefile can contain one of two formats after the header, both of which are different sizes. However, when writing a core file, we always want to write out the full bigger size. To allow support of collects for REGSET_VARIABLE_SIZE we need two sizes. This is done by adding supply_size and collect_size. gdb/ * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and collect_size. * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections): Likewise. * alpha-linux-tdep.c (alpha_linux_iterate_over_regset_sections): * alpha-nbsd-tdep.c (alphanbsd_iterate_over_regset_sections): Likewise. * amd64-fbsd-tdep.c (amd64fbsd_iterate_over_regset_sections): Likewise. * amd64-linux-tdep.c (amd64_linux_iterate_over_regset_sections): Likewise. * arm-bsd-tdep.c (armbsd_iterate_over_regset_sections): Likewise. * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise. * arm-linux-tdep.c (arm_linux_iterate_over_regset_sections): Likewise. * corelow.c (get_core_registers_cb): Likewise. (core_target::fetch_registers): Likewise. * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise. * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise. * gdbarch.h (void): Regenerate. * gdbarch.sh: Add supply_size and collect_size. * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise. * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise. * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise. * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise. * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise. * i386-tdep.c (i386_iterate_over_regset_sections): Likewise. * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise. * linux-tdep.c (linux_collect_regset_section_cb): Likewise. * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise. * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise. * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise. * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise. * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise. * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise. * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise. * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise. * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise. * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise. * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise. * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise. * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise. * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise. * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise. * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise. * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise. * sh-tdep.c (sh_iterate_over_regset_sections): Likewise. * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise. * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise. * vax-tdep.c (vax_iterate_over_regset_sections): Likewise. * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2018-08-13 11:04:11 +02:00
cb (".reg-s390-vxrs-high", 16 * 16, 16 * 16, &s390_vxrs_high_regset,
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
"s390 vector registers 16-31", cb_data);
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
}
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
/* Iterate over the guarded-storage regsets if in "read" mode, or if
their registers are available. */
if (tdep->have_gs)
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
{
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (regcache == NULL
|| REG_VALID == regcache->get_register_status (S390_GSD_REGNUM))
Split size in regset section iterators In the existing code, when using the regset section iteration functions, the size parameter is used in different ways. With collect, size is used to create the buffer in which to write the regset. (see linux-tdep.c::linux_collect_regset_section_cb). With supply, size is used to confirm the existing regset is the correct size. If REGSET_VARIABLE_SIZE is set then the regset can be bigger than size. Effectively, size is the minimum possible size of the regset. (see corelow.c::get_core_register_section). There are currently no targets with both REGSET_VARIABLE_SIZE and a collect function. In SVE, a corefile can contain one of two formats after the header, both of which are different sizes. However, when writing a core file, we always want to write out the full bigger size. To allow support of collects for REGSET_VARIABLE_SIZE we need two sizes. This is done by adding supply_size and collect_size. gdb/ * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and collect_size. * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections): Likewise. * alpha-linux-tdep.c (alpha_linux_iterate_over_regset_sections): * alpha-nbsd-tdep.c (alphanbsd_iterate_over_regset_sections): Likewise. * amd64-fbsd-tdep.c (amd64fbsd_iterate_over_regset_sections): Likewise. * amd64-linux-tdep.c (amd64_linux_iterate_over_regset_sections): Likewise. * arm-bsd-tdep.c (armbsd_iterate_over_regset_sections): Likewise. * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise. * arm-linux-tdep.c (arm_linux_iterate_over_regset_sections): Likewise. * corelow.c (get_core_registers_cb): Likewise. (core_target::fetch_registers): Likewise. * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise. * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise. * gdbarch.h (void): Regenerate. * gdbarch.sh: Add supply_size and collect_size. * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise. * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise. * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise. * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise. * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise. * i386-tdep.c (i386_iterate_over_regset_sections): Likewise. * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise. * linux-tdep.c (linux_collect_regset_section_cb): Likewise. * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise. * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise. * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise. * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise. * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise. * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise. * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise. * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise. * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise. * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise. * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise. * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise. * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise. * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise. * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise. * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise. * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise. * sh-tdep.c (sh_iterate_over_regset_sections): Likewise. * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise. * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise. * vax-tdep.c (vax_iterate_over_regset_sections): Likewise. * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2018-08-13 11:04:11 +02:00
cb (".reg-s390-gs-cb", 4 * 8, 4 * 8, &s390_gs_regset,
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
"s390 guarded-storage registers", cb_data);
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (regcache == NULL
|| REG_VALID == regcache->get_register_status (S390_BC_GSD_REGNUM))
Split size in regset section iterators In the existing code, when using the regset section iteration functions, the size parameter is used in different ways. With collect, size is used to create the buffer in which to write the regset. (see linux-tdep.c::linux_collect_regset_section_cb). With supply, size is used to confirm the existing regset is the correct size. If REGSET_VARIABLE_SIZE is set then the regset can be bigger than size. Effectively, size is the minimum possible size of the regset. (see corelow.c::get_core_register_section). There are currently no targets with both REGSET_VARIABLE_SIZE and a collect function. In SVE, a corefile can contain one of two formats after the header, both of which are different sizes. However, when writing a core file, we always want to write out the full bigger size. To allow support of collects for REGSET_VARIABLE_SIZE we need two sizes. This is done by adding supply_size and collect_size. gdb/ * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and collect_size. * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections): Likewise. * alpha-linux-tdep.c (alpha_linux_iterate_over_regset_sections): * alpha-nbsd-tdep.c (alphanbsd_iterate_over_regset_sections): Likewise. * amd64-fbsd-tdep.c (amd64fbsd_iterate_over_regset_sections): Likewise. * amd64-linux-tdep.c (amd64_linux_iterate_over_regset_sections): Likewise. * arm-bsd-tdep.c (armbsd_iterate_over_regset_sections): Likewise. * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise. * arm-linux-tdep.c (arm_linux_iterate_over_regset_sections): Likewise. * corelow.c (get_core_registers_cb): Likewise. (core_target::fetch_registers): Likewise. * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise. * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise. * gdbarch.h (void): Regenerate. * gdbarch.sh: Add supply_size and collect_size. * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise. * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise. * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise. * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise. * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise. * i386-tdep.c (i386_iterate_over_regset_sections): Likewise. * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise. * linux-tdep.c (linux_collect_regset_section_cb): Likewise. * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise. * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise. * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise. * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise. * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise. * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise. * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise. * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise. * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise. * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise. * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise. * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise. * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise. * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise. * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise. * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise. * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise. * sh-tdep.c (sh_iterate_over_regset_sections): Likewise. * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise. * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise. * vax-tdep.c (vax_iterate_over_regset_sections): Likewise. * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2018-08-13 11:04:11 +02:00
cb (".reg-s390-gs-bc", 4 * 8, 4 * 8, &s390_gsbc_regset,
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
"s390 guarded-storage broadcast control", cb_data);
S390: Add vector register support to gdb Recognize S/390 targets with the new vector feature and present their vector registers appropriately: as 32 new 128-bit wide registers v0-v31, where the first 16 embed the floating point registers f0-f15. Each of the full registers v0-v15 is modelled as a pseudo register. gdb/ChangeLog: * s390-linux-nat.c (have_regset_vxrs): New static variable. (s390_linux_fetch_inferior_registers): Handle vector registers, if present. (s390_linux_store_inferior_registers): Likewise. (s390_get_hwcap): Remove function. Embed its logic... (s390_read_description): ...here. Yield a target description with vector registers if applicable. * s390-linux-tdep.c: Include "features/s390-vx-linux64.c", "features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and "features/s390x-tevx-linux64.c". (struct gdbarch_tdep) <v0_full_regnum>: New field. (s390_dwarf_regmap): Add vector registers. Remove bogus entries for "GNU/Linux-specific registers". (s390_dwarf_reg_r0l): New enum value. (s390_dwarf_reg_to_regnum): Support vector registers. (s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers of GPR lower halves. (regnum_is_vxr_full): New function. (s390_register_name): New function. (s390_pseudo_register_name): Handle v0-v15, which are composed of f0-f15 and v0l-v15l. (s390_pseudo_register_type): Likewise. (s390_pseudo_register_read): Likewise. (s390_pseudo_register_write): Likewise. (s390_value_from_register): Account for the fact that values are placed left-justified in vector registers. (s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to the vector reggroup and omit them from the general reggroup. (s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps. (s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets. (s390_iterate_over_regset_sections): Add iterations for the two new vector regsets. (s390_core_read_description): Yield a target description with vector registers if applicable. (s390_gdbarch_init): Handle target descriptions with vector registers. Add "register_name" gdbarch method. (_initialize_s390_tdep): Call new tdesc initialization functions. * s390-linux-tdep.h (HWCAP_S390_VX): New macro. (S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM) (S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM) (S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM) (S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM) (S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM) (S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM) (S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM) (S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM) (S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM) (S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM) (S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM) (S390_V30_REGNUM, S390_V31_REGNUM): New macros. (S390_NUM_REGS): Adjust value. (s390_vxrs_low_regset, s390_vxrs_high_regset): Declare. (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64) (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise. * NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
}
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
}
/* Implement core_read_description gdbarch method. */
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static const struct target_desc *
s390_core_read_description (struct gdbarch *gdbarch,
struct target_ops *target, bfd *abfd)
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
{
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
asection *section = bfd_get_section_by_name (abfd, ".reg");
CORE_ADDR hwcap = linux_get_hwcap (target);
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
bool high_gprs, v1, v2, te, vx, gs;
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (!section)
return NULL;
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
high_gprs = (bfd_get_section_by_name (abfd, ".reg-s390-high-gprs")
!= NULL);
v1 = (bfd_get_section_by_name (abfd, ".reg-s390-last-break") != NULL);
v2 = (bfd_get_section_by_name (abfd, ".reg-s390-system-call") != NULL);
vx = (hwcap & HWCAP_S390_VX);
te = (hwcap & HWCAP_S390_TE);
gs = (hwcap & HWCAP_S390_GS);
bfd_section_* macros This large patch removes the unnecessary bfd parameter from various bfd section macros and functions. The bfd is hardly ever used and if needed for the bfd_set_section_* or bfd_rename_section functions can be found via section->owner except for the com, und, abs, and ind std_section special sections. Those sections shouldn't be modified anyway. The patch also removes various bfd_get_section_<field> macros, replacing their use with bfd_section_<field>, and adds bfd_set_section_lma. I've also fixed a minor bug in gas where compressed section renaming was done directly rather than calling bfd_rename_section. This would have broken bfd_get_section_by_name and similar functions, but that hardly mattered at such a late stage in gas processing. bfd/ * bfd-in.h (bfd_get_section_name, bfd_get_section_vma), (bfd_get_section_lma, bfd_get_section_alignment), (bfd_get_section_size, bfd_get_section_flags), (bfd_get_section_userdata): Delete. (bfd_section_name, bfd_section_size, bfd_section_vma), (bfd_section_lma, bfd_section_alignment): Lose bfd parameter. (bfd_section_flags, bfd_section_userdata): New. (bfd_is_com_section): Rename parameter. * section.c (bfd_set_section_userdata, bfd_set_section_vma), (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section), (bfd_set_section_size): Delete bfd parameter, rename section parameter. (bfd_set_section_lma): New. * bfd-in2.h: Regenerate. * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param, update callers. * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h, * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c, * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c, * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c, * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c, * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c, * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c, * xcofflink.c: Update throughout for bfd section macro and function changes. binutils/ * addr2line.c, * bucomm.c, * coffgrok.c, * dlltool.c, * nm.c, * objcopy.c, * objdump.c, * od-elf32_avr.c, * od-macho.c, * od-xcoff.c, * prdbg.c, * rdcoff.c, * rddbg.c, * rescoff.c, * resres.c, * size.c, * srconv.c, * strings.c, * windmc.c: Update throughout for bfd section macro and function changes. gas/ * as.c, * as.h, * dw2gencfi.c, * dwarf2dbg.c, * ecoff.c, * read.c, * stabs.c, * subsegs.c, * subsegs.h, * write.c, * config/obj-coff-seh.c, * config/obj-coff.c, * config/obj-ecoff.c, * config/obj-elf.c, * config/obj-macho.c, * config/obj-som.c, * config/tc-aarch64.c, * config/tc-alpha.c, * config/tc-arc.c, * config/tc-arm.c, * config/tc-avr.c, * config/tc-bfin.c, * config/tc-bpf.c, * config/tc-d10v.c, * config/tc-d30v.c, * config/tc-epiphany.c, * config/tc-fr30.c, * config/tc-frv.c, * config/tc-h8300.c, * config/tc-hppa.c, * config/tc-i386.c, * config/tc-ia64.c, * config/tc-ip2k.c, * config/tc-iq2000.c, * config/tc-lm32.c, * config/tc-m32c.c, * config/tc-m32r.c, * config/tc-m68hc11.c, * config/tc-mep.c, * config/tc-microblaze.c, * config/tc-mips.c, * config/tc-mmix.c, * config/tc-mn10200.c, * config/tc-mn10300.c, * config/tc-msp430.c, * config/tc-mt.c, * config/tc-nds32.c, * config/tc-or1k.c, * config/tc-ppc.c, * config/tc-pru.c, * config/tc-rl78.c, * config/tc-rx.c, * config/tc-s12z.c, * config/tc-s390.c, * config/tc-score.c, * config/tc-score7.c, * config/tc-sh.c, * config/tc-sparc.c, * config/tc-spu.c, * config/tc-tic4x.c, * config/tc-tic54x.c, * config/tc-tic6x.c, * config/tc-tilegx.c, * config/tc-tilepro.c, * config/tc-v850.c, * config/tc-visium.c, * config/tc-wasm32.c, * config/tc-xc16x.c, * config/tc-xgate.c, * config/tc-xstormy16.c, * config/tc-xtensa.c, * config/tc-z8k.c: Update throughout for bfd section macro and function changes. * write.c (compress_debug): Use bfd_rename_section. gdb/ * aarch64-linux-tdep.c, * arm-tdep.c, * auto-load.c, * coff-pe-read.c, * coffread.c, * corelow.c, * dbxread.c, * dicos-tdep.c, * dwarf2-frame.c, * dwarf2read.c, * elfread.c, * exec.c, * fbsd-tdep.c, * gcore.c, * gdb_bfd.c, * gdb_bfd.h, * hppa-tdep.c, * i386-cygwin-tdep.c, * i386-fbsd-tdep.c, * i386-linux-tdep.c, * jit.c, * linux-tdep.c, * machoread.c, * maint.c, * mdebugread.c, * minidebug.c, * mips-linux-tdep.c, * mips-sde-tdep.c, * mips-tdep.c, * mipsread.c, * nto-tdep.c, * objfiles.c, * objfiles.h, * osabi.c, * ppc-linux-tdep.c, * ppc64-tdep.c, * record-btrace.c, * record-full.c, * remote.c, * rs6000-aix-tdep.c, * rs6000-tdep.c, * s390-linux-tdep.c, * s390-tdep.c, * solib-aix.c, * solib-dsbt.c, * solib-frv.c, * solib-spu.c, * solib-svr4.c, * solib-target.c, * spu-linux-nat.c, * spu-tdep.c, * symfile-mem.c, * symfile.c, * symmisc.c, * symtab.c, * target.c, * windows-nat.c, * xcoffread.c, * cli/cli-dump.c, * compile/compile-object-load.c, * mi/mi-interp.c: Update throughout for bfd section macro and function changes. * gcore (gcore_create_callback): Use bfd_set_section_lma. * spu-tdep.c (spu_overlay_new_objfile): Likewise. gprof/ * corefile.c, * symtab.c: Update throughout for bfd section macro and function changes. ld/ * ldcref.c, * ldctor.c, * ldelf.c, * ldlang.c, * pe-dll.c, * emultempl/aarch64elf.em, * emultempl/aix.em, * emultempl/armcoff.em, * emultempl/armelf.em, * emultempl/cr16elf.em, * emultempl/cskyelf.em, * emultempl/m68hc1xelf.em, * emultempl/m68kelf.em, * emultempl/mipself.em, * emultempl/mmix-elfnmmo.em, * emultempl/mmo.em, * emultempl/msp430.em, * emultempl/nios2elf.em, * emultempl/pe.em, * emultempl/pep.em, * emultempl/ppc64elf.em, * emultempl/xtensaelf.em: Update throughout for bfd section macro and function changes. libctf/ * ctf-open-bfd.c: Update throughout for bfd section macro changes. opcodes/ * arc-ext.c: Update throughout for bfd section macro changes. sim/ * common/sim-load.c, * common/sim-utils.c, * cris/sim-if.c, * erc32/func.c, * lm32/sim-if.c, * m32c/load.c, * m32c/trace.c, * m68hc11/interp.c, * ppc/hw_htab.c, * ppc/hw_init.c, * rl78/load.c, * rl78/trace.c, * rx/gdb-if.c, * rx/load.c, * rx/trace.c: Update throughout for bfd section macro changes.
2019-09-16 12:55:17 +02:00
switch (bfd_section_size (section))
{
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
case s390_sizeof_gregset:
if (high_gprs)
return (gs ? tdesc_s390_gs_linux64 :
te && vx ? tdesc_s390_tevx_linux64 :
vx ? tdesc_s390_vx_linux64 :
te ? tdesc_s390_te_linux64 :
v2 ? tdesc_s390_linux64v2 :
v1 ? tdesc_s390_linux64v1 : tdesc_s390_linux64);
else
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
return (v2 ? tdesc_s390_linux32v2 :
v1 ? tdesc_s390_linux32v1 : tdesc_s390_linux32);
S390: Add vector register support to gdb Recognize S/390 targets with the new vector feature and present their vector registers appropriately: as 32 new 128-bit wide registers v0-v31, where the first 16 embed the floating point registers f0-f15. Each of the full registers v0-v15 is modelled as a pseudo register. gdb/ChangeLog: * s390-linux-nat.c (have_regset_vxrs): New static variable. (s390_linux_fetch_inferior_registers): Handle vector registers, if present. (s390_linux_store_inferior_registers): Likewise. (s390_get_hwcap): Remove function. Embed its logic... (s390_read_description): ...here. Yield a target description with vector registers if applicable. * s390-linux-tdep.c: Include "features/s390-vx-linux64.c", "features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and "features/s390x-tevx-linux64.c". (struct gdbarch_tdep) <v0_full_regnum>: New field. (s390_dwarf_regmap): Add vector registers. Remove bogus entries for "GNU/Linux-specific registers". (s390_dwarf_reg_r0l): New enum value. (s390_dwarf_reg_to_regnum): Support vector registers. (s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers of GPR lower halves. (regnum_is_vxr_full): New function. (s390_register_name): New function. (s390_pseudo_register_name): Handle v0-v15, which are composed of f0-f15 and v0l-v15l. (s390_pseudo_register_type): Likewise. (s390_pseudo_register_read): Likewise. (s390_pseudo_register_write): Likewise. (s390_value_from_register): Account for the fact that values are placed left-justified in vector registers. (s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to the vector reggroup and omit them from the general reggroup. (s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps. (s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets. (s390_iterate_over_regset_sections): Add iterations for the two new vector regsets. (s390_core_read_description): Yield a target description with vector registers if applicable. (s390_gdbarch_init): Handle target descriptions with vector registers. Add "register_name" gdbarch method. (_initialize_s390_tdep): Call new tdesc initialization functions. * s390-linux-tdep.h (HWCAP_S390_VX): New macro. (S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM) (S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM) (S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM) (S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM) (S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM) (S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM) (S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM) (S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM) (S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM) (S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM) (S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM) (S390_V30_REGNUM, S390_V31_REGNUM): New macros. (S390_NUM_REGS): Adjust value. (s390_vxrs_low_regset, s390_vxrs_high_regset): Declare. (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64) (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise. * NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
case s390x_sizeof_gregset:
return (gs ? tdesc_s390x_gs_linux64 :
te && vx ? tdesc_s390x_tevx_linux64 :
vx ? tdesc_s390x_vx_linux64 :
te ? tdesc_s390x_te_linux64 :
v2 ? tdesc_s390x_linux64v2 :
v1 ? tdesc_s390x_linux64v1 : tdesc_s390x_linux64);
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
default:
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
return NULL;
}
}
/* Frame unwinding. */
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
/* Signal trampoline stack frames. */
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
struct s390_sigtramp_unwind_cache {
CORE_ADDR frame_base;
struct trad_frame_saved_reg *saved_regs;
};
/* Unwind THIS_FRAME and return the corresponding unwind cache for
s390_sigtramp_frame_unwind. */
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
static struct s390_sigtramp_unwind_cache *
s390_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
void **this_prologue_cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
int word_size = gdbarch_ptr_bit (gdbarch) / 8;
* defs.h (extract_signed_integer, extract_unsigned_integer, extract_long_unsigned_integer, store_signed_integer, store_unsigned_integer): Add BYTE_ORDER parameter. * findvar.c (extract_signed_integer, extract_unsigned_integer, extract_long_unsigned_integer, store_signed_integer, store_unsigned_integer): Add BYTE_ORDER parameter. Use it instead of current_gdbarch. * gdbcore.h (read_memory_integer, safe_read_memory_integer, read_memory_unsigned_integer, write_memory_signed_integer, write_memory_unsigned_integer): Add BYTE_ORDER parameter. * corefile.c (struct captured_read_memory_integer_arguments): Add BYTE_ORDER member. (safe_read_memory_integer): Add BYTE_ORDER parameter. Store it into struct captured_read_memory_integer_arguments. (do_captured_read_memory_integer): Pass it to read_memory_integer. (read_memory_integer): Add BYTE_ORDER parameter. Pass it to extract_signed_integer. (read_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it to extract_unsigned_integer. (write_memory_signed_integer): Add BYTE_ORDER parameter. Pass it to store_signed_integer. (write_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it to store_unsigned_integer. * target.h (get_target_memory_unsigned): Add BYTE_ORDER parameter. * target.c (get_target_memory_unsigned): Add BYTE_ORDER parameter. Pass it to extract_unsigned_integer. Update calls to extract_signed_integer, extract_unsigned_integer, extract_long_unsigned_integer, store_signed_integer, store_unsigned_integer, read_memory_integer, read_memory_unsigned_integer, safe_read_memory_integer, write_memory_signed_integer, write_memory_unsigned_integer, and get_target_memory_unsigned to pass byte order: * ada-lang.c (ada_value_binop): Update. * ada-valprint.c (char_at): Update. * alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Update. * alpha-tdep.c (alpha_lds, alpha_sts, alpha_push_dummy_call, alpha_extract_return_value, alpha_read_insn, alpha_get_longjmp_target): Update. * amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Update. * amd64obsd-tdep.c (amd64obsd_supply_uthread, amd64obsd_collect_uthread, amd64obsd_trapframe_cache): Update. * amd64-tdep.c (amd64_push_dummy_call, amd64_analyze_prologue, amd64_frame_cache, amd64_sigtramp_frame_cache, fixup_riprel, amd64_displaced_step_fixup): Update. * arm-linux-tdep.c (arm_linux_sigreturn_init, arm_linux_rt_sigreturn_init, arm_linux_supply_gregset): Update. * arm-tdep.c (thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue, arm_push_dummy_call, thumb_get_next_pc, arm_get_next_pc, arm_extract_return_value, arm_store_return_value, arm_return_value): Update. * arm-wince-tdep.c (arm_pe_skip_trampoline_code): Update. * auxv.c (default_auxv_parse): Update. * avr-tdep.c (avr_address_to_pointer, avr_pointer_to_address, avr_scan_prologue, avr_extract_return_value, avr_frame_prev_register, avr_push_dummy_call): Update. * bsd-uthread.c (bsd_uthread_check_magic, bsd_uthread_lookup_offset, bsd_uthread_wait, bsd_uthread_thread_alive, bsd_uthread_extra_thread_info): Update. * c-lang.c (c_printstr, print_wchar): Update. * cp-valprint.c (cp_print_class_member): Update. * cris-tdep.c (cris_sigcontext_addr, cris_sigtramp_frame_unwind_cache, cris_push_dummy_call, cris_scan_prologue, cris_store_return_value, cris_extract_return_value, find_step_target, dip_prefix, sixteen_bit_offset_branch_op, none_reg_mode_jump_op, move_mem_to_reg_movem_op, get_data_from_address): Update. * dwarf2expr.c (dwarf2_read_address, execute_stack_op): Update. * dwarf2-frame.c (execute_cfa_program): Update. * dwarf2loc.c (find_location_expression): Update. * dwarf2read.c (dwarf2_const_value): Update. * expprint.c (print_subexp_standard): Update. * findvar.c (unsigned_pointer_to_address, signed_pointer_to_address, unsigned_address_to_pointer, address_to_signed_pointer, read_var_value): Update. * frame.c (frame_unwind_register_signed, frame_unwind_register_unsigned, get_frame_memory_signed, get_frame_memory_unsigned): Update. * frame-unwind.c (frame_unwind_got_constant): Update. * frv-linux-tdep.c (frv_linux_pc_in_sigtramp, frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache): Update. * frv-tdep.c (frv_analyze_prologue, frv_skip_main_prologue, frv_extract_return_value, find_func_descr, frv_convert_from_func_ptr_addr, frv_push_dummy_call): Update. * f-valprint.c (f_val_print): Update. * gnu-v3-abi.c (gnuv3_decode_method_ptr, gnuv3_make_method_ptr): Update. * h8300-tdep.c (h8300_is_argument_spill, h8300_analyze_prologue, h8300_push_dummy_call, h8300_extract_return_value, h8300h_extract_return_value, h8300_store_return_value, h8300h_store_return_value): Update. * hppabsd-tdep.c (hppabsd_find_global_pointer): Update. * hppa-hpux-nat.c (hppa_hpux_fetch_register, hppa_hpux_store_register): Update. * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline, hppa64_hpux_in_solib_call_trampoline, hppa_hpux_in_solib_return_trampoline, hppa_hpux_skip_trampoline_code, hppa_hpux_sigtramp_frame_unwind_cache, hppa_hpux_sigtramp_unwind_sniffer, hppa32_hpux_find_global_pointer, hppa64_hpux_find_global_pointer, hppa_hpux_search_pattern, hppa32_hpux_search_dummy_call_sequence, hppa64_hpux_search_dummy_call_sequence, hppa_hpux_supply_save_state, hppa_hpux_unwind_adjust_stub): Update. * hppa-linux-tdep.c (insns_match_pattern, hppa_linux_find_global_pointer): Update. * hppa-tdep.c (hppa_in_function_epilogue_p, hppa32_push_dummy_call, hppa64_convert_code_addr_to_fptr, hppa64_push_dummy_call, skip_prologue_hard_way, hppa_frame_cache, hppa_fallback_frame_cache, hppa_pseudo_register_read, hppa_frame_prev_register_helper, hppa_match_insns): Update. * hpux-thread.c (hpux_thread_fetch_registers): Update. * i386-tdep.c (i386bsd_sigcontext_addr): Update. * i386-cygwin-tdep.c (core_process_module_section): Update. * i386-darwin-nat.c (i386_darwin_sstep_at_sigreturn, amd64_darwin_sstep_at_sigreturn): Update. * i386-darwin-tdep.c (i386_darwin_sigcontext_addr, amd64_darwin_sigcontext_addr): Likewise. * i386-linux-nat.c (i386_linux_sigcontext_addr): Update. * i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Update. * i386-nto-tdep.c (i386nto_sigcontext_addr): Update. * i386obsd-nat.c (i386obsd_supply_pcb): Update. * i386obsd-tdep.c (i386obsd_supply_uthread, i386obsd_collect_uthread, i386obsd_trapframe_cache): Update. * i386-tdep.c (i386_displaced_step_fixup, i386_follow_jump, i386_analyze_frame_setup, i386_analyze_prologue, i386_skip_main_prologue, i386_frame_cache, i386_sigtramp_frame_cache, i386_get_longjmp_target, i386_push_dummy_call, i386_pe_skip_trampoline_code, i386_svr4_sigcontext_addr, i386_fetch_pointer_argument): Update. * i387-tdep.c (i387_supply_fsave): Update. * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Update. * ia64-tdep.c (ia64_pseudo_register_read, ia64_pseudo_register_write, examine_prologue, ia64_frame_cache, ia64_frame_prev_register, ia64_sigtramp_frame_cache, ia64_sigtramp_frame_prev_register, ia64_access_reg, ia64_access_rse_reg, ia64_libunwind_frame_this_id, ia64_libunwind_frame_prev_register, ia64_libunwind_sigtramp_frame_this_id, ia64_libunwind_sigtramp_frame_prev_register, ia64_find_global_pointer, find_extant_func_descr, find_func_descr, ia64_convert_from_func_ptr_addr, ia64_push_dummy_call, ia64_dummy_id, ia64_unwind_pc): Update. * iq2000-tdep.c (iq2000_pointer_to_address, iq2000_address_to_pointer, iq2000_scan_prologue, iq2000_extract_return_value, iq2000_push_dummy_call): Update. * irix5nat.c (fill_gregset): Update. * jv-lang.c (evaluate_subexp_java): Update. * jv-valprint.c (java_value_print): Update. * lm32-tdep.c (lm32_analyze_prologue, lm32_push_dummy_call, lm32_extract_return_value, lm32_store_return_value): Update. * m32c-tdep.c (m32c_push_dummy_call, m32c_return_value, m32c_skip_trampoline_code, m32c_m16c_address_to_pointer, m32c_m16c_pointer_to_address): Update. * m32r-tdep.c (m32r_store_return_value, decode_prologue, m32r_skip_prologue, m32r_push_dummy_call, m32r_extract_return_value): Update. * m68hc11-tdep.c (m68hc11_pseudo_register_read, m68hc11_pseudo_register_write, m68hc11_analyze_instruction, m68hc11_push_dummy_call): Update. * m68linux-tdep.c (m68k_linux_pc_in_sigtramp, m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache): Update. * m68k-tdep.c (m68k_push_dummy_call, m68k_analyze_frame_setup, m68k_analyze_register_saves, m68k_analyze_prologue, m68k_frame_cache, m68k_get_longjmp_target): Update. * m88k-tdep.c (m88k_fetch_instruction): Update. * mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_csr_write, mep_pseudo_cr32_write, mep_get_insn, mep_push_dummy_call): Update. * mi/mi-main.c (mi_cmd_data_write_memory): Update. * mips-linux-tdep.c (mips_linux_get_longjmp_target, supply_32bit_reg, mips64_linux_get_longjmp_target, mips64_fill_gregset, mips64_fill_fpregset, mips_linux_in_dynsym_stub): Update. * mipsnbdsd-tdep.c (mipsnbsd_get_longjmp_target): Update. * mips-tdep.c (mips_fetch_instruction, fetch_mips_16, mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call, mips_o32_push_dummy_call, mips_o64_push_dummy_call, mips_single_step_through_delay, mips_skip_pic_trampoline_code, mips_integer_to_address): Update. * mn10300-tdep.c (mn10300_analyze_prologue, mn10300_push_dummy_call): Update. * monitor.c (monitor_supply_register, monitor_write_memory, monitor_read_memory_single): Update. * moxie-tdep.c (moxie_store_return_value, moxie_extract_return_value, moxie_analyze_prologue): Update. * mt-tdep.c (mt_return_value, mt_skip_prologue, mt_select_coprocessor, mt_pseudo_register_read, mt_pseudo_register_write, mt_registers_info, mt_push_dummy_call): Update. * objc-lang.c (read_objc_method, read_objc_methlist_nmethods, read_objc_methlist_method, read_objc_object, read_objc_super, read_objc_class, find_implementation_from_class): Update. * ppc64-linux-tdep.c (ppc64_desc_entry_point, ppc64_linux_convert_from_func_ptr_addr, ppc_linux_sigtramp_cache): Update. * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_sniffer, ppcobsd_sigtramp_frame_cache): Update. * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call, do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call, ppc64_sysv_abi_return_value): Update. * ppc-linux-nat.c (ppc_linux_auxv_parse): Update. * procfs.c (procfs_auxv_parse): Update. * p-valprint.c (pascal_val_print): Update. * regcache.c (regcache_raw_read_signed, regcache_raw_read_unsigned, regcache_raw_write_signed, regcache_raw_write_unsigned, regcache_cooked_read_signed, regcache_cooked_read_unsigned, regcache_cooked_write_signed, regcache_cooked_write_unsigned): Update. * remote-m32r-sdi.c (m32r_fetch_register): Update. * remote-mips.c (mips_wait, mips_fetch_registers, mips_xfer_memory): Update. * rs6000-aix-tdep.c (rs6000_push_dummy_call, rs6000_return_value, rs6000_convert_from_func_ptr_addr, branch_dest, rs6000_software_single_step): Update. * rs6000-tdep.c (rs6000_in_function_epilogue_p, ppc_displaced_step_fixup, ppc_deal_with_atomic_sequence, bl_to_blrl_insn_p, rs6000_fetch_instruction, skip_prologue, rs6000_skip_main_prologue, rs6000_skip_trampoline_code, rs6000_frame_cache): Update. * s390-tdep.c (s390_pseudo_register_read, s390_pseudo_register_write, s390x_pseudo_register_read, s390x_pseudo_register_write, s390_load, s390_backchain_frame_unwind_cache, s390_sigtramp_frame_unwind_cache, extend_simple_arg, s390_push_dummy_call, s390_return_value): Update. * scm-exp.c (scm_lreadr): Update. * scm-lang.c (scm_get_field, scm_unpack): Update. * scm-valprint.c (scm_val_print): Update. * score-tdep.c (score_breakpoint_from_pc, score_push_dummy_call, score_fetch_inst): Update. * sh64-tdep.c (look_for_args_moves, sh64_skip_prologue_hard_way, sh64_analyze_prologue, sh64_push_dummy_call, sh64_extract_return_value, sh64_pseudo_register_read, sh64_pseudo_register_write, sh64_frame_prev_register): Update: * sh-tdep.c (sh_analyze_prologue, sh_push_dummy_call_fpu, sh_push_dummy_call_nofpu, sh_extract_return_value_nofpu, sh_store_return_value_nofpu, sh_in_function_epilogue_p): Update. * solib-darwin.c (darwin_load_image_infos): Update. * solib-frv.c (fetch_loadmap, lm_base, frv_current_sos, enable_break2, find_canonical_descriptor_in_load_object): Update. * solib-irix.c (extract_mips_address, fetch_lm_info, irix_current_sos, irix_open_symbol_file_object): Update. * solib-som.c (som_solib_create_inferior_hook, link_map_start, som_current_sos, som_open_symbol_file_object): Update. * solib-sunos.c (SOLIB_EXTRACT_ADDRESS, LM_ADDR, LM_NEXT, LM_NAME): Update. * solib-svr4.c (read_program_header, scan_dyntag_auxv, solib_svr4_r_ldsomap): Update. * sparc64-linux-tdep.c (sparc64_linux_step_trap): Update. * sparc64obsd-tdep.c (sparc64obsd_supply_uthread, sparc64obsd_collect_uthread): Update. * sparc64-tdep.c (sparc64_pseudo_register_read, sparc64_pseudo_register_write, sparc64_supply_gregset, sparc64_collect_gregset): Update. * sparc-linux-tdep.c (sparc32_linux_step_trap): Update. * sparcobsd-tdep.c (sparc32obsd_supply_uthread, sparc32obsd_collect_uthread): Update. * sparc-tdep.c (sparc_fetch_wcookie, sparc32_push_dummy_code, sparc32_store_arguments, sparc32_return_value, sparc_supply_rwindow, sparc_collect_rwindow): Update. * spu-linux-nat.c (parse_spufs_run): Update. * spu-tdep.c (spu_pseudo_register_read_spu, spu_pseudo_register_write_spu, spu_pointer_to_address, spu_analyze_prologue, spu_in_function_epilogue_p, spu_frame_unwind_cache, spu_push_dummy_call, spu_software_single_step, spu_get_longjmp_target, spu_get_overlay_table, spu_overlay_update_osect, info_spu_signal_command, info_spu_mailbox_list, info_spu_dma_cmdlist, info_spu_dma_command, info_spu_proxydma_command): Update. * stack.c (print_frame_nameless_args, frame_info): Update. * symfile.c (read_target_long_array, simple_read_overlay_table, simple_read_overlay_region_table): Update. * target.c (debug_print_register): Update. * tramp-frame.c (tramp_frame_start): Update. * v850-tdep.c (v850_analyze_prologue, v850_push_dummy_call, v850_extract_return_value, v850_store_return_value, * valarith.c (value_binop, value_bit_index): Update. * valops.c (value_cast): Update. * valprint.c (val_print_type_code_int, val_print_string, read_string): Update. * value.c (unpack_long, unpack_double, unpack_field_as_long, modify_field, pack_long): Update. * vax-tdep.c (vax_store_arguments, vax_push_dummy_call, vax_skip_prologue): Update. * xstormy16-tdep.c (xstormy16_push_dummy_call, xstormy16_analyze_prologue, xstormy16_in_function_epilogue_p, xstormy16_resolve_jmp_table_entry, xstormy16_find_jmp_table_entry, xstormy16_pointer_to_address, xstormy16_address_to_pointer): Update. * xtensa-tdep.c (extract_call_winsize, xtensa_pseudo_register_read, xtensa_pseudo_register_write, xtensa_frame_cache, xtensa_push_dummy_call, call0_track_op, call0_frame_cache): Update. * dfp.h (decimal_to_string, decimal_from_string, decimal_from_integral, decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter. (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT parameters. (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters. (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters. * dfp.c (match_endianness): Add BYTE_ORDER parameter. Use it instead of current_gdbarch. (decimal_to_string, decimal_from_integral, decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter. Pass it to match_endianness. (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT parameters. Pass them to match_endianness. (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters. Pass them to match_endianness. (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters. Pass them to match_endianness. * valarith.c (value_args_as_decimal): Add BYTE_ORDER_X and BYTE_ORDER_Y output parameters. (value_binop): Update call to value_args_as_decimal. Update calls to decimal_to_string, decimal_from_string, decimal_from_integral, decimal_from_floating, decimal_to_doublest, decimal_is_zero, decimal_binop, decimal_compare and decimal_convert to pass/receive byte order: * c-exp.y (parse_number): Update. * printcmd.c (printf_command): Update. * valarith.c (value_args_as_decimal, value_binop, value_logical_not, value_equal, value_less): Update. * valops.c (value_cast, value_one): Update. * valprint.c (print_decimal_floating): Update. * value.c (unpack_long, unpack_double): Update. * python/python-value.c (valpy_nonzero): Update. * ada-valprint.c (char_at): Add BYTE_ORDER parameter. (printstr): Update calls to char_at. (ada_val_print_array): Likewise. * valprint.c (read_string): Add BYTE_ORDER parameter. (val_print_string): Update call to read_string. * c-lang.c (c_get_string): Likewise. * charset.h (target_wide_charset): Add BYTE_ORDER parameter. * charset.c (target_wide_charset): Add BYTE_ORDER parameter. Use it instead of current_gdbarch. * printcmd.c (printf_command): Update calls to target_wide_charset. * c-lang.c (charset_for_string_type): Add BYTE_ORDER parameter. Pass to target_wide_charset. Use it instead of current_gdbarch. (classify_type): Add BYTE_ORDER parameter. Pass to charset_for_string_type. Allow NULL encoding pointer. (print_wchar): Add BYTE_ORDER parameter. (c_emit_char): Update calls to classify_type and print_wchar. (c_printchar, c_printstr): Likewise. * gdbarch.sh (in_solib_return_trampoline): Convert to type "m". * gdbarch.c, gdbarch.h: Regenerate. * arch-utils.h (generic_in_solib_return_trampoline): Add GDBARCH parameter. * arch-utils.c (generic_in_solib_return_trampoline): Likewise. * hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Likewise. * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise. (rs6000_skip_trampoline_code): Update call. * alpha-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to dynamic_sigtramp_offset and pc_in_sigtramp callbacks. (alpha_read_insn): Add GDBARCH parameter. * alpha-tdep.c (alpha_lds, alpha_sts): Add GDBARCH parameter. (alpha_register_to_value): Pass architecture to alpha_sts. (alpha_extract_return_value): Likewise. (alpha_value_to_register): Pass architecture to alpha_lds. (alpha_store_return_value): Likewise. (alpha_read_insn): Add GDBARCH parameter. (alpha_skip_prologue): Pass architecture to alpha_read_insn. (alpha_heuristic_proc_start): Likewise. (alpha_heuristic_frame_unwind_cache): Likewise. (alpha_next_pc): Likewise. (alpha_sigtramp_frame_this_id): Pass architecture to tdep->dynamic_sigtramp_offset callback. (alpha_sigtramp_frame_sniffer): Pass architecture to tdep->pc_in_sigtramp callback. * alphafbsd-tdep.c (alphafbsd_pc_in_sigtramp): Add GDBARCH parameter. (alphafbsd_sigtramp_offset): Likewise. * alpha-linux-tdep.c (alpha_linux_sigtramp_offset_1): Add GDBARCH parameter. Pass to alpha_read_insn. (alpha_linux_sigtramp_offset): Add GDBARCH parameter. Pass to alpha_linux_sigtramp_offset_1. (alpha_linux_pc_in_sigtramp): Add GDBARCH parameter. Pass to alpha_linux_sigtramp_offset. (alpha_linux_sigcontext_addr): Pass architecture to alpha_read_insn and alpha_linux_sigtramp_offset. * alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Add GDBARCH parameter. (alphanbsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to alphanbsd_sigtramp_offset. * alphaobsd-tdep.c (alphaobsd_sigtramp_offset): Add GDBARCH parameter. (alphaobsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to alpha_read_insn. (alphaobsd_sigcontext_addr): Pass architecture to alphaobsd_sigtramp_offset. * alpha-osf1-tdep.c (alpha_osf1_pc_in_sigtramp): Add GDBARCH parameter. * amd64-tdep.c (amd64_analyze_prologue): Add GDBARCH parameter. (amd64_skip_prologue): Pass architecture to amd64_analyze_prologue. (amd64_frame_cache): Likewise. * arm-tdep.c (SWAP_SHORT, SWAP_INT): Remove. (thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue, thumb_get_next_pc, arm_get_next_pc): Do not use SWAP_ macros. * arm-wince-tdep.c: Include "frame.h". * avr-tdep.c (EXTRACT_INSN): Remove. (avr_scan_prologue): Add GDBARCH argument, inline EXTRACT_INSN. (avr_skip_prologue): Pass architecture to avr_scan_prologue. (avr_frame_unwind_cache): Likewise. * cris-tdep.c (struct instruction_environment): Add BYTE_ORDER member. (find_step_target): Initialize it. (get_data_from_address): Add BYTE_ORDER parameter. (bdap_prefix): Pass byte order to get_data_from_address. (handle_prefix_assign_mode_for_aritm_op): Likewise. (three_operand_add_sub_cmp_and_or_op): Likewise. (handle_inc_and_index_mode_for_aritm_op): Likewise. * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Add GDBARCH parameter. (frv_linux_sigcontext_reg_addr): Pass architecture to frv_linux_pc_in_sigtramp. (frv_linux_sigtramp_frame_sniffer): Likewise. * h8300-tdep.c (h8300_is_argument_spill): Add GDBARCH parameter. (h8300_analyze_prologue): Add GDBARCH parameter. Pass to h8300_is_argument_spill. (h8300_frame_cache, h8300_skip_prologue): Pass architecture to h8300_analyze_prologue. * hppa-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to in_solib_call_trampoline callback. (hppa_in_solib_call_trampoline): Add GDBARCH parameter. * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Add GDBARCH parameter. (hppa64_push_dummy_call): Pass architecture to hppa64_convert_code_addr_to_fptr. (hppa_match_insns): Add GDBARCH parameter. (hppa_match_insns_relaxed): Add GDBARCH parameter. Pass to hppa_match_insns. (hppa_skip_trampoline_code): Pass architecture to hppa_match_insns. (hppa_in_solib_call_trampoline): Add GDBARCH parameter. Pass to hppa_match_insns_relaxed. (hppa_stub_unwind_sniffer): Pass architecture to tdep->in_solib_call_trampoline callback. * hppa-hpux-tdep.c (hppa_hpux_search_pattern): Add GDBARCH parameter. (hppa32_hpux_search_dummy_call_sequence): Pass architecture to hppa_hpux_search_pattern. * hppa-linux-tdep.c (insns_match_pattern): Add GDBARCH parameter. (hppa_linux_sigtramp_find_sigcontext): Add GDBARCH parameter. Pass to insns_match_pattern. (hppa_linux_sigtramp_frame_unwind_cache): Pass architecture to hppa_linux_sigtramp_find_sigcontext. (hppa_linux_sigtramp_frame_sniffer): Likewise. (hppa32_hpux_in_solib_call_trampoline): Add GDBARCH parameter. (hppa64_hpux_in_solib_call_trampoline): Likewise. * i386-tdep.c (i386_follow_jump): Add GDBARCH parameter. (i386_analyze_frame_setup): Add GDBARCH parameter. (i386_analyze_prologue): Add GDBARCH parameter. Pass to i386_follow_jump and i386_analyze_frame_setup. (i386_skip_prologue): Pass architecture to i386_analyze_prologue and i386_follow_jump. (i386_frame_cache): Pass architecture to i386_analyze_prologue. (i386_pe_skip_trampoline_code): Add FRAME parameter. * i386-tdep.h (i386_pe_skip_trampoline_code): Add FRAME parameter. * i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): Pass frame to i386_pe_skip_trampoline_code. * ia64-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to sigcontext_register_address callback. * ia64-tdep.c (ia64_find_global_pointer): Add GDBARCH parameter. (ia64_find_unwind_table): Pass architecture to ia64_find_global_pointer. (find_extant_func_descr): Add GDBARCH parameter. (find_func_descr): Pass architecture to find_extant_func_descr and ia64_find_global_pointer. (ia64_sigtramp_frame_init_saved_regs): Pass architecture to tdep->sigcontext_register_address callback. * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Add GDBARCH parameter. * iq2000-tdep.c (iq2000_scan_prologue): Add GDBARCH parameter. (iq2000_frame_cache): Pass architecture to iq2000_scan_prologue. * lm32-tdep.c (lm32_analyze_prologue): Add GDBARCH parameter. (lm32_skip_prologue, lm32_frame_cache): Pass architecture to lm32_analyze_prologue. * m32r-tdep.c (decode_prologue): Add GDBARCH parameter. (m32r_skip_prologue): Pass architecture to decode_prologue. * m68hc11-tdep.c (m68hc11_analyze_instruction): Add GDBARCH parameter. (m68hc11_scan_prologue): Pass architecture to m68hc11_analyze_instruction. * m68k-tdep.c (m68k_analyze_frame_setup): Add GDBARCH parameter. (m68k_analyze_prologue): Pass architecture to m68k_analyze_frame_setup. * m88k-tdep.c (m88k_fetch_instruction): Add BYTE_ORDER parameter. (m88k_analyze_prologue): Add GDBARCH parameter. Pass byte order to m88k_fetch_instruction. (m88k_skip_prologue): Pass architecture to m88k_analyze_prologue. (m88k_frame_cache): Likewise. * mep-tdep.c (mep_get_insn): Add GDBARCH parameter. (mep_analyze_prologue): Pass architecture to mep_get_insn. * mips-tdep.c (mips_fetch_instruction): Add GDBARCH parameter. (mips32_next_pc): Pass architecture to mips_fetch_instruction. (deal_with_atomic_sequence): Likewise. (unpack_mips16): Add GDBARCH parameter, pass to mips_fetch_instruction. (mips16_scan_prologue): Likewise. (mips32_scan_prologue): Likewise. (mips16_in_function_epilogue_p): Likewise. (mips32_in_function_epilogue_p): Likewise. (mips_about_to_return): Likewise. (mips_insn16_frame_cache): Pass architecture to mips16_scan_prologue. (mips_insn32_frame_cache): Pass architecture to mips32_scan_prologue. (mips_skip_prologue): Pass architecture to mips16_scan_prologue and mips32_scan_prologue. (mips_in_function_epilogue_p): Pass architecture to mips16_in_function_epilogue_p and mips32_in_function_epilogue_p. (heuristic_proc_start): Pass architecture to mips_fetch_instruction and mips_about_to_return. (mips_skip_mips16_trampoline_code): Pass architecture to mips_fetch_instruction. (fetch_mips_16): Add GDBARCH parameter. (mips16_next_pc): Pass architecture to fetch_mips_16. (extended_mips16_next_pc): Pass architecture to unpack_mips16 and fetch_mips_16. * objc-lang.c (read_objc_method, read_objc_methlist_nmethods, read_objc_methlist_method, read_objc_object, read_objc_super, read_objc_class): Add GDBARCH parameter. (find_implementation_from_class): Add GDBARCH parameter, pass to read_objc_class, read_objc_methlist_nmethods, and read_objc_methlist_method. (find_implementation): Add GDBARCH parameter, pass to read_objc_object and find_implementation_from_class. (resolve_msgsend, resolve_msgsend_stret): Pass architecture to find_implementation. (resolve_msgsend_super, resolve_msgsend_super_stret): Pass architecture to read_objc_super and find_implementation_from_class. * ppc64-linux-tdep.c (ppc64_desc_entry_point): Add GDBARCH parameter. (ppc64_standard_linkage1_target, ppc64_standard_linkage2_target, ppc64_standard_linkage3_target): Pass architecture to ppc64_desc_entry_point. * rs6000-tdep.c (bl_to_blrl_insn_p): Add BYTE_ORDER parameter. (skip_prologue): Pass byte order to bl_to_blrl_insn_p. (rs6000_fetch_instruction): Add GDBARCH parameter. (rs6000_skip_stack_check): Add GDBARCH parameter, pass to rs6000_fetch_instruction. (skip_prologue): Pass architecture to rs6000_fetch_instruction. * remote-mips.c (mips_store_word): Return old_contents as host integer value instead of target bytes. * s390-tdep.c (struct s390_prologue_data): Add BYTE_ORDER member. (s390_analyze_prologue): Initialize it. (extend_simple_arg): Add GDBARCH parameter. (s390_push_dummy_call): Pass architecture to extend_simple_arg. * scm-lang.c (scm_get_field): Add BYTE_ORDER parameter. * scm-lang.h (scm_get_field): Add BYTE_ORDER parameter. (SCM_CAR, SCM_CDR): Pass SCM_BYTE_ORDER to scm_get_field. * scm-valprint.c (scm_scmval_print): Likewise. (scm_scmlist_print, scm_ipruk, scm_scmval_print): Define SCM_BYTE_ORDER. * sh64-tdep.c (look_for_args_moves): Add GDBARCH parameter. (sh64_skip_prologue_hard_way): Add GDBARCH parameter, pass to look_for_args_moves. (sh64_skip_prologue): Pass architecture to sh64_skip_prologue_hard_way. * sh-tdep.c (sh_analyze_prologue): Add GDBARCH parameter. (sh_skip_prologue): Pass architecture to sh_analyze_prologue. (sh_frame_cache): Likewise. * solib-irix.c (extract_mips_address): Add GDBARCH parameter. (fetch_lm_info, irix_current_sos, irix_open_symbol_file_object): Pass architecture to extract_mips_address. * sparc-tdep.h (sparc_fetch_wcookie): Add GDBARCH parameter. * sparc-tdep.c (sparc_fetch_wcookie): Add GDBARCH parameter. (sparc_supply_rwindow, sparc_collect_rwindow): Pass architecture to sparc_fetch_wcookie. (sparc32_frame_prev_register): Likewise. * sparc64-tdep.c (sparc64_frame_prev_register): Likewise. * sparc32nbsd-tdep.c (sparc32nbsd_sigcontext_saved_regs): Likewise. * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Likewise. * spu-tdep.c (spu_analyze_prologue): Add GDBARCH parameter. (spu_skip_prologue): Pass architecture to spu_analyze_prologue. (spu_virtual_frame_pointer): Likewise. (spu_frame_unwind_cache): Likewise. (info_spu_mailbox_list): Add BYTE_ORER parameter. (info_spu_mailbox_command): Pass byte order to info_spu_mailbox_list. (info_spu_dma_cmdlist): Add BYTE_ORER parameter. (info_spu_dma_command, info_spu_proxydma_command): Pass byte order to info_spu_dma_cmdlist. * symfile.c (read_target_long_array): Add GDBARCH parameter. (simple_read_overlay_table, simple_read_overlay_region_table, simple_overlay_update_1): Pass architecture to read_target_long_array. * v850-tdep.c (v850_analyze_prologue): Add GDBARCH parameter. (v850_frame_cache): Pass architecture to v850_analyze_prologue. * xstormy16-tdep.c (xstormy16_analyze_prologue): Add GDBARCH parameter. (xstormy16_skip_prologue, xstormy16_frame_cache): Pass architecture to xstormy16_analyze_prologue. (xstormy16_resolve_jmp_table_entry): Add GDBARCH parameter. (xstormy16_find_jmp_table_entry): Likewise. (xstormy16_skip_trampoline_code): Pass architecture to xstormy16_resolve_jmp_table_entry. (xstormy16_pointer_to_address): Likewise. (xstormy16_address_to_pointer): Pass architecture to xstormy16_find_jmp_table_entry. * xtensa-tdep.c (call0_track_op): Add GDBARCH parameter. (call0_analyze_prologue): Add GDBARCH parameter, pass to call0_track_op. (call0_frame_cache): Pass architecture to call0_analyze_prologue. (xtensa_skip_prologue): Likewise.
2009-07-02 19:25:59 +02:00
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
struct s390_sigtramp_unwind_cache *info;
ULONGEST this_sp, prev_sp;
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
CORE_ADDR next_ra, next_cfa, sigreg_ptr, sigreg_high_off;
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
int i;
if (*this_prologue_cache)
Add some more casts (2/2) See previous patch's description. gdb/ChangeLog: * macrocmd.c (print_macro_callback): Add cast(s). * macrotab.c (macro_bcache_str): Likewise. (new_macro_definition): Likewise. * main.c (captured_main): Likewise. * maint.c (print_bfd_section_info): Likewise. * mdebugread.c (mdebug_build_psymtabs): Likewise. (basic_type): Likewise. * memattr.c (mem_region_cmp): Likewise. * memory-map.c (memory_map_start_memory): Likewise. (memory_map_end_memory): Likewise. (memory_map_start_property): Likewise. (memory_map_end_property): Likewise. (clear_result): Likewise. * memrange.c (compare_mem_ranges): Likewise. * mep-tdep.c (mep_analyze_frame_prologue): Likewise. * mi/mi-cmd-var.c (mi_cmd_var_update_iter): Likewise. * mi/mi-console.c (mi_console_file_delete): Likewise. (mi_console_file_fputs): Likewise. (mi_console_raw_packet): Likewise. (mi_console_file_flush): Likewise. (mi_console_set_raw): Likewise. * mi/mi-interp.c (mi_interpreter_resume): Likewise. (mi_new_thread): Likewise. (mi_thread_exit): Likewise. (mi_record_changed): Likewise. (mi_inferior_added): Likewise. (mi_inferior_appeared): Likewise. (mi_inferior_exit): Likewise. (mi_inferior_removed): Likewise. (mi_interp_data): Likewise. (mi_on_normal_stop): Likewise. (mi_traceframe_changed): Likewise. (mi_tsv_created): Likewise. (mi_tsv_deleted): Likewise. (mi_tsv_modified): Likewise. (mi_breakpoint_created): Likewise. (mi_breakpoint_deleted): Likewise. (mi_breakpoint_modified): Likewise. (mi_output_running_pid): Likewise. (mi_inferior_count): Likewise. (mi_solib_loaded): Likewise. (mi_solib_unloaded): Likewise. (mi_command_param_changed): Likewise. (mi_memory_changed): Likewise. (report_initial_inferior): Likewise. (mi_ui_out): Likewise. (mi_set_logging): Likewise. * mi/mi-main.c (collect_cores): Likewise. (print_one_inferior): Likewise. (free_vector_of_ints): Likewise. (free_splay_tree): Likewise. (mi_execute_command): Likewise. * mi/mi-out.c (mi_table_body): Likewise. (mi_table_end): Likewise. (mi_table_header): Likewise. (mi_begin): Likewise. (mi_end): Likewise. (mi_field_int): Likewise. (mi_field_string): Likewise. (mi_field_fmt): Likewise. (mi_flush): Likewise. (mi_redirect): Likewise. (field_separator): Likewise. (mi_open): Likewise. (mi_close): Likewise. (mi_out_buffered): Likewise. (mi_out_rewind): Likewise. (mi_out_put): Likewise. (mi_version): Likewise. (mi_out_data_dtor): Likewise. * mi/mi-parse.c (mi_parse_cleanup): Likewise. * microblaze-tdep.c (microblaze_frame_cache): Likewise. * minidebug.c (lzma_open): Likewise. (lzma_pread): Likewise. (lzma_close): Likewise. (lzma_stat): Likewise. * mips-linux-tdep.c (mips_linux_init_abi): Likewise. * mips-sde-tdep.c (mips_sde_frame_cache): Likewise. (mips_sde_elf_osabi_sniff_abi_tag_sections): Likewise. * mips-tdep.c (mips_insn16_frame_cache): Likewise. (mips_micro_frame_cache): Likewise. (mips_insn32_frame_cache): Likewise. (mips_stub_frame_cache): Likewise. (gdb_print_insn_mips): Likewise. (value_of_mips_user_reg): Likewise. (mips_gdbarch_init): Likewise. * mips64obsd-tdep.c (mips64obsd_supply_gregset): Likewise. * mipsnbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise. (mipsnbsd_supply_gregset): Likewise. * mn10300-linux-tdep.c (am33_supply_fpregset_method): Likewise. (am33_collect_gregset_method): Likewise. (am33_collect_fpregset_method): Likewise. * mn10300-tdep.c (mn10300_analyze_frame_prologue): Likewise. * moxie-tdep.c (moxie_frame_cache): Likewise. * msp430-tdep.c (msp430_get_opcode_byte): Likewise. (msp430_analyze_frame_prologue): Likewise. * mt-tdep.c (mt_frame_unwind_cache): Likewise. * nios2-linux-tdep.c (nios2_supply_gregset): Likewise. (nios2_collect_gregset): Likewise. * nios2-tdep.c (nios2_frame_unwind_cache): Likewise. (nios2_stub_frame_cache): Likewise. * objc-lang.c (find_methods): Likewise. * objfiles.c (objfiles_pspace_data_cleanup): Likewise. (get_objfile_pspace_data): Likewise. (get_objfile_bfd_data): Likewise. (objfile_bfd_data_free): Likewise. (add_to_objfile_sections): Likewise. (do_free_objfile_cleanup): Likewise. (resume_section_map_updates_cleanup): Likewise. * opencl-lang.c (builtin_opencl_type): Likewise. * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Likewise. * osdata.c (osdata_start_osdata): Likewise. (osdata_start_item): Likewise. (osdata_start_column): Likewise. (osdata_end_column): Likewise. (clear_parsing_data): Likewise. (osdata_free_cleanup): Likewise. * parse.c (type_stack_cleanup): Likewise. (exp_uses_objfile_iter): Likewise. * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise. (ppc_linux_collect_gregset): Likewise. (ppu2spu_prev_arch): Likewise. (ppu2spu_this_id): Likewise. (ppu2spu_prev_register): Likewise. (ppu2spu_unwind_register): Likewise. (ppu2spu_sniffer): Likewise. (ppu2spu_dealloc_cache): Likewise. (ppc_linux_init_abi): Likewise. * ppcfbsd-tdep.c (ppcfbsd_sigtramp_frame_cache): Likewise. * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_cache): Likewise. * progspace.c (restore_program_space): Likewise. * psymtab.c (find_pc_sect_psymtab): Likewise. (compare_psymbols): Likewise. (psymbol_bcache_full): Likewise. (allocate_psymtab): Likewise. (discard_psymtabs_upto): Likewise. * python/py-block.c (set_block): Likewise. (del_objfile_blocks): Likewise. * python/py-breakpoint.c (build_bp_list): Likewise. * python/py-inferior.c (inferior_to_inferior_object): Likewise. (build_inferior_list): Likewise. (py_free_inferior): Likewise. * python/py-objfile.c (py_free_objfile): Likewise. (objfile_to_objfile_object): Likewise. * python/py-prettyprint.c (py_restore_tstate): Likewise. * python/py-progspace.c (py_free_pspace): Likewise. (pspace_to_pspace_object): Likewise. * python/py-symbol.c (set_symbol): Likewise. (del_objfile_symbols): Likewise. * python/py-symtab.c (set_sal): Likewise. (set_symtab): Likewise. (del_objfile_symtab): Likewise. (del_objfile_sal): Likewise. * python/py-type.c (save_objfile_types): Likewise. (set_type): Likewise. * python/py-unwind.c (pyuw_prev_register): Likewise. (pyuw_on_new_gdbarch): Likewise. * python/py-utils.c (py_decref): Likewise. (py_xdecref): Likewise. (gdb_py_generic_dict): Likewise. * python/py-xmethods.c (gdbpy_free_xmethod_worker_data): Likewise. (gdbpy_clone_xmethod_worker_data): Likewise. (gdbpy_get_xmethod_arg_types): Likewise. (gdbpy_get_xmethod_result_type): Likewise. (gdbpy_invoke_xmethod): Likewise. * python/python.c (gdbpy_apply_type_printers): Likewise. (gdbpy_free_type_printers): Likewise. * record-btrace.c (record_btrace_disable_callback): Likewise. (bfcache_hash): Likewise. (bfcache_eq): Likewise. (btrace_get_frame_function): Likewise. (record_btrace_frame_unwind_stop_reason): Likewise. (record_btrace_frame_this_id): Likewise. (record_btrace_frame_prev_register): Likewise. (record_btrace_frame_dealloc_cache): Likewise. * record-full.c (record_full_message_wrapper): Likewise. (record_full_save_cleanups): Likewise. * regcache.c (regcache_descr): Likewise. (do_regcache_xfree): Likewise. (do_regcache_invalidate): Likewise. (do_cooked_read): Likewise. (regcache_transfer_regset): Likewise. * reggroups.c (reggroup_add): Likewise. (reggroup_next): Likewise. (reggroup_prev): Likewise. * remote-fileio.c (do_remote_fileio_request): Likewise. * remote-notif.c (remote_async_get_pending_events_handler): Likewise. (do_notif_event_xfree): Likewise. * remote.c (get_remote_arch_state): Likewise. (remote_pspace_data_cleanup): Likewise. (get_remote_exec_file): Likewise. (set_pspace_remote_exec_file): Likewise. (compare_pnums): Likewise. (clear_threads_listing_context): Likewise. (remote_newthread_step): Likewise. (start_thread): Likewise. (end_thread): Likewise. (remove_child_of_pending_fork): Likewise. (remove_stop_reply_for_inferior): Likewise. (remove_stop_reply_of_remote_state): Likewise. (remote_notif_remove_once_on_match): Likewise. (stop_reply_match_ptid_and_ws): Likewise. (kill_child_of_pending_fork): Likewise. (register_remote_g_packet_guess): Likewise. (remote_read_description_p): Likewise. (remote_read_description): Likewise. (free_actions_list_cleanup_wrapper): Likewise. (remote_async_serial_handler): Likewise. * rl78-tdep.c (rl78_get_opcode_byte): Likewise. (rl78_analyze_frame_prologue): Likewise. * rs6000-tdep.c (ppc_supply_gregset): Likewise. (ppc_supply_fpregset): Likewise. (ppc_supply_vsxregset): Likewise. (ppc_supply_vrregset): Likewise. (ppc_collect_gregset): Likewise. (ppc_collect_fpregset): Likewise. (ppc_collect_vsxregset): Likewise. (ppc_collect_vrregset): Likewise. (e500_move_ev_register): Likewise. (do_regcache_raw_write): Likewise. (rs6000_frame_cache): Likewise. (rs6000_epilogue_frame_cache): Likewise. (rs6000_gdbarch_init): Likewise. * rx-tdep.c (rx_get_opcode_byte): Likewise. (rx_analyze_frame_prologue): Likewise. (rx_frame_type): Likewise. (rx_frame_sniffer_common): Likewise. * s390-linux-tdep.c (s390_check_for_saved): Likewise. (s390_frame_unwind_cache): Likewise. (s390_stub_frame_unwind_cache): Likewise. (s390_sigtramp_frame_unwind_cache): Likewise. * score-tdep.c (score_make_prologue_cache): Likewise. * sentinel-frame.c (sentinel_frame_prev_register): Likewise. (sentinel_frame_prev_arch): Likewise. * ser-base.c (fd_event): Likewise. (push_event): Likewise. (ser_base_write): Likewise. * ser-pipe.c (pipe_close): Likewise. * serial.c (serial_write): Likewise. * sh-tdep.c (sh_frame_cache): Likewise. (sh_stub_this_id): Likewise. * sh64-tdep.c (sh64_frame_cache): Likewise. * solib-aix.c (get_solib_aix_inferior_data): Likewise. (library_list_start_library): Likewise. (library_list_start_list): Likewise. (solib_aix_free_library_list): Likewise. * solib-darwin.c (get_darwin_info): Likewise. * solib-dsbt.c (get_dsbt_info): Likewise. * solib-spu.c (append_ocl_sos): Likewise. * solib-svr4.c (svr4_pspace_data_cleanup): Likewise. (get_svr4_info): Likewise. (library_list_start_library): Likewise. (svr4_library_list_start_list): Likewise. (hash_probe_and_action): Likewise. (equal_probe_and_action): Likewise. (svr4_update_solib_event_breakpoint): Likewise. (set_solib_svr4_fetch_link_map_offsets): Likewise. (svr4_fetch_link_map_offsets): Likewise. (svr4_have_link_map_offsets): Likewise. * solib-target.c (library_list_start_segment): Likewise. (library_list_start_section): Likewise. (library_list_start_library): Likewise. (library_list_end_library): Likewise. (library_list_start_list): Likewise. (solib_target_free_library_list): Likewise. * solib.c (solib_ops): Likewise. (set_solib_ops): Likewise. * sparc-sol2-tdep.c (sparc32_sol2_sigtramp_frame_cache): Likewise. * sparc-tdep.c (sparc_frame_cache): Likewise. (sparc32_frame_cache): Likewise. (sparc32_supply_gregset): Likewise. (sparc32_collect_gregset): Likewise. (sparc32_supply_fpregset): Likewise. (sparc32_collect_fpregset): Likewise. * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_cache): Likewise. * sparc64-tdep.c (sparc64_supply_gregset): Likewise. (sparc64_collect_gregset): Likewise. (sparc64_supply_fpregset): Likewise. (sparc64_collect_fpregset): Likewise. * sparc64fbsd-tdep.c (sparc64fbsd_sigtramp_frame_cache): Likewise. * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_frame_cache): Likewise. * sparc64obsd-tdep.c (sparc64obsd_frame_cache): Likewise. (sparc64obsd_trapframe_cache): Likewise. * sparcnbsd-tdep.c (sparc32nbsd_sigcontext_frame_cache): Likewise. * sparcobsd-tdep.c (sparc32obsd_sigtramp_frame_cache): Likewise. * spu-multiarch.c (spu_gdbarch): Likewise. * spu-tdep.c (spu_frame_unwind_cache): Likewise. (spu2ppu_prev_arch): Likewise. (spu2ppu_this_id): Likewise. (spu2ppu_prev_register): Likewise. (spu2ppu_dealloc_cache): Likewise. (spu_dis_asm_print_address): Likewise. (gdb_print_insn_spu): Likewise. (spu_get_overlay_table): Likewise. * stabsread.c (rs6000_builtin_type): Likewise. * stack.c (do_print_variable_and_value): Likewise. * stap-probe.c (get_stap_base_address_1): Likewise. * symfile-debug.c (debug_qf_has_symbols): Likewise. (debug_qf_find_last_source_symtab): Likewise. (debug_qf_forget_cached_source_info): Likewise. (debug_qf_map_symtabs_matching_filename): Likewise. (debug_qf_lookup_symbol): Likewise. (debug_qf_print_stats): Likewise. (debug_qf_dump): Likewise. (debug_qf_relocate): Likewise. (debug_qf_expand_symtabs_for_function): Likewise. (debug_qf_expand_all_symtabs): Likewise. (debug_qf_expand_symtabs_with_fullname): Likewise. (debug_qf_map_matching_symbols): Likewise. (debug_qf_expand_symtabs_matching): Likewise. (debug_qf_find_pc_sect_compunit_symtab): Likewise. (debug_qf_map_symbol_filenames): Likewise. (debug_sym_get_probes): Likewise. (debug_sym_new_init): Likewise. (debug_sym_init): Likewise. (debug_sym_read): Likewise. (debug_sym_read_psymbols): Likewise. (debug_sym_finish): Likewise. (debug_sym_offsets): Likewise. (debug_sym_read_linetable): Likewise. (debug_sym_relocate): Likewise. (uninstall_symfile_debug_logging): Likewise. * symfile-mem.c (symbol_file_add_from_memory_wrapper): Likewise. * symfile.c (place_section): Likewise. (add_section_size_callback): Likewise. (load_progress): Likewise. (load_section_callback): Likewise. (clear_memory_write_data): Likewise. (allocate_symtab): Likewise. * symmisc.c (maintenance_expand_file_matcher): Likewise. * symtab.c (lookup_symtab_callback): Likewise. (hash_demangled_name_entry): Likewise. (eq_demangled_name_entry): Likewise. (get_symbol_cache): Likewise. (symbol_cache_cleanup): Likewise. (set_symbol_cache_size): Likewise. (symbol_cache_flush): Likewise. (maintenance_print_symbol_cache): Likewise. (maintenance_print_symbol_cache_statistics): Likewise. (delete_filename_seen_cache): Likewise. (output_partial_symbol_filename): Likewise. (search_symbols_file_matches): Likewise. (search_symbols_name_matches): Likewise. (do_free_completion_list): Likewise. (maybe_add_partial_symtab_filename): Likewise. (get_main_info): Likewise. (main_info_cleanup): Likewise. * target-dcache.c (target_dcache_cleanup): Likewise. (target_dcache_init_p): Likewise. (target_dcache_invalidate): Likewise. (target_dcache_get): Likewise. (target_dcache_get_or_init): Likewise. * target-descriptions.c (target_find_description): Likewise. (tdesc_find_type): Likewise. (tdesc_data_cleanup): Likewise. (tdesc_find_arch_register): Likewise. (tdesc_register_name): Likewise. (tdesc_register_type): Likewise. (tdesc_register_reggroup_p): Likewise. (set_tdesc_pseudo_register_name): Likewise. (set_tdesc_pseudo_register_type): Likewise. (set_tdesc_pseudo_register_reggroup_p): Likewise. (tdesc_use_registers): Likewise. (free_target_description): Likewise. * target-memory.c (compare_block_starting_address): Likewise. (cleanup_request_data): Likewise. (cleanup_write_requests_vector): Likewise. * target.c (open_target): Likewise. (cleanup_restore_target_terminal): Likewise. (free_memory_read_result_vector): Likewise. * thread.c (disable_thread_stack_temporaries): Likewise. (finish_thread_state_cleanup): Likewise. (do_restore_current_thread_cleanup): Likewise. (restore_current_thread_cleanup_dtor): Likewise. (set_thread_refcount): Likewise. (tp_array_compar): Likewise. (do_captured_thread_select): Likewise. * tic6x-tdep.c (tic6x_frame_unwind_cache): Likewise. (tic6x_stub_this_id): Likewise. * tilegx-tdep.c (tilegx_frame_cache): Likewise. * top.c (do_restore_instream_cleanup): Likewise. (gdb_readline_wrapper_cleanup): Likewise. (kill_or_detach): Likewise. (print_inferior_quit_action): Likewise. * tracefile-tfile.c (match_blocktype): Likewise. (build_traceframe_info): Likewise. * tracefile.c (trace_file_writer_xfree): Likewise. * tracepoint.c (memrange_cmp): Likewise. (do_collect_symbol): Likewise. (do_clear_collection_list): Likewise. (do_restore_current_traceframe_cleanup): Likewise. (restore_current_traceframe_cleanup_dtor): Likewise. (free_current_marker): Likewise. (traceframe_info_start_memory): Likewise. (traceframe_info_start_tvar): Likewise. (free_result): Likewise. * tramp-frame.c (tramp_frame_cache): Likewise. * tui/tui-file.c (tui_file_delete): Likewise. (tui_fileopen): Likewise. (tui_sfileopen): Likewise. (tui_file_isatty): Likewise. (tui_file_rewind): Likewise. (tui_file_put): Likewise. (tui_file_fputs): Likewise. (tui_file_get_strbuf): Likewise. (tui_file_adjust_strbuf): Likewise. (tui_file_flush): Likewise. * tui/tui-layout.c (make_command_window): Likewise. (make_data_window): Likewise. (show_source_disasm_command): Likewise. (show_data): Likewise. (make_source_or_disasm_window): Likewise. (show_source_or_disasm_and_command): Likewise. * tui/tui-out.c (tui_field_int): Likewise. (tui_field_string): Likewise. (tui_field_fmt): Likewise. (tui_text): Likewise. * typeprint.c (hash_typedef_field): Likewise. (eq_typedef_field): Likewise. (do_free_typedef_hash): Likewise. (copy_typedef_hash_element): Likewise. (do_free_global_table): Likewise. (find_global_typedef): Likewise. (find_typedef_in_hash): Likewise. * ui-file.c (ui_file_write_for_put): Likewise. (do_ui_file_xstrdup): Likewise. (mem_file_delete): Likewise. (mem_file_rewind): Likewise. (mem_file_put): Likewise. (mem_file_write): Likewise. (stdio_file_delete): Likewise. (stdio_file_flush): Likewise. (stdio_file_read): Likewise. (stdio_file_write): Likewise. (stdio_file_write_async_safe): Likewise. (stdio_file_fputs): Likewise. (stdio_file_isatty): Likewise. (stdio_file_fseek): Likewise. (tee_file_delete): Likewise. (tee_file_flush): Likewise. (tee_file_write): Likewise. (tee_file_fputs): Likewise. (tee_file_isatty): Likewise. * ui-out.c (do_cleanup_table_end): Likewise. (do_cleanup_end): Likewise. * user-regs.c (user_reg_add): Likewise. (user_reg_map_name_to_regnum): Likewise. (usernum_to_user_reg): Likewise. (maintenance_print_user_registers): Likewise. * utils.c (do_bfd_close_cleanup): Likewise. (do_fclose_cleanup): Likewise. (do_obstack_free): Likewise. (do_ui_file_delete): Likewise. (do_ui_out_redirect_pop): Likewise. (do_free_section_addr_info): Likewise. (restore_integer): Likewise. (do_unpush_target): Likewise. (do_htab_delete_cleanup): Likewise. (do_restore_ui_file): Likewise. (do_value_free): Likewise. (do_free_so): Likewise. (free_current_contents): Likewise. (do_regfree_cleanup): Likewise. (core_addr_hash): Likewise. (core_addr_eq): Likewise. (do_free_char_ptr_vec): Likewise. * v850-tdep.c (v850_frame_cache): Likewise. * varobj.c (do_free_variable_cleanup): Likewise. * vax-tdep.c (vax_supply_gregset): Likewise. (vax_frame_cache): Likewise. * vaxobsd-tdep.c (vaxobsd_sigtramp_frame_cache): Likewise. * xml-support.c (gdb_xml_body_text): Likewise. (gdb_xml_values_cleanup): Likewise. (gdb_xml_start_element): Likewise. (gdb_xml_start_element_wrapper): Likewise. (gdb_xml_end_element): Likewise. (gdb_xml_end_element_wrapper): Likewise. (gdb_xml_cleanup): Likewise. (gdb_xml_fetch_external_entity): Likewise. (gdb_xml_parse_attr_enum): Likewise. (xinclude_start_include): Likewise. (xinclude_end_include): Likewise. (xml_xinclude_default): Likewise. (xml_xinclude_start_doctype): Likewise. (xml_xinclude_end_doctype): Likewise. (xml_xinclude_cleanup): Likewise. (xml_fetch_content_from_file): Likewise. * xml-syscall.c (free_syscalls_info): Likewise. (syscall_start_syscall): Likewise. * xml-tdesc.c (tdesc_end_arch): Likewise. (tdesc_end_osabi): Likewise. (tdesc_end_compatible): Likewise. (tdesc_start_target): Likewise. (tdesc_start_feature): Likewise. (tdesc_start_reg): Likewise. (tdesc_start_union): Likewise. (tdesc_start_struct): Likewise. (tdesc_start_flags): Likewise. (tdesc_start_field): Likewise. (tdesc_start_vector): Likewise. (fetch_available_features_from_target): Likewise. * xstormy16-tdep.c (xstormy16_frame_cache): Likewise. * xtensa-tdep.c (xtensa_supply_gregset): Likewise. (xtensa_frame_cache): Likewise. (xtensa_frame_prev_register): Likewise. (xtensa_extract_return_value): Likewise.
2015-09-25 20:08:07 +02:00
return (struct s390_sigtramp_unwind_cache *) *this_prologue_cache;
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
info = FRAME_OBSTACK_ZALLOC (struct s390_sigtramp_unwind_cache);
*this_prologue_cache = info;
info->saved_regs = trad_frame_alloc_saved_regs (this_frame);
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
this_sp = get_frame_register_unsigned (this_frame, S390_SP_REGNUM);
next_ra = get_frame_pc (this_frame);
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
next_cfa = this_sp + 16*word_size + 32;
/* New-style RT frame:
retcode + alignment (8 bytes)
siginfo (128 bytes)
ucontext (contains sigregs at offset 5 words). */
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
if (next_ra == next_cfa)
{
sigreg_ptr = next_cfa + 8 + 128 + align_up (5*word_size, 8);
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
/* sigregs are followed by uc_sigmask (8 bytes), then by the
upper GPR halves if present. */
sigreg_high_off = 8;
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
}
/* Old-style RT frame and all non-RT frames:
old signal mask (8 bytes)
pointer to sigregs. */
else
{
* defs.h (extract_signed_integer, extract_unsigned_integer, extract_long_unsigned_integer, store_signed_integer, store_unsigned_integer): Add BYTE_ORDER parameter. * findvar.c (extract_signed_integer, extract_unsigned_integer, extract_long_unsigned_integer, store_signed_integer, store_unsigned_integer): Add BYTE_ORDER parameter. Use it instead of current_gdbarch. * gdbcore.h (read_memory_integer, safe_read_memory_integer, read_memory_unsigned_integer, write_memory_signed_integer, write_memory_unsigned_integer): Add BYTE_ORDER parameter. * corefile.c (struct captured_read_memory_integer_arguments): Add BYTE_ORDER member. (safe_read_memory_integer): Add BYTE_ORDER parameter. Store it into struct captured_read_memory_integer_arguments. (do_captured_read_memory_integer): Pass it to read_memory_integer. (read_memory_integer): Add BYTE_ORDER parameter. Pass it to extract_signed_integer. (read_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it to extract_unsigned_integer. (write_memory_signed_integer): Add BYTE_ORDER parameter. Pass it to store_signed_integer. (write_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it to store_unsigned_integer. * target.h (get_target_memory_unsigned): Add BYTE_ORDER parameter. * target.c (get_target_memory_unsigned): Add BYTE_ORDER parameter. Pass it to extract_unsigned_integer. Update calls to extract_signed_integer, extract_unsigned_integer, extract_long_unsigned_integer, store_signed_integer, store_unsigned_integer, read_memory_integer, read_memory_unsigned_integer, safe_read_memory_integer, write_memory_signed_integer, write_memory_unsigned_integer, and get_target_memory_unsigned to pass byte order: * ada-lang.c (ada_value_binop): Update. * ada-valprint.c (char_at): Update. * alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Update. * alpha-tdep.c (alpha_lds, alpha_sts, alpha_push_dummy_call, alpha_extract_return_value, alpha_read_insn, alpha_get_longjmp_target): Update. * amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Update. * amd64obsd-tdep.c (amd64obsd_supply_uthread, amd64obsd_collect_uthread, amd64obsd_trapframe_cache): Update. * amd64-tdep.c (amd64_push_dummy_call, amd64_analyze_prologue, amd64_frame_cache, amd64_sigtramp_frame_cache, fixup_riprel, amd64_displaced_step_fixup): Update. * arm-linux-tdep.c (arm_linux_sigreturn_init, arm_linux_rt_sigreturn_init, arm_linux_supply_gregset): Update. * arm-tdep.c (thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue, arm_push_dummy_call, thumb_get_next_pc, arm_get_next_pc, arm_extract_return_value, arm_store_return_value, arm_return_value): Update. * arm-wince-tdep.c (arm_pe_skip_trampoline_code): Update. * auxv.c (default_auxv_parse): Update. * avr-tdep.c (avr_address_to_pointer, avr_pointer_to_address, avr_scan_prologue, avr_extract_return_value, avr_frame_prev_register, avr_push_dummy_call): Update. * bsd-uthread.c (bsd_uthread_check_magic, bsd_uthread_lookup_offset, bsd_uthread_wait, bsd_uthread_thread_alive, bsd_uthread_extra_thread_info): Update. * c-lang.c (c_printstr, print_wchar): Update. * cp-valprint.c (cp_print_class_member): Update. * cris-tdep.c (cris_sigcontext_addr, cris_sigtramp_frame_unwind_cache, cris_push_dummy_call, cris_scan_prologue, cris_store_return_value, cris_extract_return_value, find_step_target, dip_prefix, sixteen_bit_offset_branch_op, none_reg_mode_jump_op, move_mem_to_reg_movem_op, get_data_from_address): Update. * dwarf2expr.c (dwarf2_read_address, execute_stack_op): Update. * dwarf2-frame.c (execute_cfa_program): Update. * dwarf2loc.c (find_location_expression): Update. * dwarf2read.c (dwarf2_const_value): Update. * expprint.c (print_subexp_standard): Update. * findvar.c (unsigned_pointer_to_address, signed_pointer_to_address, unsigned_address_to_pointer, address_to_signed_pointer, read_var_value): Update. * frame.c (frame_unwind_register_signed, frame_unwind_register_unsigned, get_frame_memory_signed, get_frame_memory_unsigned): Update. * frame-unwind.c (frame_unwind_got_constant): Update. * frv-linux-tdep.c (frv_linux_pc_in_sigtramp, frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache): Update. * frv-tdep.c (frv_analyze_prologue, frv_skip_main_prologue, frv_extract_return_value, find_func_descr, frv_convert_from_func_ptr_addr, frv_push_dummy_call): Update. * f-valprint.c (f_val_print): Update. * gnu-v3-abi.c (gnuv3_decode_method_ptr, gnuv3_make_method_ptr): Update. * h8300-tdep.c (h8300_is_argument_spill, h8300_analyze_prologue, h8300_push_dummy_call, h8300_extract_return_value, h8300h_extract_return_value, h8300_store_return_value, h8300h_store_return_value): Update. * hppabsd-tdep.c (hppabsd_find_global_pointer): Update. * hppa-hpux-nat.c (hppa_hpux_fetch_register, hppa_hpux_store_register): Update. * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline, hppa64_hpux_in_solib_call_trampoline, hppa_hpux_in_solib_return_trampoline, hppa_hpux_skip_trampoline_code, hppa_hpux_sigtramp_frame_unwind_cache, hppa_hpux_sigtramp_unwind_sniffer, hppa32_hpux_find_global_pointer, hppa64_hpux_find_global_pointer, hppa_hpux_search_pattern, hppa32_hpux_search_dummy_call_sequence, hppa64_hpux_search_dummy_call_sequence, hppa_hpux_supply_save_state, hppa_hpux_unwind_adjust_stub): Update. * hppa-linux-tdep.c (insns_match_pattern, hppa_linux_find_global_pointer): Update. * hppa-tdep.c (hppa_in_function_epilogue_p, hppa32_push_dummy_call, hppa64_convert_code_addr_to_fptr, hppa64_push_dummy_call, skip_prologue_hard_way, hppa_frame_cache, hppa_fallback_frame_cache, hppa_pseudo_register_read, hppa_frame_prev_register_helper, hppa_match_insns): Update. * hpux-thread.c (hpux_thread_fetch_registers): Update. * i386-tdep.c (i386bsd_sigcontext_addr): Update. * i386-cygwin-tdep.c (core_process_module_section): Update. * i386-darwin-nat.c (i386_darwin_sstep_at_sigreturn, amd64_darwin_sstep_at_sigreturn): Update. * i386-darwin-tdep.c (i386_darwin_sigcontext_addr, amd64_darwin_sigcontext_addr): Likewise. * i386-linux-nat.c (i386_linux_sigcontext_addr): Update. * i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Update. * i386-nto-tdep.c (i386nto_sigcontext_addr): Update. * i386obsd-nat.c (i386obsd_supply_pcb): Update. * i386obsd-tdep.c (i386obsd_supply_uthread, i386obsd_collect_uthread, i386obsd_trapframe_cache): Update. * i386-tdep.c (i386_displaced_step_fixup, i386_follow_jump, i386_analyze_frame_setup, i386_analyze_prologue, i386_skip_main_prologue, i386_frame_cache, i386_sigtramp_frame_cache, i386_get_longjmp_target, i386_push_dummy_call, i386_pe_skip_trampoline_code, i386_svr4_sigcontext_addr, i386_fetch_pointer_argument): Update. * i387-tdep.c (i387_supply_fsave): Update. * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Update. * ia64-tdep.c (ia64_pseudo_register_read, ia64_pseudo_register_write, examine_prologue, ia64_frame_cache, ia64_frame_prev_register, ia64_sigtramp_frame_cache, ia64_sigtramp_frame_prev_register, ia64_access_reg, ia64_access_rse_reg, ia64_libunwind_frame_this_id, ia64_libunwind_frame_prev_register, ia64_libunwind_sigtramp_frame_this_id, ia64_libunwind_sigtramp_frame_prev_register, ia64_find_global_pointer, find_extant_func_descr, find_func_descr, ia64_convert_from_func_ptr_addr, ia64_push_dummy_call, ia64_dummy_id, ia64_unwind_pc): Update. * iq2000-tdep.c (iq2000_pointer_to_address, iq2000_address_to_pointer, iq2000_scan_prologue, iq2000_extract_return_value, iq2000_push_dummy_call): Update. * irix5nat.c (fill_gregset): Update. * jv-lang.c (evaluate_subexp_java): Update. * jv-valprint.c (java_value_print): Update. * lm32-tdep.c (lm32_analyze_prologue, lm32_push_dummy_call, lm32_extract_return_value, lm32_store_return_value): Update. * m32c-tdep.c (m32c_push_dummy_call, m32c_return_value, m32c_skip_trampoline_code, m32c_m16c_address_to_pointer, m32c_m16c_pointer_to_address): Update. * m32r-tdep.c (m32r_store_return_value, decode_prologue, m32r_skip_prologue, m32r_push_dummy_call, m32r_extract_return_value): Update. * m68hc11-tdep.c (m68hc11_pseudo_register_read, m68hc11_pseudo_register_write, m68hc11_analyze_instruction, m68hc11_push_dummy_call): Update. * m68linux-tdep.c (m68k_linux_pc_in_sigtramp, m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache): Update. * m68k-tdep.c (m68k_push_dummy_call, m68k_analyze_frame_setup, m68k_analyze_register_saves, m68k_analyze_prologue, m68k_frame_cache, m68k_get_longjmp_target): Update. * m88k-tdep.c (m88k_fetch_instruction): Update. * mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_csr_write, mep_pseudo_cr32_write, mep_get_insn, mep_push_dummy_call): Update. * mi/mi-main.c (mi_cmd_data_write_memory): Update. * mips-linux-tdep.c (mips_linux_get_longjmp_target, supply_32bit_reg, mips64_linux_get_longjmp_target, mips64_fill_gregset, mips64_fill_fpregset, mips_linux_in_dynsym_stub): Update. * mipsnbdsd-tdep.c (mipsnbsd_get_longjmp_target): Update. * mips-tdep.c (mips_fetch_instruction, fetch_mips_16, mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call, mips_o32_push_dummy_call, mips_o64_push_dummy_call, mips_single_step_through_delay, mips_skip_pic_trampoline_code, mips_integer_to_address): Update. * mn10300-tdep.c (mn10300_analyze_prologue, mn10300_push_dummy_call): Update. * monitor.c (monitor_supply_register, monitor_write_memory, monitor_read_memory_single): Update. * moxie-tdep.c (moxie_store_return_value, moxie_extract_return_value, moxie_analyze_prologue): Update. * mt-tdep.c (mt_return_value, mt_skip_prologue, mt_select_coprocessor, mt_pseudo_register_read, mt_pseudo_register_write, mt_registers_info, mt_push_dummy_call): Update. * objc-lang.c (read_objc_method, read_objc_methlist_nmethods, read_objc_methlist_method, read_objc_object, read_objc_super, read_objc_class, find_implementation_from_class): Update. * ppc64-linux-tdep.c (ppc64_desc_entry_point, ppc64_linux_convert_from_func_ptr_addr, ppc_linux_sigtramp_cache): Update. * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_sniffer, ppcobsd_sigtramp_frame_cache): Update. * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call, do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call, ppc64_sysv_abi_return_value): Update. * ppc-linux-nat.c (ppc_linux_auxv_parse): Update. * procfs.c (procfs_auxv_parse): Update. * p-valprint.c (pascal_val_print): Update. * regcache.c (regcache_raw_read_signed, regcache_raw_read_unsigned, regcache_raw_write_signed, regcache_raw_write_unsigned, regcache_cooked_read_signed, regcache_cooked_read_unsigned, regcache_cooked_write_signed, regcache_cooked_write_unsigned): Update. * remote-m32r-sdi.c (m32r_fetch_register): Update. * remote-mips.c (mips_wait, mips_fetch_registers, mips_xfer_memory): Update. * rs6000-aix-tdep.c (rs6000_push_dummy_call, rs6000_return_value, rs6000_convert_from_func_ptr_addr, branch_dest, rs6000_software_single_step): Update. * rs6000-tdep.c (rs6000_in_function_epilogue_p, ppc_displaced_step_fixup, ppc_deal_with_atomic_sequence, bl_to_blrl_insn_p, rs6000_fetch_instruction, skip_prologue, rs6000_skip_main_prologue, rs6000_skip_trampoline_code, rs6000_frame_cache): Update. * s390-tdep.c (s390_pseudo_register_read, s390_pseudo_register_write, s390x_pseudo_register_read, s390x_pseudo_register_write, s390_load, s390_backchain_frame_unwind_cache, s390_sigtramp_frame_unwind_cache, extend_simple_arg, s390_push_dummy_call, s390_return_value): Update. * scm-exp.c (scm_lreadr): Update. * scm-lang.c (scm_get_field, scm_unpack): Update. * scm-valprint.c (scm_val_print): Update. * score-tdep.c (score_breakpoint_from_pc, score_push_dummy_call, score_fetch_inst): Update. * sh64-tdep.c (look_for_args_moves, sh64_skip_prologue_hard_way, sh64_analyze_prologue, sh64_push_dummy_call, sh64_extract_return_value, sh64_pseudo_register_read, sh64_pseudo_register_write, sh64_frame_prev_register): Update: * sh-tdep.c (sh_analyze_prologue, sh_push_dummy_call_fpu, sh_push_dummy_call_nofpu, sh_extract_return_value_nofpu, sh_store_return_value_nofpu, sh_in_function_epilogue_p): Update. * solib-darwin.c (darwin_load_image_infos): Update. * solib-frv.c (fetch_loadmap, lm_base, frv_current_sos, enable_break2, find_canonical_descriptor_in_load_object): Update. * solib-irix.c (extract_mips_address, fetch_lm_info, irix_current_sos, irix_open_symbol_file_object): Update. * solib-som.c (som_solib_create_inferior_hook, link_map_start, som_current_sos, som_open_symbol_file_object): Update. * solib-sunos.c (SOLIB_EXTRACT_ADDRESS, LM_ADDR, LM_NEXT, LM_NAME): Update. * solib-svr4.c (read_program_header, scan_dyntag_auxv, solib_svr4_r_ldsomap): Update. * sparc64-linux-tdep.c (sparc64_linux_step_trap): Update. * sparc64obsd-tdep.c (sparc64obsd_supply_uthread, sparc64obsd_collect_uthread): Update. * sparc64-tdep.c (sparc64_pseudo_register_read, sparc64_pseudo_register_write, sparc64_supply_gregset, sparc64_collect_gregset): Update. * sparc-linux-tdep.c (sparc32_linux_step_trap): Update. * sparcobsd-tdep.c (sparc32obsd_supply_uthread, sparc32obsd_collect_uthread): Update. * sparc-tdep.c (sparc_fetch_wcookie, sparc32_push_dummy_code, sparc32_store_arguments, sparc32_return_value, sparc_supply_rwindow, sparc_collect_rwindow): Update. * spu-linux-nat.c (parse_spufs_run): Update. * spu-tdep.c (spu_pseudo_register_read_spu, spu_pseudo_register_write_spu, spu_pointer_to_address, spu_analyze_prologue, spu_in_function_epilogue_p, spu_frame_unwind_cache, spu_push_dummy_call, spu_software_single_step, spu_get_longjmp_target, spu_get_overlay_table, spu_overlay_update_osect, info_spu_signal_command, info_spu_mailbox_list, info_spu_dma_cmdlist, info_spu_dma_command, info_spu_proxydma_command): Update. * stack.c (print_frame_nameless_args, frame_info): Update. * symfile.c (read_target_long_array, simple_read_overlay_table, simple_read_overlay_region_table): Update. * target.c (debug_print_register): Update. * tramp-frame.c (tramp_frame_start): Update. * v850-tdep.c (v850_analyze_prologue, v850_push_dummy_call, v850_extract_return_value, v850_store_return_value, * valarith.c (value_binop, value_bit_index): Update. * valops.c (value_cast): Update. * valprint.c (val_print_type_code_int, val_print_string, read_string): Update. * value.c (unpack_long, unpack_double, unpack_field_as_long, modify_field, pack_long): Update. * vax-tdep.c (vax_store_arguments, vax_push_dummy_call, vax_skip_prologue): Update. * xstormy16-tdep.c (xstormy16_push_dummy_call, xstormy16_analyze_prologue, xstormy16_in_function_epilogue_p, xstormy16_resolve_jmp_table_entry, xstormy16_find_jmp_table_entry, xstormy16_pointer_to_address, xstormy16_address_to_pointer): Update. * xtensa-tdep.c (extract_call_winsize, xtensa_pseudo_register_read, xtensa_pseudo_register_write, xtensa_frame_cache, xtensa_push_dummy_call, call0_track_op, call0_frame_cache): Update. * dfp.h (decimal_to_string, decimal_from_string, decimal_from_integral, decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter. (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT parameters. (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters. (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters. * dfp.c (match_endianness): Add BYTE_ORDER parameter. Use it instead of current_gdbarch. (decimal_to_string, decimal_from_integral, decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter. Pass it to match_endianness. (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT parameters. Pass them to match_endianness. (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters. Pass them to match_endianness. (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters. Pass them to match_endianness. * valarith.c (value_args_as_decimal): Add BYTE_ORDER_X and BYTE_ORDER_Y output parameters. (value_binop): Update call to value_args_as_decimal. Update calls to decimal_to_string, decimal_from_string, decimal_from_integral, decimal_from_floating, decimal_to_doublest, decimal_is_zero, decimal_binop, decimal_compare and decimal_convert to pass/receive byte order: * c-exp.y (parse_number): Update. * printcmd.c (printf_command): Update. * valarith.c (value_args_as_decimal, value_binop, value_logical_not, value_equal, value_less): Update. * valops.c (value_cast, value_one): Update. * valprint.c (print_decimal_floating): Update. * value.c (unpack_long, unpack_double): Update. * python/python-value.c (valpy_nonzero): Update. * ada-valprint.c (char_at): Add BYTE_ORDER parameter. (printstr): Update calls to char_at. (ada_val_print_array): Likewise. * valprint.c (read_string): Add BYTE_ORDER parameter. (val_print_string): Update call to read_string. * c-lang.c (c_get_string): Likewise. * charset.h (target_wide_charset): Add BYTE_ORDER parameter. * charset.c (target_wide_charset): Add BYTE_ORDER parameter. Use it instead of current_gdbarch. * printcmd.c (printf_command): Update calls to target_wide_charset. * c-lang.c (charset_for_string_type): Add BYTE_ORDER parameter. Pass to target_wide_charset. Use it instead of current_gdbarch. (classify_type): Add BYTE_ORDER parameter. Pass to charset_for_string_type. Allow NULL encoding pointer. (print_wchar): Add BYTE_ORDER parameter. (c_emit_char): Update calls to classify_type and print_wchar. (c_printchar, c_printstr): Likewise. * gdbarch.sh (in_solib_return_trampoline): Convert to type "m". * gdbarch.c, gdbarch.h: Regenerate. * arch-utils.h (generic_in_solib_return_trampoline): Add GDBARCH parameter. * arch-utils.c (generic_in_solib_return_trampoline): Likewise. * hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Likewise. * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise. (rs6000_skip_trampoline_code): Update call. * alpha-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to dynamic_sigtramp_offset and pc_in_sigtramp callbacks. (alpha_read_insn): Add GDBARCH parameter. * alpha-tdep.c (alpha_lds, alpha_sts): Add GDBARCH parameter. (alpha_register_to_value): Pass architecture to alpha_sts. (alpha_extract_return_value): Likewise. (alpha_value_to_register): Pass architecture to alpha_lds. (alpha_store_return_value): Likewise. (alpha_read_insn): Add GDBARCH parameter. (alpha_skip_prologue): Pass architecture to alpha_read_insn. (alpha_heuristic_proc_start): Likewise. (alpha_heuristic_frame_unwind_cache): Likewise. (alpha_next_pc): Likewise. (alpha_sigtramp_frame_this_id): Pass architecture to tdep->dynamic_sigtramp_offset callback. (alpha_sigtramp_frame_sniffer): Pass architecture to tdep->pc_in_sigtramp callback. * alphafbsd-tdep.c (alphafbsd_pc_in_sigtramp): Add GDBARCH parameter. (alphafbsd_sigtramp_offset): Likewise. * alpha-linux-tdep.c (alpha_linux_sigtramp_offset_1): Add GDBARCH parameter. Pass to alpha_read_insn. (alpha_linux_sigtramp_offset): Add GDBARCH parameter. Pass to alpha_linux_sigtramp_offset_1. (alpha_linux_pc_in_sigtramp): Add GDBARCH parameter. Pass to alpha_linux_sigtramp_offset. (alpha_linux_sigcontext_addr): Pass architecture to alpha_read_insn and alpha_linux_sigtramp_offset. * alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Add GDBARCH parameter. (alphanbsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to alphanbsd_sigtramp_offset. * alphaobsd-tdep.c (alphaobsd_sigtramp_offset): Add GDBARCH parameter. (alphaobsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to alpha_read_insn. (alphaobsd_sigcontext_addr): Pass architecture to alphaobsd_sigtramp_offset. * alpha-osf1-tdep.c (alpha_osf1_pc_in_sigtramp): Add GDBARCH parameter. * amd64-tdep.c (amd64_analyze_prologue): Add GDBARCH parameter. (amd64_skip_prologue): Pass architecture to amd64_analyze_prologue. (amd64_frame_cache): Likewise. * arm-tdep.c (SWAP_SHORT, SWAP_INT): Remove. (thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue, thumb_get_next_pc, arm_get_next_pc): Do not use SWAP_ macros. * arm-wince-tdep.c: Include "frame.h". * avr-tdep.c (EXTRACT_INSN): Remove. (avr_scan_prologue): Add GDBARCH argument, inline EXTRACT_INSN. (avr_skip_prologue): Pass architecture to avr_scan_prologue. (avr_frame_unwind_cache): Likewise. * cris-tdep.c (struct instruction_environment): Add BYTE_ORDER member. (find_step_target): Initialize it. (get_data_from_address): Add BYTE_ORDER parameter. (bdap_prefix): Pass byte order to get_data_from_address. (handle_prefix_assign_mode_for_aritm_op): Likewise. (three_operand_add_sub_cmp_and_or_op): Likewise. (handle_inc_and_index_mode_for_aritm_op): Likewise. * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Add GDBARCH parameter. (frv_linux_sigcontext_reg_addr): Pass architecture to frv_linux_pc_in_sigtramp. (frv_linux_sigtramp_frame_sniffer): Likewise. * h8300-tdep.c (h8300_is_argument_spill): Add GDBARCH parameter. (h8300_analyze_prologue): Add GDBARCH parameter. Pass to h8300_is_argument_spill. (h8300_frame_cache, h8300_skip_prologue): Pass architecture to h8300_analyze_prologue. * hppa-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to in_solib_call_trampoline callback. (hppa_in_solib_call_trampoline): Add GDBARCH parameter. * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Add GDBARCH parameter. (hppa64_push_dummy_call): Pass architecture to hppa64_convert_code_addr_to_fptr. (hppa_match_insns): Add GDBARCH parameter. (hppa_match_insns_relaxed): Add GDBARCH parameter. Pass to hppa_match_insns. (hppa_skip_trampoline_code): Pass architecture to hppa_match_insns. (hppa_in_solib_call_trampoline): Add GDBARCH parameter. Pass to hppa_match_insns_relaxed. (hppa_stub_unwind_sniffer): Pass architecture to tdep->in_solib_call_trampoline callback. * hppa-hpux-tdep.c (hppa_hpux_search_pattern): Add GDBARCH parameter. (hppa32_hpux_search_dummy_call_sequence): Pass architecture to hppa_hpux_search_pattern. * hppa-linux-tdep.c (insns_match_pattern): Add GDBARCH parameter. (hppa_linux_sigtramp_find_sigcontext): Add GDBARCH parameter. Pass to insns_match_pattern. (hppa_linux_sigtramp_frame_unwind_cache): Pass architecture to hppa_linux_sigtramp_find_sigcontext. (hppa_linux_sigtramp_frame_sniffer): Likewise. (hppa32_hpux_in_solib_call_trampoline): Add GDBARCH parameter. (hppa64_hpux_in_solib_call_trampoline): Likewise. * i386-tdep.c (i386_follow_jump): Add GDBARCH parameter. (i386_analyze_frame_setup): Add GDBARCH parameter. (i386_analyze_prologue): Add GDBARCH parameter. Pass to i386_follow_jump and i386_analyze_frame_setup. (i386_skip_prologue): Pass architecture to i386_analyze_prologue and i386_follow_jump. (i386_frame_cache): Pass architecture to i386_analyze_prologue. (i386_pe_skip_trampoline_code): Add FRAME parameter. * i386-tdep.h (i386_pe_skip_trampoline_code): Add FRAME parameter. * i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): Pass frame to i386_pe_skip_trampoline_code. * ia64-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to sigcontext_register_address callback. * ia64-tdep.c (ia64_find_global_pointer): Add GDBARCH parameter. (ia64_find_unwind_table): Pass architecture to ia64_find_global_pointer. (find_extant_func_descr): Add GDBARCH parameter. (find_func_descr): Pass architecture to find_extant_func_descr and ia64_find_global_pointer. (ia64_sigtramp_frame_init_saved_regs): Pass architecture to tdep->sigcontext_register_address callback. * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Add GDBARCH parameter. * iq2000-tdep.c (iq2000_scan_prologue): Add GDBARCH parameter. (iq2000_frame_cache): Pass architecture to iq2000_scan_prologue. * lm32-tdep.c (lm32_analyze_prologue): Add GDBARCH parameter. (lm32_skip_prologue, lm32_frame_cache): Pass architecture to lm32_analyze_prologue. * m32r-tdep.c (decode_prologue): Add GDBARCH parameter. (m32r_skip_prologue): Pass architecture to decode_prologue. * m68hc11-tdep.c (m68hc11_analyze_instruction): Add GDBARCH parameter. (m68hc11_scan_prologue): Pass architecture to m68hc11_analyze_instruction. * m68k-tdep.c (m68k_analyze_frame_setup): Add GDBARCH parameter. (m68k_analyze_prologue): Pass architecture to m68k_analyze_frame_setup. * m88k-tdep.c (m88k_fetch_instruction): Add BYTE_ORDER parameter. (m88k_analyze_prologue): Add GDBARCH parameter. Pass byte order to m88k_fetch_instruction. (m88k_skip_prologue): Pass architecture to m88k_analyze_prologue. (m88k_frame_cache): Likewise. * mep-tdep.c (mep_get_insn): Add GDBARCH parameter. (mep_analyze_prologue): Pass architecture to mep_get_insn. * mips-tdep.c (mips_fetch_instruction): Add GDBARCH parameter. (mips32_next_pc): Pass architecture to mips_fetch_instruction. (deal_with_atomic_sequence): Likewise. (unpack_mips16): Add GDBARCH parameter, pass to mips_fetch_instruction. (mips16_scan_prologue): Likewise. (mips32_scan_prologue): Likewise. (mips16_in_function_epilogue_p): Likewise. (mips32_in_function_epilogue_p): Likewise. (mips_about_to_return): Likewise. (mips_insn16_frame_cache): Pass architecture to mips16_scan_prologue. (mips_insn32_frame_cache): Pass architecture to mips32_scan_prologue. (mips_skip_prologue): Pass architecture to mips16_scan_prologue and mips32_scan_prologue. (mips_in_function_epilogue_p): Pass architecture to mips16_in_function_epilogue_p and mips32_in_function_epilogue_p. (heuristic_proc_start): Pass architecture to mips_fetch_instruction and mips_about_to_return. (mips_skip_mips16_trampoline_code): Pass architecture to mips_fetch_instruction. (fetch_mips_16): Add GDBARCH parameter. (mips16_next_pc): Pass architecture to fetch_mips_16. (extended_mips16_next_pc): Pass architecture to unpack_mips16 and fetch_mips_16. * objc-lang.c (read_objc_method, read_objc_methlist_nmethods, read_objc_methlist_method, read_objc_object, read_objc_super, read_objc_class): Add GDBARCH parameter. (find_implementation_from_class): Add GDBARCH parameter, pass to read_objc_class, read_objc_methlist_nmethods, and read_objc_methlist_method. (find_implementation): Add GDBARCH parameter, pass to read_objc_object and find_implementation_from_class. (resolve_msgsend, resolve_msgsend_stret): Pass architecture to find_implementation. (resolve_msgsend_super, resolve_msgsend_super_stret): Pass architecture to read_objc_super and find_implementation_from_class. * ppc64-linux-tdep.c (ppc64_desc_entry_point): Add GDBARCH parameter. (ppc64_standard_linkage1_target, ppc64_standard_linkage2_target, ppc64_standard_linkage3_target): Pass architecture to ppc64_desc_entry_point. * rs6000-tdep.c (bl_to_blrl_insn_p): Add BYTE_ORDER parameter. (skip_prologue): Pass byte order to bl_to_blrl_insn_p. (rs6000_fetch_instruction): Add GDBARCH parameter. (rs6000_skip_stack_check): Add GDBARCH parameter, pass to rs6000_fetch_instruction. (skip_prologue): Pass architecture to rs6000_fetch_instruction. * remote-mips.c (mips_store_word): Return old_contents as host integer value instead of target bytes. * s390-tdep.c (struct s390_prologue_data): Add BYTE_ORDER member. (s390_analyze_prologue): Initialize it. (extend_simple_arg): Add GDBARCH parameter. (s390_push_dummy_call): Pass architecture to extend_simple_arg. * scm-lang.c (scm_get_field): Add BYTE_ORDER parameter. * scm-lang.h (scm_get_field): Add BYTE_ORDER parameter. (SCM_CAR, SCM_CDR): Pass SCM_BYTE_ORDER to scm_get_field. * scm-valprint.c (scm_scmval_print): Likewise. (scm_scmlist_print, scm_ipruk, scm_scmval_print): Define SCM_BYTE_ORDER. * sh64-tdep.c (look_for_args_moves): Add GDBARCH parameter. (sh64_skip_prologue_hard_way): Add GDBARCH parameter, pass to look_for_args_moves. (sh64_skip_prologue): Pass architecture to sh64_skip_prologue_hard_way. * sh-tdep.c (sh_analyze_prologue): Add GDBARCH parameter. (sh_skip_prologue): Pass architecture to sh_analyze_prologue. (sh_frame_cache): Likewise. * solib-irix.c (extract_mips_address): Add GDBARCH parameter. (fetch_lm_info, irix_current_sos, irix_open_symbol_file_object): Pass architecture to extract_mips_address. * sparc-tdep.h (sparc_fetch_wcookie): Add GDBARCH parameter. * sparc-tdep.c (sparc_fetch_wcookie): Add GDBARCH parameter. (sparc_supply_rwindow, sparc_collect_rwindow): Pass architecture to sparc_fetch_wcookie. (sparc32_frame_prev_register): Likewise. * sparc64-tdep.c (sparc64_frame_prev_register): Likewise. * sparc32nbsd-tdep.c (sparc32nbsd_sigcontext_saved_regs): Likewise. * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Likewise. * spu-tdep.c (spu_analyze_prologue): Add GDBARCH parameter. (spu_skip_prologue): Pass architecture to spu_analyze_prologue. (spu_virtual_frame_pointer): Likewise. (spu_frame_unwind_cache): Likewise. (info_spu_mailbox_list): Add BYTE_ORER parameter. (info_spu_mailbox_command): Pass byte order to info_spu_mailbox_list. (info_spu_dma_cmdlist): Add BYTE_ORER parameter. (info_spu_dma_command, info_spu_proxydma_command): Pass byte order to info_spu_dma_cmdlist. * symfile.c (read_target_long_array): Add GDBARCH parameter. (simple_read_overlay_table, simple_read_overlay_region_table, simple_overlay_update_1): Pass architecture to read_target_long_array. * v850-tdep.c (v850_analyze_prologue): Add GDBARCH parameter. (v850_frame_cache): Pass architecture to v850_analyze_prologue. * xstormy16-tdep.c (xstormy16_analyze_prologue): Add GDBARCH parameter. (xstormy16_skip_prologue, xstormy16_frame_cache): Pass architecture to xstormy16_analyze_prologue. (xstormy16_resolve_jmp_table_entry): Add GDBARCH parameter. (xstormy16_find_jmp_table_entry): Likewise. (xstormy16_skip_trampoline_code): Pass architecture to xstormy16_resolve_jmp_table_entry. (xstormy16_pointer_to_address): Likewise. (xstormy16_address_to_pointer): Pass architecture to xstormy16_find_jmp_table_entry. * xtensa-tdep.c (call0_track_op): Add GDBARCH parameter. (call0_analyze_prologue): Add GDBARCH parameter, pass to call0_track_op. (call0_frame_cache): Pass architecture to call0_analyze_prologue. (xtensa_skip_prologue): Likewise.
2009-07-02 19:25:59 +02:00
sigreg_ptr = read_memory_unsigned_integer (next_cfa + 8,
word_size, byte_order);
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
/* sigregs are followed by signo (4 bytes), then by the
upper GPR halves if present. */
sigreg_high_off = 4;
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
}
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
/* The sigregs structure looks like this:
long psw_mask;
long psw_addr;
long gprs[16];
int acrs[16];
int fpc;
int __pad;
double fprs[16]; */
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
/* PSW mask and address. */
info->saved_regs[S390_PSWM_REGNUM].addr = sigreg_ptr;
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
sigreg_ptr += word_size;
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
info->saved_regs[S390_PSWA_REGNUM].addr = sigreg_ptr;
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
sigreg_ptr += word_size;
/* Then the GPRs. */
for (i = 0; i < 16; i++)
{
info->saved_regs[S390_R0_REGNUM + i].addr = sigreg_ptr;
sigreg_ptr += word_size;
}
/* Then the ACRs. */
for (i = 0; i < 16; i++)
{
info->saved_regs[S390_A0_REGNUM + i].addr = sigreg_ptr;
sigreg_ptr += 4;
}
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
/* The floating-point control word. */
info->saved_regs[S390_FPC_REGNUM].addr = sigreg_ptr;
sigreg_ptr += 8;
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
/* And finally the FPRs. */
for (i = 0; i < 16; i++)
{
info->saved_regs[S390_F0_REGNUM + i].addr = sigreg_ptr;
sigreg_ptr += 8;
}
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
/* If we have them, the GPR upper halves are appended at the end. */
sigreg_ptr += sigreg_high_off;
if (tdep->gpr_full_regnum != -1)
for (i = 0; i < 16; i++)
{
info->saved_regs[S390_R0_UPPER_REGNUM + i].addr = sigreg_ptr;
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
sigreg_ptr += 4;
}
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
/* Restore the previous frame's SP. */
prev_sp = read_memory_unsigned_integer (
info->saved_regs[S390_SP_REGNUM].addr,
* defs.h (extract_signed_integer, extract_unsigned_integer, extract_long_unsigned_integer, store_signed_integer, store_unsigned_integer): Add BYTE_ORDER parameter. * findvar.c (extract_signed_integer, extract_unsigned_integer, extract_long_unsigned_integer, store_signed_integer, store_unsigned_integer): Add BYTE_ORDER parameter. Use it instead of current_gdbarch. * gdbcore.h (read_memory_integer, safe_read_memory_integer, read_memory_unsigned_integer, write_memory_signed_integer, write_memory_unsigned_integer): Add BYTE_ORDER parameter. * corefile.c (struct captured_read_memory_integer_arguments): Add BYTE_ORDER member. (safe_read_memory_integer): Add BYTE_ORDER parameter. Store it into struct captured_read_memory_integer_arguments. (do_captured_read_memory_integer): Pass it to read_memory_integer. (read_memory_integer): Add BYTE_ORDER parameter. Pass it to extract_signed_integer. (read_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it to extract_unsigned_integer. (write_memory_signed_integer): Add BYTE_ORDER parameter. Pass it to store_signed_integer. (write_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it to store_unsigned_integer. * target.h (get_target_memory_unsigned): Add BYTE_ORDER parameter. * target.c (get_target_memory_unsigned): Add BYTE_ORDER parameter. Pass it to extract_unsigned_integer. Update calls to extract_signed_integer, extract_unsigned_integer, extract_long_unsigned_integer, store_signed_integer, store_unsigned_integer, read_memory_integer, read_memory_unsigned_integer, safe_read_memory_integer, write_memory_signed_integer, write_memory_unsigned_integer, and get_target_memory_unsigned to pass byte order: * ada-lang.c (ada_value_binop): Update. * ada-valprint.c (char_at): Update. * alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Update. * alpha-tdep.c (alpha_lds, alpha_sts, alpha_push_dummy_call, alpha_extract_return_value, alpha_read_insn, alpha_get_longjmp_target): Update. * amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Update. * amd64obsd-tdep.c (amd64obsd_supply_uthread, amd64obsd_collect_uthread, amd64obsd_trapframe_cache): Update. * amd64-tdep.c (amd64_push_dummy_call, amd64_analyze_prologue, amd64_frame_cache, amd64_sigtramp_frame_cache, fixup_riprel, amd64_displaced_step_fixup): Update. * arm-linux-tdep.c (arm_linux_sigreturn_init, arm_linux_rt_sigreturn_init, arm_linux_supply_gregset): Update. * arm-tdep.c (thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue, arm_push_dummy_call, thumb_get_next_pc, arm_get_next_pc, arm_extract_return_value, arm_store_return_value, arm_return_value): Update. * arm-wince-tdep.c (arm_pe_skip_trampoline_code): Update. * auxv.c (default_auxv_parse): Update. * avr-tdep.c (avr_address_to_pointer, avr_pointer_to_address, avr_scan_prologue, avr_extract_return_value, avr_frame_prev_register, avr_push_dummy_call): Update. * bsd-uthread.c (bsd_uthread_check_magic, bsd_uthread_lookup_offset, bsd_uthread_wait, bsd_uthread_thread_alive, bsd_uthread_extra_thread_info): Update. * c-lang.c (c_printstr, print_wchar): Update. * cp-valprint.c (cp_print_class_member): Update. * cris-tdep.c (cris_sigcontext_addr, cris_sigtramp_frame_unwind_cache, cris_push_dummy_call, cris_scan_prologue, cris_store_return_value, cris_extract_return_value, find_step_target, dip_prefix, sixteen_bit_offset_branch_op, none_reg_mode_jump_op, move_mem_to_reg_movem_op, get_data_from_address): Update. * dwarf2expr.c (dwarf2_read_address, execute_stack_op): Update. * dwarf2-frame.c (execute_cfa_program): Update. * dwarf2loc.c (find_location_expression): Update. * dwarf2read.c (dwarf2_const_value): Update. * expprint.c (print_subexp_standard): Update. * findvar.c (unsigned_pointer_to_address, signed_pointer_to_address, unsigned_address_to_pointer, address_to_signed_pointer, read_var_value): Update. * frame.c (frame_unwind_register_signed, frame_unwind_register_unsigned, get_frame_memory_signed, get_frame_memory_unsigned): Update. * frame-unwind.c (frame_unwind_got_constant): Update. * frv-linux-tdep.c (frv_linux_pc_in_sigtramp, frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache): Update. * frv-tdep.c (frv_analyze_prologue, frv_skip_main_prologue, frv_extract_return_value, find_func_descr, frv_convert_from_func_ptr_addr, frv_push_dummy_call): Update. * f-valprint.c (f_val_print): Update. * gnu-v3-abi.c (gnuv3_decode_method_ptr, gnuv3_make_method_ptr): Update. * h8300-tdep.c (h8300_is_argument_spill, h8300_analyze_prologue, h8300_push_dummy_call, h8300_extract_return_value, h8300h_extract_return_value, h8300_store_return_value, h8300h_store_return_value): Update. * hppabsd-tdep.c (hppabsd_find_global_pointer): Update. * hppa-hpux-nat.c (hppa_hpux_fetch_register, hppa_hpux_store_register): Update. * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline, hppa64_hpux_in_solib_call_trampoline, hppa_hpux_in_solib_return_trampoline, hppa_hpux_skip_trampoline_code, hppa_hpux_sigtramp_frame_unwind_cache, hppa_hpux_sigtramp_unwind_sniffer, hppa32_hpux_find_global_pointer, hppa64_hpux_find_global_pointer, hppa_hpux_search_pattern, hppa32_hpux_search_dummy_call_sequence, hppa64_hpux_search_dummy_call_sequence, hppa_hpux_supply_save_state, hppa_hpux_unwind_adjust_stub): Update. * hppa-linux-tdep.c (insns_match_pattern, hppa_linux_find_global_pointer): Update. * hppa-tdep.c (hppa_in_function_epilogue_p, hppa32_push_dummy_call, hppa64_convert_code_addr_to_fptr, hppa64_push_dummy_call, skip_prologue_hard_way, hppa_frame_cache, hppa_fallback_frame_cache, hppa_pseudo_register_read, hppa_frame_prev_register_helper, hppa_match_insns): Update. * hpux-thread.c (hpux_thread_fetch_registers): Update. * i386-tdep.c (i386bsd_sigcontext_addr): Update. * i386-cygwin-tdep.c (core_process_module_section): Update. * i386-darwin-nat.c (i386_darwin_sstep_at_sigreturn, amd64_darwin_sstep_at_sigreturn): Update. * i386-darwin-tdep.c (i386_darwin_sigcontext_addr, amd64_darwin_sigcontext_addr): Likewise. * i386-linux-nat.c (i386_linux_sigcontext_addr): Update. * i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Update. * i386-nto-tdep.c (i386nto_sigcontext_addr): Update. * i386obsd-nat.c (i386obsd_supply_pcb): Update. * i386obsd-tdep.c (i386obsd_supply_uthread, i386obsd_collect_uthread, i386obsd_trapframe_cache): Update. * i386-tdep.c (i386_displaced_step_fixup, i386_follow_jump, i386_analyze_frame_setup, i386_analyze_prologue, i386_skip_main_prologue, i386_frame_cache, i386_sigtramp_frame_cache, i386_get_longjmp_target, i386_push_dummy_call, i386_pe_skip_trampoline_code, i386_svr4_sigcontext_addr, i386_fetch_pointer_argument): Update. * i387-tdep.c (i387_supply_fsave): Update. * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Update. * ia64-tdep.c (ia64_pseudo_register_read, ia64_pseudo_register_write, examine_prologue, ia64_frame_cache, ia64_frame_prev_register, ia64_sigtramp_frame_cache, ia64_sigtramp_frame_prev_register, ia64_access_reg, ia64_access_rse_reg, ia64_libunwind_frame_this_id, ia64_libunwind_frame_prev_register, ia64_libunwind_sigtramp_frame_this_id, ia64_libunwind_sigtramp_frame_prev_register, ia64_find_global_pointer, find_extant_func_descr, find_func_descr, ia64_convert_from_func_ptr_addr, ia64_push_dummy_call, ia64_dummy_id, ia64_unwind_pc): Update. * iq2000-tdep.c (iq2000_pointer_to_address, iq2000_address_to_pointer, iq2000_scan_prologue, iq2000_extract_return_value, iq2000_push_dummy_call): Update. * irix5nat.c (fill_gregset): Update. * jv-lang.c (evaluate_subexp_java): Update. * jv-valprint.c (java_value_print): Update. * lm32-tdep.c (lm32_analyze_prologue, lm32_push_dummy_call, lm32_extract_return_value, lm32_store_return_value): Update. * m32c-tdep.c (m32c_push_dummy_call, m32c_return_value, m32c_skip_trampoline_code, m32c_m16c_address_to_pointer, m32c_m16c_pointer_to_address): Update. * m32r-tdep.c (m32r_store_return_value, decode_prologue, m32r_skip_prologue, m32r_push_dummy_call, m32r_extract_return_value): Update. * m68hc11-tdep.c (m68hc11_pseudo_register_read, m68hc11_pseudo_register_write, m68hc11_analyze_instruction, m68hc11_push_dummy_call): Update. * m68linux-tdep.c (m68k_linux_pc_in_sigtramp, m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache): Update. * m68k-tdep.c (m68k_push_dummy_call, m68k_analyze_frame_setup, m68k_analyze_register_saves, m68k_analyze_prologue, m68k_frame_cache, m68k_get_longjmp_target): Update. * m88k-tdep.c (m88k_fetch_instruction): Update. * mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_csr_write, mep_pseudo_cr32_write, mep_get_insn, mep_push_dummy_call): Update. * mi/mi-main.c (mi_cmd_data_write_memory): Update. * mips-linux-tdep.c (mips_linux_get_longjmp_target, supply_32bit_reg, mips64_linux_get_longjmp_target, mips64_fill_gregset, mips64_fill_fpregset, mips_linux_in_dynsym_stub): Update. * mipsnbdsd-tdep.c (mipsnbsd_get_longjmp_target): Update. * mips-tdep.c (mips_fetch_instruction, fetch_mips_16, mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call, mips_o32_push_dummy_call, mips_o64_push_dummy_call, mips_single_step_through_delay, mips_skip_pic_trampoline_code, mips_integer_to_address): Update. * mn10300-tdep.c (mn10300_analyze_prologue, mn10300_push_dummy_call): Update. * monitor.c (monitor_supply_register, monitor_write_memory, monitor_read_memory_single): Update. * moxie-tdep.c (moxie_store_return_value, moxie_extract_return_value, moxie_analyze_prologue): Update. * mt-tdep.c (mt_return_value, mt_skip_prologue, mt_select_coprocessor, mt_pseudo_register_read, mt_pseudo_register_write, mt_registers_info, mt_push_dummy_call): Update. * objc-lang.c (read_objc_method, read_objc_methlist_nmethods, read_objc_methlist_method, read_objc_object, read_objc_super, read_objc_class, find_implementation_from_class): Update. * ppc64-linux-tdep.c (ppc64_desc_entry_point, ppc64_linux_convert_from_func_ptr_addr, ppc_linux_sigtramp_cache): Update. * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_sniffer, ppcobsd_sigtramp_frame_cache): Update. * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call, do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call, ppc64_sysv_abi_return_value): Update. * ppc-linux-nat.c (ppc_linux_auxv_parse): Update. * procfs.c (procfs_auxv_parse): Update. * p-valprint.c (pascal_val_print): Update. * regcache.c (regcache_raw_read_signed, regcache_raw_read_unsigned, regcache_raw_write_signed, regcache_raw_write_unsigned, regcache_cooked_read_signed, regcache_cooked_read_unsigned, regcache_cooked_write_signed, regcache_cooked_write_unsigned): Update. * remote-m32r-sdi.c (m32r_fetch_register): Update. * remote-mips.c (mips_wait, mips_fetch_registers, mips_xfer_memory): Update. * rs6000-aix-tdep.c (rs6000_push_dummy_call, rs6000_return_value, rs6000_convert_from_func_ptr_addr, branch_dest, rs6000_software_single_step): Update. * rs6000-tdep.c (rs6000_in_function_epilogue_p, ppc_displaced_step_fixup, ppc_deal_with_atomic_sequence, bl_to_blrl_insn_p, rs6000_fetch_instruction, skip_prologue, rs6000_skip_main_prologue, rs6000_skip_trampoline_code, rs6000_frame_cache): Update. * s390-tdep.c (s390_pseudo_register_read, s390_pseudo_register_write, s390x_pseudo_register_read, s390x_pseudo_register_write, s390_load, s390_backchain_frame_unwind_cache, s390_sigtramp_frame_unwind_cache, extend_simple_arg, s390_push_dummy_call, s390_return_value): Update. * scm-exp.c (scm_lreadr): Update. * scm-lang.c (scm_get_field, scm_unpack): Update. * scm-valprint.c (scm_val_print): Update. * score-tdep.c (score_breakpoint_from_pc, score_push_dummy_call, score_fetch_inst): Update. * sh64-tdep.c (look_for_args_moves, sh64_skip_prologue_hard_way, sh64_analyze_prologue, sh64_push_dummy_call, sh64_extract_return_value, sh64_pseudo_register_read, sh64_pseudo_register_write, sh64_frame_prev_register): Update: * sh-tdep.c (sh_analyze_prologue, sh_push_dummy_call_fpu, sh_push_dummy_call_nofpu, sh_extract_return_value_nofpu, sh_store_return_value_nofpu, sh_in_function_epilogue_p): Update. * solib-darwin.c (darwin_load_image_infos): Update. * solib-frv.c (fetch_loadmap, lm_base, frv_current_sos, enable_break2, find_canonical_descriptor_in_load_object): Update. * solib-irix.c (extract_mips_address, fetch_lm_info, irix_current_sos, irix_open_symbol_file_object): Update. * solib-som.c (som_solib_create_inferior_hook, link_map_start, som_current_sos, som_open_symbol_file_object): Update. * solib-sunos.c (SOLIB_EXTRACT_ADDRESS, LM_ADDR, LM_NEXT, LM_NAME): Update. * solib-svr4.c (read_program_header, scan_dyntag_auxv, solib_svr4_r_ldsomap): Update. * sparc64-linux-tdep.c (sparc64_linux_step_trap): Update. * sparc64obsd-tdep.c (sparc64obsd_supply_uthread, sparc64obsd_collect_uthread): Update. * sparc64-tdep.c (sparc64_pseudo_register_read, sparc64_pseudo_register_write, sparc64_supply_gregset, sparc64_collect_gregset): Update. * sparc-linux-tdep.c (sparc32_linux_step_trap): Update. * sparcobsd-tdep.c (sparc32obsd_supply_uthread, sparc32obsd_collect_uthread): Update. * sparc-tdep.c (sparc_fetch_wcookie, sparc32_push_dummy_code, sparc32_store_arguments, sparc32_return_value, sparc_supply_rwindow, sparc_collect_rwindow): Update. * spu-linux-nat.c (parse_spufs_run): Update. * spu-tdep.c (spu_pseudo_register_read_spu, spu_pseudo_register_write_spu, spu_pointer_to_address, spu_analyze_prologue, spu_in_function_epilogue_p, spu_frame_unwind_cache, spu_push_dummy_call, spu_software_single_step, spu_get_longjmp_target, spu_get_overlay_table, spu_overlay_update_osect, info_spu_signal_command, info_spu_mailbox_list, info_spu_dma_cmdlist, info_spu_dma_command, info_spu_proxydma_command): Update. * stack.c (print_frame_nameless_args, frame_info): Update. * symfile.c (read_target_long_array, simple_read_overlay_table, simple_read_overlay_region_table): Update. * target.c (debug_print_register): Update. * tramp-frame.c (tramp_frame_start): Update. * v850-tdep.c (v850_analyze_prologue, v850_push_dummy_call, v850_extract_return_value, v850_store_return_value, * valarith.c (value_binop, value_bit_index): Update. * valops.c (value_cast): Update. * valprint.c (val_print_type_code_int, val_print_string, read_string): Update. * value.c (unpack_long, unpack_double, unpack_field_as_long, modify_field, pack_long): Update. * vax-tdep.c (vax_store_arguments, vax_push_dummy_call, vax_skip_prologue): Update. * xstormy16-tdep.c (xstormy16_push_dummy_call, xstormy16_analyze_prologue, xstormy16_in_function_epilogue_p, xstormy16_resolve_jmp_table_entry, xstormy16_find_jmp_table_entry, xstormy16_pointer_to_address, xstormy16_address_to_pointer): Update. * xtensa-tdep.c (extract_call_winsize, xtensa_pseudo_register_read, xtensa_pseudo_register_write, xtensa_frame_cache, xtensa_push_dummy_call, call0_track_op, call0_frame_cache): Update. * dfp.h (decimal_to_string, decimal_from_string, decimal_from_integral, decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter. (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT parameters. (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters. (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters. * dfp.c (match_endianness): Add BYTE_ORDER parameter. Use it instead of current_gdbarch. (decimal_to_string, decimal_from_integral, decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter. Pass it to match_endianness. (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT parameters. Pass them to match_endianness. (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters. Pass them to match_endianness. (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters. Pass them to match_endianness. * valarith.c (value_args_as_decimal): Add BYTE_ORDER_X and BYTE_ORDER_Y output parameters. (value_binop): Update call to value_args_as_decimal. Update calls to decimal_to_string, decimal_from_string, decimal_from_integral, decimal_from_floating, decimal_to_doublest, decimal_is_zero, decimal_binop, decimal_compare and decimal_convert to pass/receive byte order: * c-exp.y (parse_number): Update. * printcmd.c (printf_command): Update. * valarith.c (value_args_as_decimal, value_binop, value_logical_not, value_equal, value_less): Update. * valops.c (value_cast, value_one): Update. * valprint.c (print_decimal_floating): Update. * value.c (unpack_long, unpack_double): Update. * python/python-value.c (valpy_nonzero): Update. * ada-valprint.c (char_at): Add BYTE_ORDER parameter. (printstr): Update calls to char_at. (ada_val_print_array): Likewise. * valprint.c (read_string): Add BYTE_ORDER parameter. (val_print_string): Update call to read_string. * c-lang.c (c_get_string): Likewise. * charset.h (target_wide_charset): Add BYTE_ORDER parameter. * charset.c (target_wide_charset): Add BYTE_ORDER parameter. Use it instead of current_gdbarch. * printcmd.c (printf_command): Update calls to target_wide_charset. * c-lang.c (charset_for_string_type): Add BYTE_ORDER parameter. Pass to target_wide_charset. Use it instead of current_gdbarch. (classify_type): Add BYTE_ORDER parameter. Pass to charset_for_string_type. Allow NULL encoding pointer. (print_wchar): Add BYTE_ORDER parameter. (c_emit_char): Update calls to classify_type and print_wchar. (c_printchar, c_printstr): Likewise. * gdbarch.sh (in_solib_return_trampoline): Convert to type "m". * gdbarch.c, gdbarch.h: Regenerate. * arch-utils.h (generic_in_solib_return_trampoline): Add GDBARCH parameter. * arch-utils.c (generic_in_solib_return_trampoline): Likewise. * hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Likewise. * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise. (rs6000_skip_trampoline_code): Update call. * alpha-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to dynamic_sigtramp_offset and pc_in_sigtramp callbacks. (alpha_read_insn): Add GDBARCH parameter. * alpha-tdep.c (alpha_lds, alpha_sts): Add GDBARCH parameter. (alpha_register_to_value): Pass architecture to alpha_sts. (alpha_extract_return_value): Likewise. (alpha_value_to_register): Pass architecture to alpha_lds. (alpha_store_return_value): Likewise. (alpha_read_insn): Add GDBARCH parameter. (alpha_skip_prologue): Pass architecture to alpha_read_insn. (alpha_heuristic_proc_start): Likewise. (alpha_heuristic_frame_unwind_cache): Likewise. (alpha_next_pc): Likewise. (alpha_sigtramp_frame_this_id): Pass architecture to tdep->dynamic_sigtramp_offset callback. (alpha_sigtramp_frame_sniffer): Pass architecture to tdep->pc_in_sigtramp callback. * alphafbsd-tdep.c (alphafbsd_pc_in_sigtramp): Add GDBARCH parameter. (alphafbsd_sigtramp_offset): Likewise. * alpha-linux-tdep.c (alpha_linux_sigtramp_offset_1): Add GDBARCH parameter. Pass to alpha_read_insn. (alpha_linux_sigtramp_offset): Add GDBARCH parameter. Pass to alpha_linux_sigtramp_offset_1. (alpha_linux_pc_in_sigtramp): Add GDBARCH parameter. Pass to alpha_linux_sigtramp_offset. (alpha_linux_sigcontext_addr): Pass architecture to alpha_read_insn and alpha_linux_sigtramp_offset. * alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Add GDBARCH parameter. (alphanbsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to alphanbsd_sigtramp_offset. * alphaobsd-tdep.c (alphaobsd_sigtramp_offset): Add GDBARCH parameter. (alphaobsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to alpha_read_insn. (alphaobsd_sigcontext_addr): Pass architecture to alphaobsd_sigtramp_offset. * alpha-osf1-tdep.c (alpha_osf1_pc_in_sigtramp): Add GDBARCH parameter. * amd64-tdep.c (amd64_analyze_prologue): Add GDBARCH parameter. (amd64_skip_prologue): Pass architecture to amd64_analyze_prologue. (amd64_frame_cache): Likewise. * arm-tdep.c (SWAP_SHORT, SWAP_INT): Remove. (thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue, thumb_get_next_pc, arm_get_next_pc): Do not use SWAP_ macros. * arm-wince-tdep.c: Include "frame.h". * avr-tdep.c (EXTRACT_INSN): Remove. (avr_scan_prologue): Add GDBARCH argument, inline EXTRACT_INSN. (avr_skip_prologue): Pass architecture to avr_scan_prologue. (avr_frame_unwind_cache): Likewise. * cris-tdep.c (struct instruction_environment): Add BYTE_ORDER member. (find_step_target): Initialize it. (get_data_from_address): Add BYTE_ORDER parameter. (bdap_prefix): Pass byte order to get_data_from_address. (handle_prefix_assign_mode_for_aritm_op): Likewise. (three_operand_add_sub_cmp_and_or_op): Likewise. (handle_inc_and_index_mode_for_aritm_op): Likewise. * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Add GDBARCH parameter. (frv_linux_sigcontext_reg_addr): Pass architecture to frv_linux_pc_in_sigtramp. (frv_linux_sigtramp_frame_sniffer): Likewise. * h8300-tdep.c (h8300_is_argument_spill): Add GDBARCH parameter. (h8300_analyze_prologue): Add GDBARCH parameter. Pass to h8300_is_argument_spill. (h8300_frame_cache, h8300_skip_prologue): Pass architecture to h8300_analyze_prologue. * hppa-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to in_solib_call_trampoline callback. (hppa_in_solib_call_trampoline): Add GDBARCH parameter. * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Add GDBARCH parameter. (hppa64_push_dummy_call): Pass architecture to hppa64_convert_code_addr_to_fptr. (hppa_match_insns): Add GDBARCH parameter. (hppa_match_insns_relaxed): Add GDBARCH parameter. Pass to hppa_match_insns. (hppa_skip_trampoline_code): Pass architecture to hppa_match_insns. (hppa_in_solib_call_trampoline): Add GDBARCH parameter. Pass to hppa_match_insns_relaxed. (hppa_stub_unwind_sniffer): Pass architecture to tdep->in_solib_call_trampoline callback. * hppa-hpux-tdep.c (hppa_hpux_search_pattern): Add GDBARCH parameter. (hppa32_hpux_search_dummy_call_sequence): Pass architecture to hppa_hpux_search_pattern. * hppa-linux-tdep.c (insns_match_pattern): Add GDBARCH parameter. (hppa_linux_sigtramp_find_sigcontext): Add GDBARCH parameter. Pass to insns_match_pattern. (hppa_linux_sigtramp_frame_unwind_cache): Pass architecture to hppa_linux_sigtramp_find_sigcontext. (hppa_linux_sigtramp_frame_sniffer): Likewise. (hppa32_hpux_in_solib_call_trampoline): Add GDBARCH parameter. (hppa64_hpux_in_solib_call_trampoline): Likewise. * i386-tdep.c (i386_follow_jump): Add GDBARCH parameter. (i386_analyze_frame_setup): Add GDBARCH parameter. (i386_analyze_prologue): Add GDBARCH parameter. Pass to i386_follow_jump and i386_analyze_frame_setup. (i386_skip_prologue): Pass architecture to i386_analyze_prologue and i386_follow_jump. (i386_frame_cache): Pass architecture to i386_analyze_prologue. (i386_pe_skip_trampoline_code): Add FRAME parameter. * i386-tdep.h (i386_pe_skip_trampoline_code): Add FRAME parameter. * i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): Pass frame to i386_pe_skip_trampoline_code. * ia64-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to sigcontext_register_address callback. * ia64-tdep.c (ia64_find_global_pointer): Add GDBARCH parameter. (ia64_find_unwind_table): Pass architecture to ia64_find_global_pointer. (find_extant_func_descr): Add GDBARCH parameter. (find_func_descr): Pass architecture to find_extant_func_descr and ia64_find_global_pointer. (ia64_sigtramp_frame_init_saved_regs): Pass architecture to tdep->sigcontext_register_address callback. * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Add GDBARCH parameter. * iq2000-tdep.c (iq2000_scan_prologue): Add GDBARCH parameter. (iq2000_frame_cache): Pass architecture to iq2000_scan_prologue. * lm32-tdep.c (lm32_analyze_prologue): Add GDBARCH parameter. (lm32_skip_prologue, lm32_frame_cache): Pass architecture to lm32_analyze_prologue. * m32r-tdep.c (decode_prologue): Add GDBARCH parameter. (m32r_skip_prologue): Pass architecture to decode_prologue. * m68hc11-tdep.c (m68hc11_analyze_instruction): Add GDBARCH parameter. (m68hc11_scan_prologue): Pass architecture to m68hc11_analyze_instruction. * m68k-tdep.c (m68k_analyze_frame_setup): Add GDBARCH parameter. (m68k_analyze_prologue): Pass architecture to m68k_analyze_frame_setup. * m88k-tdep.c (m88k_fetch_instruction): Add BYTE_ORDER parameter. (m88k_analyze_prologue): Add GDBARCH parameter. Pass byte order to m88k_fetch_instruction. (m88k_skip_prologue): Pass architecture to m88k_analyze_prologue. (m88k_frame_cache): Likewise. * mep-tdep.c (mep_get_insn): Add GDBARCH parameter. (mep_analyze_prologue): Pass architecture to mep_get_insn. * mips-tdep.c (mips_fetch_instruction): Add GDBARCH parameter. (mips32_next_pc): Pass architecture to mips_fetch_instruction. (deal_with_atomic_sequence): Likewise. (unpack_mips16): Add GDBARCH parameter, pass to mips_fetch_instruction. (mips16_scan_prologue): Likewise. (mips32_scan_prologue): Likewise. (mips16_in_function_epilogue_p): Likewise. (mips32_in_function_epilogue_p): Likewise. (mips_about_to_return): Likewise. (mips_insn16_frame_cache): Pass architecture to mips16_scan_prologue. (mips_insn32_frame_cache): Pass architecture to mips32_scan_prologue. (mips_skip_prologue): Pass architecture to mips16_scan_prologue and mips32_scan_prologue. (mips_in_function_epilogue_p): Pass architecture to mips16_in_function_epilogue_p and mips32_in_function_epilogue_p. (heuristic_proc_start): Pass architecture to mips_fetch_instruction and mips_about_to_return. (mips_skip_mips16_trampoline_code): Pass architecture to mips_fetch_instruction. (fetch_mips_16): Add GDBARCH parameter. (mips16_next_pc): Pass architecture to fetch_mips_16. (extended_mips16_next_pc): Pass architecture to unpack_mips16 and fetch_mips_16. * objc-lang.c (read_objc_method, read_objc_methlist_nmethods, read_objc_methlist_method, read_objc_object, read_objc_super, read_objc_class): Add GDBARCH parameter. (find_implementation_from_class): Add GDBARCH parameter, pass to read_objc_class, read_objc_methlist_nmethods, and read_objc_methlist_method. (find_implementation): Add GDBARCH parameter, pass to read_objc_object and find_implementation_from_class. (resolve_msgsend, resolve_msgsend_stret): Pass architecture to find_implementation. (resolve_msgsend_super, resolve_msgsend_super_stret): Pass architecture to read_objc_super and find_implementation_from_class. * ppc64-linux-tdep.c (ppc64_desc_entry_point): Add GDBARCH parameter. (ppc64_standard_linkage1_target, ppc64_standard_linkage2_target, ppc64_standard_linkage3_target): Pass architecture to ppc64_desc_entry_point. * rs6000-tdep.c (bl_to_blrl_insn_p): Add BYTE_ORDER parameter. (skip_prologue): Pass byte order to bl_to_blrl_insn_p. (rs6000_fetch_instruction): Add GDBARCH parameter. (rs6000_skip_stack_check): Add GDBARCH parameter, pass to rs6000_fetch_instruction. (skip_prologue): Pass architecture to rs6000_fetch_instruction. * remote-mips.c (mips_store_word): Return old_contents as host integer value instead of target bytes. * s390-tdep.c (struct s390_prologue_data): Add BYTE_ORDER member. (s390_analyze_prologue): Initialize it. (extend_simple_arg): Add GDBARCH parameter. (s390_push_dummy_call): Pass architecture to extend_simple_arg. * scm-lang.c (scm_get_field): Add BYTE_ORDER parameter. * scm-lang.h (scm_get_field): Add BYTE_ORDER parameter. (SCM_CAR, SCM_CDR): Pass SCM_BYTE_ORDER to scm_get_field. * scm-valprint.c (scm_scmval_print): Likewise. (scm_scmlist_print, scm_ipruk, scm_scmval_print): Define SCM_BYTE_ORDER. * sh64-tdep.c (look_for_args_moves): Add GDBARCH parameter. (sh64_skip_prologue_hard_way): Add GDBARCH parameter, pass to look_for_args_moves. (sh64_skip_prologue): Pass architecture to sh64_skip_prologue_hard_way. * sh-tdep.c (sh_analyze_prologue): Add GDBARCH parameter. (sh_skip_prologue): Pass architecture to sh_analyze_prologue. (sh_frame_cache): Likewise. * solib-irix.c (extract_mips_address): Add GDBARCH parameter. (fetch_lm_info, irix_current_sos, irix_open_symbol_file_object): Pass architecture to extract_mips_address. * sparc-tdep.h (sparc_fetch_wcookie): Add GDBARCH parameter. * sparc-tdep.c (sparc_fetch_wcookie): Add GDBARCH parameter. (sparc_supply_rwindow, sparc_collect_rwindow): Pass architecture to sparc_fetch_wcookie. (sparc32_frame_prev_register): Likewise. * sparc64-tdep.c (sparc64_frame_prev_register): Likewise. * sparc32nbsd-tdep.c (sparc32nbsd_sigcontext_saved_regs): Likewise. * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Likewise. * spu-tdep.c (spu_analyze_prologue): Add GDBARCH parameter. (spu_skip_prologue): Pass architecture to spu_analyze_prologue. (spu_virtual_frame_pointer): Likewise. (spu_frame_unwind_cache): Likewise. (info_spu_mailbox_list): Add BYTE_ORER parameter. (info_spu_mailbox_command): Pass byte order to info_spu_mailbox_list. (info_spu_dma_cmdlist): Add BYTE_ORER parameter. (info_spu_dma_command, info_spu_proxydma_command): Pass byte order to info_spu_dma_cmdlist. * symfile.c (read_target_long_array): Add GDBARCH parameter. (simple_read_overlay_table, simple_read_overlay_region_table, simple_overlay_update_1): Pass architecture to read_target_long_array. * v850-tdep.c (v850_analyze_prologue): Add GDBARCH parameter. (v850_frame_cache): Pass architecture to v850_analyze_prologue. * xstormy16-tdep.c (xstormy16_analyze_prologue): Add GDBARCH parameter. (xstormy16_skip_prologue, xstormy16_frame_cache): Pass architecture to xstormy16_analyze_prologue. (xstormy16_resolve_jmp_table_entry): Add GDBARCH parameter. (xstormy16_find_jmp_table_entry): Likewise. (xstormy16_skip_trampoline_code): Pass architecture to xstormy16_resolve_jmp_table_entry. (xstormy16_pointer_to_address): Likewise. (xstormy16_address_to_pointer): Pass architecture to xstormy16_find_jmp_table_entry. * xtensa-tdep.c (call0_track_op): Add GDBARCH parameter. (call0_analyze_prologue): Add GDBARCH parameter, pass to call0_track_op. (call0_frame_cache): Pass architecture to call0_analyze_prologue. (xtensa_skip_prologue): Likewise.
2009-07-02 19:25:59 +02:00
word_size, byte_order);
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
/* Determine our frame base. */
info->frame_base = prev_sp + 16*word_size + 32;
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
return info;
}
/* Implement this_id frame_unwind method for s390_sigtramp_frame_unwind. */
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
static void
s390_sigtramp_frame_this_id (struct frame_info *this_frame,
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
void **this_prologue_cache,
struct frame_id *this_id)
{
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
struct s390_sigtramp_unwind_cache *info
= s390_sigtramp_frame_unwind_cache (this_frame, this_prologue_cache);
*this_id = frame_id_build (info->frame_base, get_frame_pc (this_frame));
}
/* Implement prev_register frame_unwind method for sigtramp frames. */
static struct value *
s390_sigtramp_frame_prev_register (struct frame_info *this_frame,
void **this_prologue_cache, int regnum)
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
{
struct s390_sigtramp_unwind_cache *info
= s390_sigtramp_frame_unwind_cache (this_frame, this_prologue_cache);
return s390_trad_frame_prev_register (this_frame, info->saved_regs, regnum);
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
}
/* Implement sniffer frame_unwind method for sigtramp frames. */
static int
s390_sigtramp_frame_sniffer (const struct frame_unwind *self,
struct frame_info *this_frame,
void **this_prologue_cache)
{
CORE_ADDR pc = get_frame_pc (this_frame);
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
bfd_byte sigreturn[2];
if (target_read_memory (pc, sigreturn, 2))
return 0;
if (sigreturn[0] != op_svc)
return 0;
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
if (sigreturn[1] != 119 /* sigreturn */
&& sigreturn[1] != 173 /* rt_sigreturn */)
return 0;
return 1;
}
/* S390 sigtramp frame unwinder. */
static const struct frame_unwind s390_sigtramp_frame_unwind = {
SIGTRAMP_FRAME,
gdb/ * frame.c (frame_unwind_register): Throw an error if unwinding the register failed. * get_prev_frame_1 (get_prev_frame_1): Ask the unwinder if there's an unwind stop reason. (frame_stop_reason_string): Handle UNWIND_UNAVAILABLE. * frame.h (enum unwind_stop_reason) <UNWIND_OUTERMOST, UNWIND_UNAVAILABLE>: New. * inline-frame.c (inline_frame_unwind): Install default_frame_unwind_stop_reason. * frame-unwind.c: Include "exceptions.h". (frame_unwind_find_by_frame): Swallow NOT_AVAILABLE_ERROR errors. (default_frame_unwind_stop_reason): New. * frame-unwind.h (frame_unwind_stop_reason_ftype): New typedef. (default_frame_unwind_stop_reason): Declare. (struct frame_unwind) <stop_reason>: New function pointer. * dummy-frame.c: Install default_frame_unwind_stop_reason. * dwarf2-frame.c: Include exceptions.h. (struct dwarf2_frame_cache) <unavailable_retaddr>: New field. (dwarf2_frame_cache): Swallow NOT_AVAILABLE_ERROR errors when computing the CFA. If such an error was thrown, set unavailable_retaddr. (dwarf2_frame_unwind_stop_reason): New. (dwarf2_frame_this_id): Don't build a frame id if the CFA was unavailable. (dwarf2_frame_unwind): Install dwarf2_frame_unwind_stop_reason. (dwarf2_signal_frame_unwind): Ditto. * amd64-tdep.c: Include "exceptions.h". (struct amd64_frame_cache): New field "base_p". (amd64_init_frame_cache): Clear it. (amd64_frame_cache_1): New, factored out from amd64_frame_cache. Avoid reading registers with functions that throw if the register is not necessary to compute the frame base. (amd64_frame_cache): Reimplement wrapping amd64_frame_cache_1, and swallowing NOT_AVAILABLE_ERROR. (amd64_frame_unwind_stop_reason): New. (amd64_frame_this_id): Don't build a frame id if the frame base was unavailable. (amd64_frame_unwind): Install amd64_frame_unwind_stop_reason. (amd64_sigtramp_frame_cache): Swallow NOT_AVAILABLE_ERROR, and set base_p if the frame base was computable. (amd64_sigtramp_frame_unwind_stop_reason): New. (amd64_sigtramp_frame_this_id): Don't build a frame id if the frame base was unavailable. (amd64_sigtramp_frame_unwind): Install amd64_sigtramp_frame_unwind_stop_reason. (amd64_epilogue_frame_cache): Swallow NOT_AVAILABLE_ERROR, and set base_p if the frame base was computable. (amd64_epilogue_frame_unwind_stop_reason): New. (amd64_epilogue_frame_this_id): Don't build a frame id if the frame base was unavailable. (amd64_epilogue_frame_unwind): Install amd64_epilogue_frame_unwind_stop_reason. * i386-tdep.c: Include "exceptions.h". (struct i386_frame_cache): New field "base_p". (i386_init_frame_cache): Clear it. (i386_frame_cache_1): New, factored out from amd64_frame_cache. Avoid reading registers with functions that throw if the register is not necessary to compute the frame base. (i386_frame_cache): Reimplement wrapping amd64_frame_cache_1, and swallowing NOT_AVAILABLE_ERROR. (i386_frame_unwind_stop_reason): New. (i386_frame_this_id): Don't build a frame id if the frame base was unavailable. (i386_frame_prev_register): Handle unavailable SP. (i386_frame_unwind): Install i386_frame_unwind_stop_reason. (i386_epilogue_frame_cache): Swallow NOT_AVAILABLE_ERROR, and set base_p if the frame base was computable. (i386_epilogue_frame_unwind_stop_reason): New. (i386_epilogue_frame_this_id): Don't build a frame id if the frame base was unavailable. (i386_epilogue_frame_unwind): Install i386_epilogue_frame_unwind_stop_reason. (i386_sigtramp_frame_cache): Swallow NOT_AVAILABLE_ERROR, and set base_p if the frame base was computable. (i386_sigtramp_frame_unwind_stop_reason): New. (i386_sigtramp_frame_this_id): Don't build a frame id if the frame base was unavailable. (i386_sigtramp_frame_unwind): Install i386_sigtramp_frame_unwind_stop_reason. * sentinel-frame.c (sentinel_frame_prev_register): Use the value type's size, not the register's. (sentinel_frame_unwind): Install default_frame_unwind_stop_reason. * alpha-mdebug-tdep.c (alpha_mdebug_frame_unwind): Install default_frame_unwind_stop_reason. * alpha-tdep.c (alpha_sigtramp_frame_unwind) (alpha_heuristic_frame_unwind): Ditto. * amd64obsd-tdep.c (amd64obsd_trapframe_unwind): Ditto. * arm-tdep.c (arm_prologue_unwind, arm_stub_unwind): Ditto. * avr-tdep.c (avr_frame_unwind): Ditto. * cris-tdep.c (cris_sigtramp_frame_unwind, cris_frame_unwind): Ditto. * frv-linux-tdep.c (frv_linux_sigtramp_frame_unwind): Ditto. * frv-tdep.c (frv_frame_unwind): Ditto. * h8300-tdep.c (h8300_frame_unwind): Ditto. * hppa-hpux-tdep.c (hppa_hpux_sigtramp_frame_unwind): Ditto. * hppa-linux-tdep.c (hppa_linux_sigtramp_frame_unwind): Ditto. * hppa-tdep.c (hppa_frame_unwind, hppa_fallback_frame_unwind) (hppa_stub_frame_unwind): Ditto. * i386obsd-tdep.c (i386obsd_trapframe_unwind): Ditto. * ia64-tdep.c (ia64_frame_unwind, ia64_sigtramp_frame_unwind) (ia64_libunwind_frame_unwind) (ia64_libunwind_sigtramp_frame_unwind): Ditto. * iq2000-tdep.c (iq2000_frame_unwind): Ditto. * lm32-tdep.c (lm32_frame_unwind): Ditto. * m32c-tdep.c (m32c_unwind): Ditto. * m32r-linux-tdep.c (m32r_linux_sigtramp_frame_unwind): Ditto. * m32r-tdep.c (m32r_frame_unwind): Ditto. * m68hc11-tdep.c (m68hc11_frame_unwind): Ditto. * m68k-tdep.c (m68k_frame_unwind): Ditto. * m68klinux-tdep.c (m68k_linux_sigtramp_frame_unwind): Ditto. * m88k-tdep.c (m88k_frame_unwind): Ditto. * mep-tdep.c (mep_frame_unwind): Ditto. * microblaze-tdep.c (microblaze_frame_unwind): Ditto. * mips-tdep.c (mips_insn16_frame_unwind, mips_insn32_frame_unwind) (mips_stub_frame_unwind): Ditto. * mn10300-tdep.c (mn10300_frame_unwind): Ditto. * moxie-tdep.c (moxie_frame_unwind): Ditto. * mt-tdep.c (mt_frame_unwind): Ditto. * ppc-linux-tdep.c (ppu2spu_unwind): Ditto. * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_unwind): Ditto. * rs6000-tdep.c (rs6000_frame_unwind): Ditto. * s390-tdep.c (s390_frame_unwind, s390_stub_frame_unwind) (s390_sigtramp_frame_unwind): Ditto. * score-tdep.c (score_prologue_unwind): Ditto. * sh-tdep.c (sh_frame_unwind): Ditto. * sh64-tdep.c (sh64_frame_unwind): Ditto. * sparc-sol2-tdep.c (sparc32_sol2_sigtramp_frame_unwind): Ditto. * sparc-tdep.c (sparc32_frame_unwind): Ditto. * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_unwind): Ditto. * sparc64-tdep.c (sparc64_frame_unwind): Ditto. * sparc64fbsd-tdep.c (sparc64fbsd_sigtramp_frame_unwind): Ditto. * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_frame_unwind): Ditto. * sparc64obsd-tdep.c (sparc64obsd_frame_unwind) (sparc64obsd_trapframe_unwind): Ditto. * sparcnbsd-tdep.c (sparc32nbsd_sigcontext_frame_unwind): Ditto. * sparcobsd-tdep.c (sparc32obsd_sigtramp_frame_unwind): Ditto. * spu-tdep.c (spu_frame_unwind, spu2ppu_unwind): Ditto. * v850-tdep.c (v850_frame_unwind): Ditto. * vax-tdep.c (vax_frame_unwind): Ditto. * vaxobsd-tdep.c (vaxobsd_sigtramp_frame_unwind): Ditto. * xstormy16-tdep.c (frame_unwind xstormy16_frame_unwind): Ditto. * xtensa-tdep.c (xtensa_unwind): Ditto.
2011-03-18 19:52:32 +01:00
default_frame_unwind_stop_reason,
s390_sigtramp_frame_this_id,
s390_sigtramp_frame_prev_register,
NULL,
s390_sigtramp_frame_sniffer
};
/* Syscall handling. */
/* Retrieve the syscall number at a ptrace syscall-stop. Return -1
upon error. */
static LONGEST
s390_linux_get_syscall_number (struct gdbarch *gdbarch,
Use thread_info and inferior pointers more throughout This is more preparation bits for multi-target support. In a multi-target scenario, we need to address the case of different processes/threads running on different targets that happen to have the same PID/PTID. E.g., we can have both process 123 in target 1, and process 123 in target 2, while they're in reality different processes running on different machines. Or maybe we've loaded multiple instances of the same core file. Etc. To address this, in my WIP multi-target branch, threads and processes are uniquely identified by the (process_stratum target_ops *, ptid_t) and (process_stratum target_ops *, pid) tuples respectively. I.e., each process_stratum instance has its own thread/process number space. As you can imagine, that requires passing around target_ops * pointers in a number of functions where we're currently passing only a ptid_t or an int. E.g., when we look up a thread_info object by ptid_t in find_thread_ptid, the ptid_t alone isn't sufficient. In many cases though, we already have the thread_info or inferior pointer handy, but we "lose" it somewhere along the call stack, only to look it up again by ptid_t/pid. Since thread_info or inferior objects know their parent target, if we pass around thread_info or inferior pointers when possible, we avoid having to add extra target_ops parameters to many functions, and also, we eliminate a number of by ptid_t/int lookups. So that's what this patch does. In a bit more detail: - Changes a number of functions and methods to take a thread_info or inferior pointer instead of a ptid_t or int parameter. - Changes a number of structure fields from ptid_t/int to inferior or thread_info pointers. - Uses the inferior_thread() function whenever possible instead of inferior_ptid. - Uses thread_info pointers directly when possible instead of the is_running/is_stopped etc. routines that require a lookup. - A number of functions are eliminated along the way, such as: int valid_gdb_inferior_id (int num); int pid_to_gdb_inferior_id (int pid); int gdb_inferior_id_to_pid (int num); int in_inferior_list (int pid); - A few structures and places hold a thread_info pointer across inferior execution, so now they take a strong reference to the (refcounted) thread_info object to avoid the thread_info pointer getting stale. This is done in enable_thread_stack_temporaries and in the infcall.c code. - Related, there's a spot in infcall.c where using a RAII object to handle the refcount would be handy, so a gdb::ref_ptr specialization for thread_info is added (thread_info_ref, in gdbthread.h), along with a gdb_ref_ptr policy that works for all refcounted_object types (in common/refcounted-object.h). gdb/ChangeLog: 2018-06-21 Pedro Alves <palves@redhat.com> * ada-lang.h (ada_get_task_number): Take a thread_info pointer instead of a ptid_t. All callers adjusted. * ada-tasks.c (ada_get_task_number): Likewise. All callers adjusted. (print_ada_task_info, display_current_task_id, task_command_1): Adjust. * breakpoint.c (watchpoint_in_thread_scope): Adjust to use inferior_thread. (breakpoint_kind): Adjust. (remove_breakpoints_pid): Rename to ... (remove_breakpoints_inf): ... this. Adjust to take an inferior pointer. All callers adjusted. (bpstat_clear_actions): Use inferior_thread. (get_bpstat_thread): New. (bpstat_do_actions): Use it. (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust to take a thread_info pointer. All callers adjusted. (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint) (breakpoint_re_set_thread): Use inferior_thread. * breakpoint.h (struct inferior): Forward declare. (bpstat_stop_status): Update. (remove_breakpoints_pid): Delete. (remove_breakpoints_inf): New. * bsd-uthread.c (bsd_uthread_target::wait) (bsd_uthread_target::update_thread_list): Use find_thread_ptid. * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch) (maint_btrace_packet_history_cmd) (maint_btrace_clear_packet_history_cmd): Adjust. (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use inferior_thread. * cli/cli-interp.c: Include "inferior.h". * common/refcounted-object.h (struct refcounted_object_ref_policy): New. * compile/compile-object-load.c: Include gdbthread.h. (store_regs): Use inferior_thread. * corelow.c (core_target::close): Use current_inferior. (core_target_open): Adjust to use first_thread_of_inferior and use the current inferior. * ctf.c (ctf_target::close): Adjust to use current_inferior. * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ... <thread>: ... this new field. All references adjusted. (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor): Take a thread_info pointer instead of a ptid_t. * dummy-frame.h (dummy_frame_push, dummy_frame_pop) (dummy_frame_discard, register_dummy_frame_dtor): Take a thread_info pointer instead of a ptid_t. * elfread.c: Include "inferior.h". (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop): Use inferior_thread. * eval.c (evaluate_subexp): Likewise. * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use inferior_thread. * gdb_proc_service.h (struct thread_info): Forward declare. (struct ps_prochandle) <ptid>: Delete, replaced by ... <thread>: ... this new field. All references adjusted. * gdbarch.h, gdbarch.c: Regenerate. * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a 'thread' parameter. All implementations and callers adjusted. * gdbthread.h (thread_info) <set_running>: New method. (delete_thread, delete_thread_silent): Take a thread_info pointer instead of a ptid. (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete. (first_thread_of_process): Delete, replaced by ... (first_thread_of_inferior): ... this new function. All callers adjusted. (any_live_thread_of_process): Delete, replaced by ... (any_live_thread_of_inferior): ... this new function. All callers adjusted. (switch_to_thread, switch_to_no_thread): Declare. (is_executing): Delete. (enable_thread_stack_temporaries): Update comment. <enable_thread_stack_temporaries>: Take a thread_info pointer instead of a ptid_t. Incref the thread. <~enable_thread_stack_temporaries>: Decref the thread. <m_ptid>: Delete <m_thr>: New. (thread_stack_temporaries_enabled_p, push_thread_stack_temporary) (get_last_thread_stack_temporary) (value_in_thread_stack_temporaries, can_access_registers_thread): Take a thread_info pointer instead of a ptid_t. All callers adjusted. * infcall.c (get_call_return_value): Use inferior_thread. (run_inferior_call): Work with thread pointers instead of ptid_t. (call_function_by_hand_dummy): Work with thread pointers instead of ptid_t. Use thread_info_ref. * infcmd.c (proceed_thread_callback): Access thread's state directly. (ensure_valid_thread, ensure_not_running): Use inferior_thread, access thread's state directly. (continue_command): Use inferior_thread. (info_program_command): Use find_thread_ptid and access thread state directly. (proceed_after_attach_callback): Use thread state directly. (notice_new_inferior): Take a thread_info pointer instead of a ptid_t. All callers adjusted. (exit_inferior): Take an inferior pointer instead of a pid. All callers adjusted. (exit_inferior_silent): New. (detach_inferior): Delete. (valid_gdb_inferior_id, pid_to_gdb_inferior_id) (gdb_inferior_id_to_pid, in_inferior_list): Delete. (detach_inferior_command, kill_inferior_command): Use find_inferior_id instead of valid_gdb_inferior_id and gdb_inferior_id_to_pid. (inferior_command): Use inferior and thread pointers. * inferior.h (struct thread_info): Forward declare. (notice_new_inferior): Take a thread_info pointer instead of a ptid_t. All callers adjusted. (detach_inferior): Delete declaration. (exit_inferior, exit_inferior_silent): Take an inferior pointer instead of a pid. All callers adjusted. (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list) (valid_gdb_inferior_id): Delete. * infrun.c (follow_fork_inferior, proceed_after_vfork_done) (handle_vfork_child_exec_or_exit, follow_exec): Adjust. (struct displaced_step_inferior_state) <pid>: Delete, replaced by ... <inf>: ... this new field. <step_ptid>: Delete, replaced by ... <step_thread>: ... this new field. (get_displaced_stepping_state): Take an inferior pointer instead of a pid. All callers adjusted. (displaced_step_in_progress_any_inferior): Adjust. (displaced_step_in_progress_thread): Take a thread pointer instead of a ptid_t. All callers adjusted. (displaced_step_in_progress, add_displaced_stepping_state): Take an inferior pointer instead of a pid. All callers adjusted. (get_displaced_step_closure_by_addr): Adjust. (remove_displaced_stepping_state): Take an inferior pointer instead of a pid. All callers adjusted. (displaced_step_prepare_throw, displaced_step_prepare) (displaced_step_fixup): Take a thread pointer instead of a ptid_t. All callers adjusted. (start_step_over): Adjust. (infrun_thread_ptid_changed): Remove bit updating ptids in the displaced step queue. (do_target_resume): Adjust. (fetch_inferior_event): Use inferior_thread. (context_switch, get_inferior_stop_soon): Take an execution_control_state pointer instead of a ptid_t. All callers adjusted. (switch_to_thread_cleanup): Delete. (stop_all_threads): Use scoped_restore_current_thread. * inline-frame.c: Include "gdbthread.h". (inline_state) <inline_state>: Take a thread pointer instead of a ptid_t. All callers adjusted. <ptid>: Delete, replaced by ... <thread>: ... this new field. (find_inline_frame_state): Take a thread pointer instead of a ptid_t. All callers adjusted. (skip_inline_frames, step_into_inline_frame) (inline_skipped_frames, inline_skipped_symbol): Take a thread pointer instead of a ptid_t. All callers adjusted. * inline-frame.h (skip_inline_frames, step_into_inline_frame) (inline_skipped_frames, inline_skipped_symbol): Likewise. * linux-fork.c (delete_checkpoint_command): Adjust to use thread pointers directly. * linux-nat.c (get_detach_signal): Likewise. * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter. (thread_db_notice_clone): Adjust. (thread_db_find_new_threads_silently) (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take a thread pointer instead of a ptid_t. All callers adjusted. * mi/mi-cmd-var.c: Include "inferior.h". (mi_cmd_var_update_iter): Update to use thread pointers. * mi/mi-interp.c (mi_new_thread): Update to use the thread's inferior directly. (mi_output_running_pid, mi_inferior_count): Delete, bits factored out to ... (mi_output_running): ... this new function. (mi_on_resume_1): Adjust to use it. (mi_user_selected_context_changed): Adjust to use inferior_thread. * mi/mi-main.c (proceed_thread): Adjust to use thread pointers directly. (interrupt_thread_callback): : Adjust to use thread and inferior pointers. * proc-service.c: Include "gdbthread.h". (ps_pglobal_lookup): Adjust to use the thread's inferior directly. * progspace-and-thread.c: Include "inferior.h". * progspace.c: Include "inferior.h". * python/py-exitedevent.c (create_exited_event_object): Adjust to hold a reference to an inferior_object. * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use inferior_thread. * python/py-inferior.c (struct inferior_object): Give the type a tag name instead of a typedef. (python_on_normal_stop): No need to check if the current thread is listed. (inferior_to_inferior_object): Change return type to inferior_object. All callers adjusted. (find_thread_object): Delete, bits factored out to ... (thread_to_thread_object): ... this new function. * python/py-infthread.c (create_thread_object): Use inferior_to_inferior_object. (thpy_is_stopped): Use thread pointer directly. (gdbpy_selected_thread): Use inferior_thread. * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete field, replaced with ... <thread>: ... this new field. All users adjusted. (btpy_insn_or_gap_new): Drop const. (btpy_list_new): Take a thread pointer instead of a ptid_t. All callers adjusted. * python/py-record.c: Include "gdbthread.h". (recpy_insn_new, recpy_func_new): Take a thread pointer instead of a ptid_t. All callers adjusted. (gdbpy_current_recording): Use inferior_thread. * python/py-record.h (recpy_record_object) <ptid>: Delete field, replaced with ... <thread>: ... this new field. All users adjusted. (recpy_element_object) <ptid>: Delete field, replaced with ... <thread>: ... this new field. All users adjusted. (recpy_insn_new, recpy_func_new): Take a thread pointer instead of a ptid_t. All callers adjusted. * python/py-threadevent.c: Include "gdbthread.h". (get_event_thread): Use thread_to_thread_object. * python/python-internal.h (struct inferior_object): Forward declare. (find_thread_object, find_inferior_object): Delete declarations. (thread_to_thread_object, inferior_to_inferior_object): New declarations. * record-btrace.c: Include "inferior.h". (require_btrace_thread): Use inferior_thread. (record_btrace_frame_sniffer) (record_btrace_tailcall_frame_sniffer): Use inferior_thread. (get_thread_current_frame): Use scoped_restore_current_thread and switch_to_thread. (get_thread_current_frame): Use thread pointer directly. (record_btrace_replay_at_breakpoint): Use thread's inferior pointer directly. * record-full.c: Include "inferior.h". * regcache.c: Include "gdbthread.h". (get_thread_arch_regcache): Use the inferior's address space directly. (get_thread_regcache, registers_changed_thread): New. * regcache.h (get_thread_regcache(thread_info *thread)): New overload. (registers_changed_thread): New. (remote_target) <remote_detach_1>: Swap order of parameters. (remote_add_thread): <remote_add_thread>: Return the new thread. (get_remote_thread_info(ptid_t)): New overload. (remote_target::remote_notice_new_inferior): Use thread pointers directly. (remote_target::process_initial_stop_replies): Use thread_info::set_running. (remote_target::remote_detach_1, remote_target::detach) (extended_remote_target::detach): Adjust. * stack.c (frame_show_address): Use inferior_thread. * target-debug.h (target_debug_print_thread_info_pp): New. * target-delegates.c: Regenerate. * target.c (default_thread_address_space): Delete. (memory_xfer_partial_1): Use current_inferior. (target_detach): Use current_inferior. (target_thread_address_space): Delete. (generic_mourn_inferior): Use current_inferior. * target.h (struct target_ops) <thread_address_space>: Delete. (target_thread_address_space): Delete. * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread pointers directly. (delete_thread_1, delete_thread, delete_thread_silent): Take a thread pointer instead of a ptid_t. Adjust all callers. (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete. (first_thread_of_process): Delete, replaced by ... (first_thread_of_inferior): ... this new function. All callers adjusted. (any_thread_of_process): Rename to ... (any_thread_of_inferior): ... this, and take an inferior pointer. (any_live_thread_of_process): Rename to ... (any_live_thread_of_inferior): ... this, and take an inferior pointer. (thread_stack_temporaries_enabled_p, push_thread_stack_temporary) (value_in_thread_stack_temporaries) (get_last_thread_stack_temporary): Take a thread pointer instead of a ptid_t. Adjust all callers. (thread_info::set_running): New. (validate_registers_access): Use inferior_thread. (can_access_registers_ptid): Rename to ... (can_access_registers_thread): ... this, and take a thread pointer. (print_thread_info_1): Adjust to compare thread pointers instead of ptids. (switch_to_no_thread, switch_to_thread): Make extern. (scoped_restore_current_thread::~scoped_restore_current_thread): Use m_thread pointer directly. (scoped_restore_current_thread::scoped_restore_current_thread): Use inferior_thread. (thread_command): Use thread pointer directly. (thread_num_make_value_helper): Use inferior_thread. * top.c (execute_command): Use inferior_thread. * tui/tui-interp.c: Include "inferior.h". * varobj.c (varobj_create): Use inferior_thread. (value_of_root_1): Use find_thread_global_id instead of global_thread_id_to_ptid.
2018-06-21 18:09:31 +02:00
thread_info *thread)
{
Use thread_info and inferior pointers more throughout This is more preparation bits for multi-target support. In a multi-target scenario, we need to address the case of different processes/threads running on different targets that happen to have the same PID/PTID. E.g., we can have both process 123 in target 1, and process 123 in target 2, while they're in reality different processes running on different machines. Or maybe we've loaded multiple instances of the same core file. Etc. To address this, in my WIP multi-target branch, threads and processes are uniquely identified by the (process_stratum target_ops *, ptid_t) and (process_stratum target_ops *, pid) tuples respectively. I.e., each process_stratum instance has its own thread/process number space. As you can imagine, that requires passing around target_ops * pointers in a number of functions where we're currently passing only a ptid_t or an int. E.g., when we look up a thread_info object by ptid_t in find_thread_ptid, the ptid_t alone isn't sufficient. In many cases though, we already have the thread_info or inferior pointer handy, but we "lose" it somewhere along the call stack, only to look it up again by ptid_t/pid. Since thread_info or inferior objects know their parent target, if we pass around thread_info or inferior pointers when possible, we avoid having to add extra target_ops parameters to many functions, and also, we eliminate a number of by ptid_t/int lookups. So that's what this patch does. In a bit more detail: - Changes a number of functions and methods to take a thread_info or inferior pointer instead of a ptid_t or int parameter. - Changes a number of structure fields from ptid_t/int to inferior or thread_info pointers. - Uses the inferior_thread() function whenever possible instead of inferior_ptid. - Uses thread_info pointers directly when possible instead of the is_running/is_stopped etc. routines that require a lookup. - A number of functions are eliminated along the way, such as: int valid_gdb_inferior_id (int num); int pid_to_gdb_inferior_id (int pid); int gdb_inferior_id_to_pid (int num); int in_inferior_list (int pid); - A few structures and places hold a thread_info pointer across inferior execution, so now they take a strong reference to the (refcounted) thread_info object to avoid the thread_info pointer getting stale. This is done in enable_thread_stack_temporaries and in the infcall.c code. - Related, there's a spot in infcall.c where using a RAII object to handle the refcount would be handy, so a gdb::ref_ptr specialization for thread_info is added (thread_info_ref, in gdbthread.h), along with a gdb_ref_ptr policy that works for all refcounted_object types (in common/refcounted-object.h). gdb/ChangeLog: 2018-06-21 Pedro Alves <palves@redhat.com> * ada-lang.h (ada_get_task_number): Take a thread_info pointer instead of a ptid_t. All callers adjusted. * ada-tasks.c (ada_get_task_number): Likewise. All callers adjusted. (print_ada_task_info, display_current_task_id, task_command_1): Adjust. * breakpoint.c (watchpoint_in_thread_scope): Adjust to use inferior_thread. (breakpoint_kind): Adjust. (remove_breakpoints_pid): Rename to ... (remove_breakpoints_inf): ... this. Adjust to take an inferior pointer. All callers adjusted. (bpstat_clear_actions): Use inferior_thread. (get_bpstat_thread): New. (bpstat_do_actions): Use it. (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust to take a thread_info pointer. All callers adjusted. (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint) (breakpoint_re_set_thread): Use inferior_thread. * breakpoint.h (struct inferior): Forward declare. (bpstat_stop_status): Update. (remove_breakpoints_pid): Delete. (remove_breakpoints_inf): New. * bsd-uthread.c (bsd_uthread_target::wait) (bsd_uthread_target::update_thread_list): Use find_thread_ptid. * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch) (maint_btrace_packet_history_cmd) (maint_btrace_clear_packet_history_cmd): Adjust. (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use inferior_thread. * cli/cli-interp.c: Include "inferior.h". * common/refcounted-object.h (struct refcounted_object_ref_policy): New. * compile/compile-object-load.c: Include gdbthread.h. (store_regs): Use inferior_thread. * corelow.c (core_target::close): Use current_inferior. (core_target_open): Adjust to use first_thread_of_inferior and use the current inferior. * ctf.c (ctf_target::close): Adjust to use current_inferior. * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ... <thread>: ... this new field. All references adjusted. (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor): Take a thread_info pointer instead of a ptid_t. * dummy-frame.h (dummy_frame_push, dummy_frame_pop) (dummy_frame_discard, register_dummy_frame_dtor): Take a thread_info pointer instead of a ptid_t. * elfread.c: Include "inferior.h". (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop): Use inferior_thread. * eval.c (evaluate_subexp): Likewise. * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use inferior_thread. * gdb_proc_service.h (struct thread_info): Forward declare. (struct ps_prochandle) <ptid>: Delete, replaced by ... <thread>: ... this new field. All references adjusted. * gdbarch.h, gdbarch.c: Regenerate. * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a 'thread' parameter. All implementations and callers adjusted. * gdbthread.h (thread_info) <set_running>: New method. (delete_thread, delete_thread_silent): Take a thread_info pointer instead of a ptid. (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete. (first_thread_of_process): Delete, replaced by ... (first_thread_of_inferior): ... this new function. All callers adjusted. (any_live_thread_of_process): Delete, replaced by ... (any_live_thread_of_inferior): ... this new function. All callers adjusted. (switch_to_thread, switch_to_no_thread): Declare. (is_executing): Delete. (enable_thread_stack_temporaries): Update comment. <enable_thread_stack_temporaries>: Take a thread_info pointer instead of a ptid_t. Incref the thread. <~enable_thread_stack_temporaries>: Decref the thread. <m_ptid>: Delete <m_thr>: New. (thread_stack_temporaries_enabled_p, push_thread_stack_temporary) (get_last_thread_stack_temporary) (value_in_thread_stack_temporaries, can_access_registers_thread): Take a thread_info pointer instead of a ptid_t. All callers adjusted. * infcall.c (get_call_return_value): Use inferior_thread. (run_inferior_call): Work with thread pointers instead of ptid_t. (call_function_by_hand_dummy): Work with thread pointers instead of ptid_t. Use thread_info_ref. * infcmd.c (proceed_thread_callback): Access thread's state directly. (ensure_valid_thread, ensure_not_running): Use inferior_thread, access thread's state directly. (continue_command): Use inferior_thread. (info_program_command): Use find_thread_ptid and access thread state directly. (proceed_after_attach_callback): Use thread state directly. (notice_new_inferior): Take a thread_info pointer instead of a ptid_t. All callers adjusted. (exit_inferior): Take an inferior pointer instead of a pid. All callers adjusted. (exit_inferior_silent): New. (detach_inferior): Delete. (valid_gdb_inferior_id, pid_to_gdb_inferior_id) (gdb_inferior_id_to_pid, in_inferior_list): Delete. (detach_inferior_command, kill_inferior_command): Use find_inferior_id instead of valid_gdb_inferior_id and gdb_inferior_id_to_pid. (inferior_command): Use inferior and thread pointers. * inferior.h (struct thread_info): Forward declare. (notice_new_inferior): Take a thread_info pointer instead of a ptid_t. All callers adjusted. (detach_inferior): Delete declaration. (exit_inferior, exit_inferior_silent): Take an inferior pointer instead of a pid. All callers adjusted. (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list) (valid_gdb_inferior_id): Delete. * infrun.c (follow_fork_inferior, proceed_after_vfork_done) (handle_vfork_child_exec_or_exit, follow_exec): Adjust. (struct displaced_step_inferior_state) <pid>: Delete, replaced by ... <inf>: ... this new field. <step_ptid>: Delete, replaced by ... <step_thread>: ... this new field. (get_displaced_stepping_state): Take an inferior pointer instead of a pid. All callers adjusted. (displaced_step_in_progress_any_inferior): Adjust. (displaced_step_in_progress_thread): Take a thread pointer instead of a ptid_t. All callers adjusted. (displaced_step_in_progress, add_displaced_stepping_state): Take an inferior pointer instead of a pid. All callers adjusted. (get_displaced_step_closure_by_addr): Adjust. (remove_displaced_stepping_state): Take an inferior pointer instead of a pid. All callers adjusted. (displaced_step_prepare_throw, displaced_step_prepare) (displaced_step_fixup): Take a thread pointer instead of a ptid_t. All callers adjusted. (start_step_over): Adjust. (infrun_thread_ptid_changed): Remove bit updating ptids in the displaced step queue. (do_target_resume): Adjust. (fetch_inferior_event): Use inferior_thread. (context_switch, get_inferior_stop_soon): Take an execution_control_state pointer instead of a ptid_t. All callers adjusted. (switch_to_thread_cleanup): Delete. (stop_all_threads): Use scoped_restore_current_thread. * inline-frame.c: Include "gdbthread.h". (inline_state) <inline_state>: Take a thread pointer instead of a ptid_t. All callers adjusted. <ptid>: Delete, replaced by ... <thread>: ... this new field. (find_inline_frame_state): Take a thread pointer instead of a ptid_t. All callers adjusted. (skip_inline_frames, step_into_inline_frame) (inline_skipped_frames, inline_skipped_symbol): Take a thread pointer instead of a ptid_t. All callers adjusted. * inline-frame.h (skip_inline_frames, step_into_inline_frame) (inline_skipped_frames, inline_skipped_symbol): Likewise. * linux-fork.c (delete_checkpoint_command): Adjust to use thread pointers directly. * linux-nat.c (get_detach_signal): Likewise. * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter. (thread_db_notice_clone): Adjust. (thread_db_find_new_threads_silently) (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take a thread pointer instead of a ptid_t. All callers adjusted. * mi/mi-cmd-var.c: Include "inferior.h". (mi_cmd_var_update_iter): Update to use thread pointers. * mi/mi-interp.c (mi_new_thread): Update to use the thread's inferior directly. (mi_output_running_pid, mi_inferior_count): Delete, bits factored out to ... (mi_output_running): ... this new function. (mi_on_resume_1): Adjust to use it. (mi_user_selected_context_changed): Adjust to use inferior_thread. * mi/mi-main.c (proceed_thread): Adjust to use thread pointers directly. (interrupt_thread_callback): : Adjust to use thread and inferior pointers. * proc-service.c: Include "gdbthread.h". (ps_pglobal_lookup): Adjust to use the thread's inferior directly. * progspace-and-thread.c: Include "inferior.h". * progspace.c: Include "inferior.h". * python/py-exitedevent.c (create_exited_event_object): Adjust to hold a reference to an inferior_object. * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use inferior_thread. * python/py-inferior.c (struct inferior_object): Give the type a tag name instead of a typedef. (python_on_normal_stop): No need to check if the current thread is listed. (inferior_to_inferior_object): Change return type to inferior_object. All callers adjusted. (find_thread_object): Delete, bits factored out to ... (thread_to_thread_object): ... this new function. * python/py-infthread.c (create_thread_object): Use inferior_to_inferior_object. (thpy_is_stopped): Use thread pointer directly. (gdbpy_selected_thread): Use inferior_thread. * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete field, replaced with ... <thread>: ... this new field. All users adjusted. (btpy_insn_or_gap_new): Drop const. (btpy_list_new): Take a thread pointer instead of a ptid_t. All callers adjusted. * python/py-record.c: Include "gdbthread.h". (recpy_insn_new, recpy_func_new): Take a thread pointer instead of a ptid_t. All callers adjusted. (gdbpy_current_recording): Use inferior_thread. * python/py-record.h (recpy_record_object) <ptid>: Delete field, replaced with ... <thread>: ... this new field. All users adjusted. (recpy_element_object) <ptid>: Delete field, replaced with ... <thread>: ... this new field. All users adjusted. (recpy_insn_new, recpy_func_new): Take a thread pointer instead of a ptid_t. All callers adjusted. * python/py-threadevent.c: Include "gdbthread.h". (get_event_thread): Use thread_to_thread_object. * python/python-internal.h (struct inferior_object): Forward declare. (find_thread_object, find_inferior_object): Delete declarations. (thread_to_thread_object, inferior_to_inferior_object): New declarations. * record-btrace.c: Include "inferior.h". (require_btrace_thread): Use inferior_thread. (record_btrace_frame_sniffer) (record_btrace_tailcall_frame_sniffer): Use inferior_thread. (get_thread_current_frame): Use scoped_restore_current_thread and switch_to_thread. (get_thread_current_frame): Use thread pointer directly. (record_btrace_replay_at_breakpoint): Use thread's inferior pointer directly. * record-full.c: Include "inferior.h". * regcache.c: Include "gdbthread.h". (get_thread_arch_regcache): Use the inferior's address space directly. (get_thread_regcache, registers_changed_thread): New. * regcache.h (get_thread_regcache(thread_info *thread)): New overload. (registers_changed_thread): New. (remote_target) <remote_detach_1>: Swap order of parameters. (remote_add_thread): <remote_add_thread>: Return the new thread. (get_remote_thread_info(ptid_t)): New overload. (remote_target::remote_notice_new_inferior): Use thread pointers directly. (remote_target::process_initial_stop_replies): Use thread_info::set_running. (remote_target::remote_detach_1, remote_target::detach) (extended_remote_target::detach): Adjust. * stack.c (frame_show_address): Use inferior_thread. * target-debug.h (target_debug_print_thread_info_pp): New. * target-delegates.c: Regenerate. * target.c (default_thread_address_space): Delete. (memory_xfer_partial_1): Use current_inferior. (target_detach): Use current_inferior. (target_thread_address_space): Delete. (generic_mourn_inferior): Use current_inferior. * target.h (struct target_ops) <thread_address_space>: Delete. (target_thread_address_space): Delete. * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread pointers directly. (delete_thread_1, delete_thread, delete_thread_silent): Take a thread pointer instead of a ptid_t. Adjust all callers. (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete. (first_thread_of_process): Delete, replaced by ... (first_thread_of_inferior): ... this new function. All callers adjusted. (any_thread_of_process): Rename to ... (any_thread_of_inferior): ... this, and take an inferior pointer. (any_live_thread_of_process): Rename to ... (any_live_thread_of_inferior): ... this, and take an inferior pointer. (thread_stack_temporaries_enabled_p, push_thread_stack_temporary) (value_in_thread_stack_temporaries) (get_last_thread_stack_temporary): Take a thread pointer instead of a ptid_t. Adjust all callers. (thread_info::set_running): New. (validate_registers_access): Use inferior_thread. (can_access_registers_ptid): Rename to ... (can_access_registers_thread): ... this, and take a thread pointer. (print_thread_info_1): Adjust to compare thread pointers instead of ptids. (switch_to_no_thread, switch_to_thread): Make extern. (scoped_restore_current_thread::~scoped_restore_current_thread): Use m_thread pointer directly. (scoped_restore_current_thread::scoped_restore_current_thread): Use inferior_thread. (thread_command): Use thread pointer directly. (thread_num_make_value_helper): Use inferior_thread. * top.c (execute_command): Use inferior_thread. * tui/tui-interp.c: Include "inferior.h". * varobj.c (varobj_create): Use inferior_thread. (value_of_root_1): Use find_thread_global_id instead of global_thread_id_to_ptid.
2018-06-21 18:09:31 +02:00
struct regcache *regs = get_thread_regcache (thread);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST pc;
ULONGEST svc_number = -1;
unsigned opcode;
/* Assume that the PC points after the 2-byte SVC instruction. We
don't currently support SVC via EXECUTE. */
regcache_cooked_read_unsigned (regs, tdep->pc_regnum, &pc);
pc -= 2;
opcode = read_memory_unsigned_integer ((CORE_ADDR) pc, 1, byte_order);
if (opcode != op_svc)
return -1;
svc_number = read_memory_unsigned_integer ((CORE_ADDR) pc + 1, 1,
byte_order);
if (svc_number == 0)
regcache_cooked_read_unsigned (regs, S390_R1_REGNUM, &svc_number);
return svc_number;
}
/* Process record-replay */
static struct linux_record_tdep s390_linux_record_tdep;
static struct linux_record_tdep s390x_linux_record_tdep;
/* Record all registers but PC register for process-record. */
static int
s390_all_but_pc_registers_record (struct regcache *regcache)
{
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.
2017-10-25 17:37:03 +02:00
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int i;
for (i = 0; i < 16; i++)
{
if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + i))
return -1;
if (record_full_arch_list_add_reg (regcache, S390_A0_REGNUM + i))
return -1;
if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + i))
return -1;
if (tdep->gpr_full_regnum != -1)
if (record_full_arch_list_add_reg (regcache, S390_R0_UPPER_REGNUM + i))
return -1;
if (tdep->v0_full_regnum != -1)
{
if (record_full_arch_list_add_reg (regcache, S390_V0_LOWER_REGNUM + i))
return -1;
if (record_full_arch_list_add_reg (regcache, S390_V16_REGNUM + i))
return -1;
}
}
if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
return -1;
if (record_full_arch_list_add_reg (regcache, S390_FPC_REGNUM))
return -1;
return 0;
}
/* Canonicalize system call SYSCALL belonging to ABI. Helper for
s390_linux_syscall_record. */
static enum gdb_syscall
s390_canonicalize_syscall (int syscall, enum s390_abi_kind abi)
{
switch (syscall)
{
/* s390 syscall numbers < 222 are mostly the same as x86, so just list
the exceptions. */
case 0:
return gdb_sys_no_syscall;
case 7:
return gdb_sys_restart_syscall;
/* These syscalls work only on 31-bit. */
case 13: /* time */
case 16: /* lchown[16] */
case 23: /* setuid[16] */
case 24: /* getuid[16] */
case 25: /* stime */
case 46: /* setgid[16] */
case 47: /* getgid[16] */
case 49: /* seteuid[16] */
case 50: /* getegid[16] */
case 70: /* setreuid[16] */
case 71: /* setregid[16] */
case 76: /* [old_]getrlimit */
case 80: /* getgroups[16] */
case 81: /* setgroups[16] */
case 95: /* fchown[16] */
case 101: /* ioperm */
case 138: /* setfsuid[16] */
case 139: /* setfsgid[16] */
case 140: /* _llseek */
case 164: /* setresuid[16] */
case 165: /* getresuid[16] */
case 170: /* setresgid[16] */
case 171: /* getresgid[16] */
case 182: /* chown[16] */
case 192: /* mmap2 */
case 193: /* truncate64 */
case 194: /* ftruncate64 */
case 195: /* stat64 */
case 196: /* lstat64 */
case 197: /* fstat64 */
case 221: /* fcntl64 */
if (abi == ABI_LINUX_S390)
return (enum gdb_syscall) syscall;
return gdb_sys_no_syscall;
/* These syscalls don't exist on s390. */
case 17: /* break */
case 18: /* oldstat */
case 28: /* oldfstat */
case 31: /* stty */
case 32: /* gtty */
case 35: /* ftime */
case 44: /* prof */
case 53: /* lock */
case 56: /* mpx */
case 58: /* ulimit */
case 59: /* oldolduname */
case 68: /* sgetmask */
case 69: /* ssetmask */
case 82: /* [old_]select */
case 84: /* oldlstat */
case 98: /* profil */
case 109: /* olduname */
case 113: /* vm86old */
case 123: /* modify_ldt */
case 166: /* vm86 */
return gdb_sys_no_syscall;
case 110:
return gdb_sys_lookup_dcookie;
/* Here come the differences. */
case 222:
return gdb_sys_readahead;
case 223:
if (abi == ABI_LINUX_S390)
return gdb_sys_sendfile64;
return gdb_sys_no_syscall;
/* 224-235 handled below */
case 236:
return gdb_sys_gettid;
case 237:
return gdb_sys_tkill;
case 238:
return gdb_sys_futex;
case 239:
return gdb_sys_sched_setaffinity;
case 240:
return gdb_sys_sched_getaffinity;
case 241:
return gdb_sys_tgkill;
/* 242 reserved */
case 243:
return gdb_sys_io_setup;
case 244:
return gdb_sys_io_destroy;
case 245:
return gdb_sys_io_getevents;
case 246:
return gdb_sys_io_submit;
case 247:
return gdb_sys_io_cancel;
case 248:
return gdb_sys_exit_group;
case 249:
return gdb_sys_epoll_create;
case 250:
return gdb_sys_epoll_ctl;
case 251:
return gdb_sys_epoll_wait;
case 252:
return gdb_sys_set_tid_address;
case 253:
return gdb_sys_fadvise64;
/* 254-262 handled below */
/* 263 reserved */
case 264:
if (abi == ABI_LINUX_S390)
return gdb_sys_fadvise64_64;
return gdb_sys_no_syscall;
case 265:
return gdb_sys_statfs64;
case 266:
return gdb_sys_fstatfs64;
case 267:
return gdb_sys_remap_file_pages;
/* 268-270 reserved */
/* 271-277 handled below */
case 278:
return gdb_sys_add_key;
case 279:
return gdb_sys_request_key;
case 280:
return gdb_sys_keyctl;
case 281:
return gdb_sys_waitid;
/* 282-312 handled below */
case 293:
if (abi == ABI_LINUX_S390)
return gdb_sys_fstatat64;
return gdb_sys_newfstatat;
/* 313+ not yet supported */
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
default:
{
int ret;
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
/* Most "old" syscalls copied from i386. */
if (syscall <= 221)
ret = syscall;
/* xattr syscalls. */
else if (syscall >= 224 && syscall <= 235)
ret = syscall + 2;
/* timer syscalls. */
else if (syscall >= 254 && syscall <= 262)
ret = syscall + 5;
/* mq_* and kexec_load */
else if (syscall >= 271 && syscall <= 277)
ret = syscall + 6;
/* ioprio_set .. epoll_pwait */
else if (syscall >= 282 && syscall <= 312)
ret = syscall + 7;
else
ret = gdb_sys_no_syscall;
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
return (enum gdb_syscall) ret;
}
}
}
/* Record a system call. Returns 0 on success, -1 otherwise.
Helper function for s390_process_record. */
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
static int
s390_linux_syscall_record (struct regcache *regcache, LONGEST syscall_native)
{
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int ret;
enum gdb_syscall syscall_gdb;
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
/* On s390, syscall number can be passed either as immediate field of svc
instruction, or in %r1 (with svc 0). */
if (syscall_native == 0)
regcache_raw_read_signed (regcache, S390_R1_REGNUM, &syscall_native);
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
syscall_gdb = s390_canonicalize_syscall (syscall_native, tdep->abi);
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (syscall_gdb < 0)
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c (struct gdbarch_tdep): Add 'abi' member. (S390_STACK_FRAME_OVERHEAD): Remove. (S390_STACK_PARAMETER_ALIGNMENT): Remove. (S390_NUM_FP_PARAMETER_REGISTERS): Remove. (s390_promote_integer_argument): Remove. (s390_cannot_extract_struct_value_address): Remove. (s390_use_struct_convention, s390_store_struct_return): Remove. (s390_extract_return_value, s390_store_return_value): Remove. (s390_return_value_convention, s390_return_value): New functions. (is_float_singleton): Handle typedefs. (is_double_or_float, is_double_arg, is_simple_arg, pass_by_copy_ref): Remove, replace by ... (s390_function_arg_pass_by_reference, s390_function_arg_float, s390_function_arg_integer): ... these new functions. (s390_push_arguments, s390_push_return_address): Remove, replace by ... (s390_push_dummy_call, s390_unwind_dummy_id): ... these new functions. (s390_gdbarch_init): Remove s390_call_dummy_words and elf_flags. Fill in tdep->abi. Remove calls to: set_gdbarch_deprecated_store_struct_return, set_gdbarch_deprecated_extract_return_value, set_gdbarch_deprecated_store_return_value, set_gdbarch_use_struct_convention, set_gdbarch_extract_struct_value_address, set_gdbarch_deprecated_pc_in_call_dummy, set_gdbarch_deprecated_push_arguments, set_gdbarch_deprecated_save_dummy_frame_tos, set_gdbarch_deprecated_push_return_address, set_gdbarch_deprecated_sizeof_call_dummy_words, set_gdbarch_deprecated_call_dummy_words, set_gdbarch_deprecated_dummy_write_sp. Add calls to: set_gdbarch_push_dummy_call, set_gdbarch_unwind_dummy_id, set_gdbarch_return_value.
2004-02-18 04:54:11 +01:00
{
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
printf_unfiltered (_("Process record and replay target doesn't "
"support syscall number %s\n"),
plongest (syscall_native));
return -1;
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c (struct gdbarch_tdep): Add 'abi' member. (S390_STACK_FRAME_OVERHEAD): Remove. (S390_STACK_PARAMETER_ALIGNMENT): Remove. (S390_NUM_FP_PARAMETER_REGISTERS): Remove. (s390_promote_integer_argument): Remove. (s390_cannot_extract_struct_value_address): Remove. (s390_use_struct_convention, s390_store_struct_return): Remove. (s390_extract_return_value, s390_store_return_value): Remove. (s390_return_value_convention, s390_return_value): New functions. (is_float_singleton): Handle typedefs. (is_double_or_float, is_double_arg, is_simple_arg, pass_by_copy_ref): Remove, replace by ... (s390_function_arg_pass_by_reference, s390_function_arg_float, s390_function_arg_integer): ... these new functions. (s390_push_arguments, s390_push_return_address): Remove, replace by ... (s390_push_dummy_call, s390_unwind_dummy_id): ... these new functions. (s390_gdbarch_init): Remove s390_call_dummy_words and elf_flags. Fill in tdep->abi. Remove calls to: set_gdbarch_deprecated_store_struct_return, set_gdbarch_deprecated_extract_return_value, set_gdbarch_deprecated_store_return_value, set_gdbarch_use_struct_convention, set_gdbarch_extract_struct_value_address, set_gdbarch_deprecated_pc_in_call_dummy, set_gdbarch_deprecated_push_arguments, set_gdbarch_deprecated_save_dummy_frame_tos, set_gdbarch_deprecated_push_return_address, set_gdbarch_deprecated_sizeof_call_dummy_words, set_gdbarch_deprecated_call_dummy_words, set_gdbarch_deprecated_dummy_write_sp. Add calls to: set_gdbarch_push_dummy_call, set_gdbarch_unwind_dummy_id, set_gdbarch_return_value.
2004-02-18 04:54:11 +01:00
}
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (syscall_gdb == gdb_sys_sigreturn
|| syscall_gdb == gdb_sys_rt_sigreturn)
{
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (s390_all_but_pc_registers_record (regcache))
return -1;
return 0;
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c (struct gdbarch_tdep): Add 'abi' member. (S390_STACK_FRAME_OVERHEAD): Remove. (S390_STACK_PARAMETER_ALIGNMENT): Remove. (S390_NUM_FP_PARAMETER_REGISTERS): Remove. (s390_promote_integer_argument): Remove. (s390_cannot_extract_struct_value_address): Remove. (s390_use_struct_convention, s390_store_struct_return): Remove. (s390_extract_return_value, s390_store_return_value): Remove. (s390_return_value_convention, s390_return_value): New functions. (is_float_singleton): Handle typedefs. (is_double_or_float, is_double_arg, is_simple_arg, pass_by_copy_ref): Remove, replace by ... (s390_function_arg_pass_by_reference, s390_function_arg_float, s390_function_arg_integer): ... these new functions. (s390_push_arguments, s390_push_return_address): Remove, replace by ... (s390_push_dummy_call, s390_unwind_dummy_id): ... these new functions. (s390_gdbarch_init): Remove s390_call_dummy_words and elf_flags. Fill in tdep->abi. Remove calls to: set_gdbarch_deprecated_store_struct_return, set_gdbarch_deprecated_extract_return_value, set_gdbarch_deprecated_store_return_value, set_gdbarch_use_struct_convention, set_gdbarch_extract_struct_value_address, set_gdbarch_deprecated_pc_in_call_dummy, set_gdbarch_deprecated_push_arguments, set_gdbarch_deprecated_save_dummy_frame_tos, set_gdbarch_deprecated_push_return_address, set_gdbarch_deprecated_sizeof_call_dummy_words, set_gdbarch_deprecated_call_dummy_words, set_gdbarch_deprecated_dummy_write_sp. Add calls to: set_gdbarch_push_dummy_call, set_gdbarch_unwind_dummy_id, set_gdbarch_return_value.
2004-02-18 04:54:11 +01:00
}
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (tdep->abi == ABI_LINUX_ZSERIES)
ret = record_linux_system_call (syscall_gdb, regcache,
&s390x_linux_record_tdep);
else
ret = record_linux_system_call (syscall_gdb, regcache,
&s390_linux_record_tdep);
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c: Include "trad-frame.h", "frame-base.h", and "frame-unwind.h". (s390_readinstruction): Reformat. Use read_memory_nobpt. (GDB_TARGET_IS_ESAME, S390_GPR_SIZE, S390_FPR_SIZE): Remove. (S390_SYSCALL_OPCODE, S390_SYSCALL_SIZE): Remove. (S390_SIGCONTEXT_SREGS_OFFSET, S390X_SIGCONTEXT_SREGS_OFFSET, S390_SIGREGS_FP0_OFFSET, S390X_SIGREGS_FP0_OFFSET, S390_UC_MCONTEXT_OFFSET, S390X_UC_MCONTEXT_OFFSET, S390_SIGNAL_FRAMESIZE, s390_NR_sigreturn, s390_NR_rt_sigreturn): Remove. (struct frame_extra_info): Remove. (s390_memset_extra_info): Remove. (op_*, op1_*, op2_* enums): Add several new opcodes. (is_rse): Renamed to ... (is_rsy): ... this. Support long displacements. (is_rxe): Renamed to ... (is_rxy): ... this. Support long displacements. (compute_x_addr): Support long displacements. (struct s390_prologue_data): New data type. (s390_on_stack): Change API to use struct s390_prologue_data. (s390_store): Reimplement. (s390_load): New function. (s390_get_signal_frame_info): Remove. (s390_get_frame_info): Remove, replace by ... (s390_analyze_prolog): ... this new function. (s390_check_function_end): Remove. (s390_function_start): Remove. (s390_frameless_function_invokation): Remove. (s390_is_sigreturn): Remove. (s390_init_frame_pc_first): Remove. (s390_init_frame_extra_info): Remove. (s390_frame_init_saved_regs): Remove. (s390_frame_saved_pc_nofix): Remove. (s390_frame_saved_pc): Remove. (s390_frame_chain): Remove. (s390_fp_regnum, s390_read_fp): Remove. (s390_pop_frame_regular, s390_pop_frame): Remove. (s390_saved_pc_after_call): Remove. (s390_skip_prologue): Reimplement. (s390_in_function_epilogue_p): Support long displacements. (struct s390_unwind_cache): New data structure. (s390_frame_unwind_cache): New function. (s390_prologue_frame_unwind_cache): Likewise. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_this_id, s390_frame_prev_register): Likewise. (s390_frame_unwind): Define. (s390_frame_sniffer): New function. (struct s390_pltstub_unwind_cache): New data structure. (s390_pltstub_frame_unwind_cache): New function. (s390_pltstub_frame_this_id): Likewise. (s390_pltstub_frame_prev_register): Likewise. (s390_pltstub_frame_unwind): Define. (s390_pltstub_frame_sniffer): New function. (struct s390_sigtramp_unwind_cache): New data structure. (s390_sigtramp_frame_unwind_cache): New function. (s390_sigtramp_frame_this_id): Likewise. (s390_sigtramp_frame_prev_register): Likewise. (s390_sigtramp_frame_unwind): Define. (s390_sigtramp_frame_sniffer): New function. (s390_frame_base_address, s390_local_base_address): New functions. (s390_frame_base): Define. (s390_unwind_pc, s390_unwind_sp): New function. (s390_push_dummy_call): Use new frame base location. (s390_unwind_dummy_id): Likewise. (s390_gdbarch_init): Remove calls to: set_gdbarch_frameless_function_invocation, set_gdbarch_deprecated_init_frame_pc, set_gdbarch_deprecated_frame_chain, set_gdbarch_deprecated_frame_init_saved_regs, set_gdbarch_deprecated_pop_frame, set_gdbarch_deprecated_init_extra_frame_info, set_gdbarch_deprecated_init_frame_pc_first, set_gdbarch_deprecated_target_read_fp, set_gdbarch_deprecated_frame_saved_pc, set_gdbarch_deprecated_saved_pc_after_call, set_gdbarch_deprecated_fp_regnum. Add calls to: set_gdbarch_in_solib_call_trampoline, frame_unwind_append_sniffer, frame_base_set_default, set_gdbarch_unwind_pc, set_gdbarch_unwind_sp. * Makefile.in (s390-tdep.o): Update dependencies.
2004-02-18 05:07:48 +01:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (ret)
return ret;
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
/* Record the return value of the system call. */
if (record_full_arch_list_add_reg (regcache, S390_R2_REGNUM))
return -1;
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
return 0;
}
/* Implement process_record_signal gdbarch method. */
static int
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
s390_linux_record_signal (struct gdbarch *gdbarch, struct regcache *regcache,
enum gdb_signal signal)
{
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
/* There are two kinds of signal frames on s390. rt_sigframe is always
the larger one, so don't even bother with sigframe. */
const int sizeof_rt_sigframe = (tdep->abi == ABI_LINUX_ZSERIES ?
160 + 8 + 128 + 1024 : 96 + 8 + 128 + 1000);
ULONGEST sp;
int i;
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
for (i = 0; i < 16; i++)
{
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + i))
return -1;
if (tdep->gpr_full_regnum != -1)
if (record_full_arch_list_add_reg (regcache, S390_R0_UPPER_REGNUM + i))
return -1;
}
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (record_full_arch_list_add_reg (regcache, S390_PSWA_REGNUM))
return -1;
if (record_full_arch_list_add_reg (regcache, S390_PSWM_REGNUM))
return -1;
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
/* Record the change in the stack.
frame-size = sizeof (struct rt_sigframe) + SIGNAL_FRAMESIZE */
regcache_raw_read_unsigned (regcache, S390_SP_REGNUM, &sp);
sp -= sizeof_rt_sigframe;
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (record_full_arch_list_add_mem (sp, sizeof_rt_sigframe))
return -1;
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
if (record_full_arch_list_add_end ())
return -1;
2012-04-27 Sergio Durigan Junior <sergiodj@redhat.com> Tom Tromey <tromey@redhat.com> Jan Kratochvil <jan.kratochvil@redhat.com> * Makefile.in (SFILES): Add `probe' and `stap-probe'. (COMMON_OBS): Likewise. (HFILES_NO_SRCDIR): Add `probe'. * NEWS: Mention support for static and SystemTap probes. * amd64-tdep.c (amd64_init_abi): Initializing proper fields used by SystemTap probes' arguments parser. * arm-linux-tdep.c: Including headers needed to perform the parsing of SystemTap probes' arguments. (arm_stap_is_single_operand): New function. (arm_stap_parse_special_token): Likewise. (arm_linux_init_abi): Initializing proper fields used by SystemTap probes' arguments parser. * ax-gdb.c (require_rvalue): Removing static declaration. (gen_expr): Likewise. * ax-gdb.h (gen_expr): Declaring function. (require_rvalue): Likewise. * breakpoint.c: Include `gdb_regex.h' and `probe.h'. (bkpt_probe_breakpoint_ops): New variable. (momentary_breakpoint_from_master): Set the `probe' value. (add_location_to_breakpoint): Likewise. (break_command_1): Using proper breakpoint_ops according to the argument passed by the user in the command line. (bkpt_probe_insert_location): New function. (bkpt_probe_remove_location): Likewise. (bkpt_probe_create_sals_from_address): Likewise. (bkpt_probe_decode_linespec): Likewise. (tracepoint_probe_create_sals_from_address): Likewise. (tracepoint_probe_decode_linespec): Likewise. (tracepoint_probe_breakpoint_ops): New variable. (trace_command): Using proper breakpoint_ops according to the argument passed by the user in the command line. (initialize_breakpoint_ops): Initializing breakpoint_ops for static probes on breakpoints and tracepoints. * breakpoint.h (struct bp_location) <probe>: New field. * cli-utils.c (skip_spaces_const): New function. (extract_arg): Likewise. * cli-utils.h (skip_spaces_const): Likewise. (extract_arg): Likewise. * coffread.c (coff_sym_fns): Add `sym_probe_fns' value. * configure.ac: Append `stap-probe.o' to be generated when ELF support is present. * configure: Regenerate. * dbxread.c (aout_sym_fns): Add `sym_probe_fns' value. * elfread.c: Include `probe.h' and `arch-utils.h'. (probe_key): New variable. (elf_get_probes): New function. (elf_get_probe_argument_count): Likewise. (elf_evaluate_probe_argument): Likewise. (elf_compile_to_ax): Likewise. (elf_symfile_relocate_probe): Likewise. (stap_probe_key_free): Likewise. (elf_probe_fns): New variable. (elf_sym_fns): Add `sym_probe_fns' value. (elf_sym_fns_lazy_psyms): Likewise. (elf_sym_fns_gdb_index): Likewise. (_initialize_elfread): Initialize objfile cache for static probes. * gdb_vecs.h (struct probe): New forward declaration. (probe_p): New VEC declaration. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * gdbarch.sh (stap_integer_prefix): New variable. (stap_integer_suffix): Likewise. (stap_register_prefix): Likewise. (stap_register_suffix): Likewise. (stap_register_indirection_prefix): Likewise. (stap_register_indirection_suffix): Likewise. (stap_gdb_register_prefix): Likewise. (stap_gdb_register_suffix): Likewise. (stap_is_single_operand): New function. (stap_parse_special_token): Likewise. (struct stap_parse_info): Forward declaration. * i386-tdep.c: Including headers needed to perform the parsing of SystemTap probes' arguments. (i386_stap_is_single_operand): New function. (i386_stap_parse_special_token): Likewise. (i386_elf_init_abi): Initializing proper fields used by SystemTap probes' arguments parser. * i386-tdep.h (i386_stap_is_single_operand): New function. (i386_stap_parse_special_token): Likewise. * machoread.c (macho_sym_fns): Add `sym_probe_fns' value. * mipsread.c (ecoff_sym_fns): Likewise. * objfiles.c (objfile_relocate1): Support relocation for static probes. * parse.c (prefixify_expression): Remove static declaration. (initialize_expout): Likewise. (reallocate_expout): Likewise. * parser-defs.h (initialize_expout): Declare function. (reallocate_expout): Likewise. (prefixify_expression): Likewise. * ppc-linux-tdep.c: Including headers needed to perform the parsing of SystemTap probes' arguments. (ppc_stap_is_single_operand): New function. (ppc_stap_parse_special_token): Likewise. (ppc_linux_init_abi): Initializing proper fields used by SystemTap probes' arguments parser. * probe.c: New file, for generic statically defined probe support. * probe.h: Likewise. * s390-tdep.c: Including headers needed to perform the parsing of SystemTap probes' arguments. (s390_stap_is_single_operand): New function. (s390_gdbarch_init): Initializing proper fields used by SystemTap probes' arguments parser. * somread.c (som_sym_fns): Add `sym_probe_fns' value. * stap-probe.c: New file, for SystemTap probe support. * stap-probe.h: Likewise. * symfile.h: Include `gdb_vecs.h'. (struct sym_probe_fns): New struct. (struct sym_fns) <sym_probe_fns>: New field. * symtab.c (init_sal): Initialize `probe' field. * symtab.h (struct probe): Forward declaration. (struct symtab_and_line) <probe>: New field. * tracepoint.c (start_tracing): Adjust semaphore on breakpoints locations. (stop_tracing): Likewise. * xcoffread.c (xcoff_sym_fns): Add `sym_probe_fns' value.
2012-04-27 22:47:57 +02:00
s390: Split up s390-linux-tdep.c into two files Currently all target dependent code for s390 is in one file, s390-linux-tdep.c. This includes code general for the architecture as well as code specific for uses in GNU/Linux (user space). Up until now this was OK as GNU/Linux was the only supported OS. In preparation to support the new Linux kernel 'OS' split up the existing s390 code into a general s390-tdep and a GNU/Linux-specific s390-linux-tdep. Note: The record-replay feature will be moved in a separate patch. This is simply due to the fact that the combined patch would be too large for the mailing list. This requires setting the process_record hook during OSABI init to keep the code bisectable. The patch moving record-replay cleans up this hack. gdb/ChangeLog: * s390-linux-nat.c (s390-tdep.h): New include. * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o. (HFILES_NO_SRCDIR): Add s390-tdep.h. (ALLDEPFILES): Add s390-tdep.c. * configure.tgt (s390*-*-linux*): Add s390-tdep.o. * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to... * s390-tdep.h: ...this. New file. * s390-linux-tdep.c (s390-tdep.h): New include. (_initialize_s390_tdep): Rename to... (_initialize_s390_linux_tdep): ...this and adjust. (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep) (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to s390-tdep.h. (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri) (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy) (s390_is_partial_instruction, s390_software_single_step) (is_non_branch_ril, s390_displaced_step_copy_insn) (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep) (s390_prologue_data, s390_addr, s390_store, s390_load) (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue) (s390_register_call_saved, s390_guess_tracepoint_registers) (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum) (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register) (s390_pseudo_register_name, s390_pseudo_register_type) (s390_pseudo_register_read, s390_pseudo_register_write) (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect) (s390_ax_pseudo_register_push_stack, s390_gen_return_address) (s390_addr_bits_remove, s390_address_class_type_flags) (s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags, s390_effective_inner_type) (s390_function_arg_float, s390_function_arg_vector) (is_power_of_two, s390_function_arg_integer, s390_arg_state) (s390_handle_arg, s390_push_dummy_call, s390_dummy_id) (s390_frame_align, s390_register_return_value, s390_return_value) (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp) (s390_unwind_pseudo_register, s390_adjust_frame_regnum) (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg) (s390_trad_frame_prev_register, s390_unwind_cache) (s390_prologue_frame_unwind_cache) (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache) (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind) (s390_stub_unwind_cache, s390_stub_frame_unwind_cache) (s390_stub_frame_this_id, s390_stub_frame_prev_register) (s390_stub_frame_sniffer, s390_stub_frame_unwind) (s390_frame_base_address, s390_local_base_address) (s390_frame_base, s390_gcc_target_options) (s390_gnu_triplet_regexp, s390_stap_is_single_operand) (s390_validate_reg_range, s390_tdesc_valid) (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to... * s390-tdep.c: ...this. New file.
2018-01-23 13:37:43 +01:00
return 0;
2012-04-27 Sergio Durigan Junior <sergiodj@redhat.com> Tom Tromey <tromey@redhat.com> Jan Kratochvil <jan.kratochvil@redhat.com> * Makefile.in (SFILES): Add `probe' and `stap-probe'. (COMMON_OBS): Likewise. (HFILES_NO_SRCDIR): Add `probe'. * NEWS: Mention support for static and SystemTap probes. * amd64-tdep.c (amd64_init_abi): Initializing proper fields used by SystemTap probes' arguments parser. * arm-linux-tdep.c: Including headers needed to perform the parsing of SystemTap probes' arguments. (arm_stap_is_single_operand): New function. (arm_stap_parse_special_token): Likewise. (arm_linux_init_abi): Initializing proper fields used by SystemTap probes' arguments parser. * ax-gdb.c (require_rvalue): Removing static declaration. (gen_expr): Likewise. * ax-gdb.h (gen_expr): Declaring function. (require_rvalue): Likewise. * breakpoint.c: Include `gdb_regex.h' and `probe.h'. (bkpt_probe_breakpoint_ops): New variable. (momentary_breakpoint_from_master): Set the `probe' value. (add_location_to_breakpoint): Likewise. (break_command_1): Using proper breakpoint_ops according to the argument passed by the user in the command line. (bkpt_probe_insert_location): New function. (bkpt_probe_remove_location): Likewise. (bkpt_probe_create_sals_from_address): Likewise. (bkpt_probe_decode_linespec): Likewise. (tracepoint_probe_create_sals_from_address): Likewise. (tracepoint_probe_decode_linespec): Likewise. (tracepoint_probe_breakpoint_ops): New variable. (trace_command): Using proper breakpoint_ops according to the argument passed by the user in the command line. (initialize_breakpoint_ops): Initializing breakpoint_ops for static probes on breakpoints and tracepoints. * breakpoint.h (struct bp_location) <probe>: New field. * cli-utils.c (skip_spaces_const): New function. (extract_arg): Likewise. * cli-utils.h (skip_spaces_const): Likewise. (extract_arg): Likewise. * coffread.c (coff_sym_fns): Add `sym_probe_fns' value. * configure.ac: Append `stap-probe.o' to be generated when ELF support is present. * configure: Regenerate. * dbxread.c (aout_sym_fns): Add `sym_probe_fns' value. * elfread.c: Include `probe.h' and `arch-utils.h'. (probe_key): New variable. (elf_get_probes): New function. (elf_get_probe_argument_count): Likewise. (elf_evaluate_probe_argument): Likewise. (elf_compile_to_ax): Likewise. (elf_symfile_relocate_probe): Likewise. (stap_probe_key_free): Likewise. (elf_probe_fns): New variable. (elf_sym_fns): Add `sym_probe_fns' value. (elf_sym_fns_lazy_psyms): Likewise. (elf_sym_fns_gdb_index): Likewise. (_initialize_elfread): Initialize objfile cache for static probes. * gdb_vecs.h (struct probe): New forward declaration. (probe_p): New VEC declaration. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * gdbarch.sh (stap_integer_prefix): New variable. (stap_integer_suffix): Likewise. (stap_register_prefix): Likewise. (stap_register_suffix): Likewise. (stap_register_indirection_prefix): Likewise. (stap_register_indirection_suffix): Likewise. (stap_gdb_register_prefix): Likewise. (stap_gdb_register_suffix): Likewise. (stap_is_single_operand): New function. (stap_parse_special_token): Likewise. (struct stap_parse_info): Forward declaration. * i386-tdep.c: Including headers needed to perform the parsing of SystemTap probes' arguments. (i386_stap_is_single_operand): New function. (i386_stap_parse_special_token): Likewise. (i386_elf_init_abi): Initializing proper fields used by SystemTap probes' arguments parser. * i386-tdep.h (i386_stap_is_single_operand): New function. (i386_stap_parse_special_token): Likewise. * machoread.c (macho_sym_fns): Add `sym_probe_fns' value. * mipsread.c (ecoff_sym_fns): Likewise. * objfiles.c (objfile_relocate1): Support relocation for static probes. * parse.c (prefixify_expression): Remove static declaration. (initialize_expout): Likewise. (reallocate_expout): Likewise. * parser-defs.h (initialize_expout): Declare function. (reallocate_expout): Likewise. (prefixify_expression): Likewise. * ppc-linux-tdep.c: Including headers needed to perform the parsing of SystemTap probes' arguments. (ppc_stap_is_single_operand): New function. (ppc_stap_parse_special_token): Likewise. (ppc_linux_init_abi): Initializing proper fields used by SystemTap probes' arguments parser. * probe.c: New file, for generic statically defined probe support. * probe.h: Likewise. * s390-tdep.c: Including headers needed to perform the parsing of SystemTap probes' arguments. (s390_stap_is_single_operand): New function. (s390_gdbarch_init): Initializing proper fields used by SystemTap probes' arguments parser. * somread.c (som_sym_fns): Add `sym_probe_fns' value. * stap-probe.c: New file, for SystemTap probe support. * stap-probe.h: Likewise. * symfile.h: Include `gdb_vecs.h'. (struct sym_probe_fns): New struct. (struct sym_fns) <sym_probe_fns>: New field. * symtab.c (init_sal): Initialize `probe' field. * symtab.h (struct probe): Forward declaration. (struct symtab_and_line) <probe>: New field. * tracepoint.c (start_tracing): Adjust semaphore on breakpoints locations. (stop_tracing): Likewise. * xcoffread.c (xcoff_sym_fns): Add `sym_probe_fns' value.
2012-04-27 22:47:57 +02:00
}
/* Initialize linux_record_tdep if not initialized yet. */
static void
s390_init_linux_record_tdep (struct linux_record_tdep *record_tdep,
enum s390_abi_kind abi)
{
/* These values are the size of the type that will be used in a system
call. They are obtained from Linux Kernel source. */
if (abi == ABI_LINUX_ZSERIES)
{
record_tdep->size_pointer = 8;
/* no _old_kernel_stat */
record_tdep->size_tms = 32;
record_tdep->size_loff_t = 8;
record_tdep->size_flock = 32;
record_tdep->size_ustat = 32;
record_tdep->size_old_sigaction = 32;
record_tdep->size_old_sigset_t = 8;
record_tdep->size_rlimit = 16;
record_tdep->size_rusage = 144;
record_tdep->size_timeval = 16;
record_tdep->size_timezone = 8;
/* old_[ug]id_t never used */
record_tdep->size_fd_set = 128;
record_tdep->size_old_dirent = 280;
record_tdep->size_statfs = 88;
record_tdep->size_statfs64 = 88;
record_tdep->size_sockaddr = 16;
record_tdep->size_int = 4;
record_tdep->size_long = 8;
record_tdep->size_ulong = 8;
record_tdep->size_msghdr = 56;
record_tdep->size_itimerval = 32;
record_tdep->size_stat = 144;
/* old_utsname unused */
record_tdep->size_sysinfo = 112;
record_tdep->size_msqid_ds = 120;
record_tdep->size_shmid_ds = 112;
record_tdep->size_new_utsname = 390;
record_tdep->size_timex = 208;
record_tdep->size_mem_dqinfo = 24;
record_tdep->size_if_dqblk = 72;
record_tdep->size_fs_quota_stat = 80;
record_tdep->size_timespec = 16;
record_tdep->size_pollfd = 8;
record_tdep->size_NFS_FHSIZE = 32;
record_tdep->size_knfsd_fh = 132;
record_tdep->size_TASK_COMM_LEN = 16;
record_tdep->size_sigaction = 32;
record_tdep->size_sigset_t = 8;
record_tdep->size_siginfo_t = 128;
record_tdep->size_cap_user_data_t = 12;
record_tdep->size_stack_t = 24;
record_tdep->size_off_t = 8;
/* stat64 unused */
record_tdep->size_gid_t = 4;
record_tdep->size_uid_t = 4;
record_tdep->size_PAGE_SIZE = 0x1000; /* 4KB */
record_tdep->size_flock64 = 32;
record_tdep->size_io_event = 32;
record_tdep->size_iocb = 64;
record_tdep->size_epoll_event = 16;
record_tdep->size_itimerspec = 32;
record_tdep->size_mq_attr = 64;
record_tdep->size_termios = 36;
record_tdep->size_termios2 = 44;
record_tdep->size_pid_t = 4;
record_tdep->size_winsize = 8;
record_tdep->size_serial_struct = 72;
record_tdep->size_serial_icounter_struct = 80;
record_tdep->size_size_t = 8;
record_tdep->size_iovec = 16;
record_tdep->size_time_t = 8;
}
else if (abi == ABI_LINUX_S390)
{
record_tdep->size_pointer = 4;
record_tdep->size__old_kernel_stat = 32;
record_tdep->size_tms = 16;
record_tdep->size_loff_t = 8;
record_tdep->size_flock = 16;
record_tdep->size_ustat = 20;
record_tdep->size_old_sigaction = 16;
record_tdep->size_old_sigset_t = 4;
record_tdep->size_rlimit = 8;
record_tdep->size_rusage = 72;
record_tdep->size_timeval = 8;
record_tdep->size_timezone = 8;
record_tdep->size_old_gid_t = 2;
record_tdep->size_old_uid_t = 2;
record_tdep->size_fd_set = 128;
record_tdep->size_old_dirent = 268;
record_tdep->size_statfs = 64;
record_tdep->size_statfs64 = 88;
record_tdep->size_sockaddr = 16;
record_tdep->size_int = 4;
record_tdep->size_long = 4;
record_tdep->size_ulong = 4;
record_tdep->size_msghdr = 28;
record_tdep->size_itimerval = 16;
record_tdep->size_stat = 64;
/* old_utsname unused */
record_tdep->size_sysinfo = 64;
record_tdep->size_msqid_ds = 88;
record_tdep->size_shmid_ds = 84;
record_tdep->size_new_utsname = 390;
record_tdep->size_timex = 128;
record_tdep->size_mem_dqinfo = 24;
record_tdep->size_if_dqblk = 72;
record_tdep->size_fs_quota_stat = 80;
record_tdep->size_timespec = 8;
record_tdep->size_pollfd = 8;
record_tdep->size_NFS_FHSIZE = 32;
record_tdep->size_knfsd_fh = 132;
record_tdep->size_TASK_COMM_LEN = 16;
record_tdep->size_sigaction = 20;
record_tdep->size_sigset_t = 8;
record_tdep->size_siginfo_t = 128;
record_tdep->size_cap_user_data_t = 12;
record_tdep->size_stack_t = 12;
record_tdep->size_off_t = 4;
record_tdep->size_stat64 = 104;
record_tdep->size_gid_t = 4;
record_tdep->size_uid_t = 4;
record_tdep->size_PAGE_SIZE = 0x1000; /* 4KB */
record_tdep->size_flock64 = 32;
record_tdep->size_io_event = 32;
record_tdep->size_iocb = 64;
record_tdep->size_epoll_event = 16;
record_tdep->size_itimerspec = 16;
record_tdep->size_mq_attr = 32;
record_tdep->size_termios = 36;
record_tdep->size_termios2 = 44;
record_tdep->size_pid_t = 4;
record_tdep->size_winsize = 8;
record_tdep->size_serial_struct = 60;
record_tdep->size_serial_icounter_struct = 80;
record_tdep->size_size_t = 4;
record_tdep->size_iovec = 8;
record_tdep->size_time_t = 4;
}
/* These values are the second argument of system call "sys_fcntl"
and "sys_fcntl64". They are obtained from Linux Kernel source. */
record_tdep->fcntl_F_GETLK = 5;
record_tdep->fcntl_F_GETLK64 = 12;
record_tdep->fcntl_F_SETLK64 = 13;
record_tdep->fcntl_F_SETLKW64 = 14;
record_tdep->arg1 = S390_R2_REGNUM;
record_tdep->arg2 = S390_R3_REGNUM;
record_tdep->arg3 = S390_R4_REGNUM;
record_tdep->arg4 = S390_R5_REGNUM;
record_tdep->arg5 = S390_R6_REGNUM;
/* These values are the second argument of system call "sys_ioctl".
They are obtained from Linux Kernel source.
See arch/s390/include/uapi/asm/ioctls.h. */
record_tdep->ioctl_TCGETS = 0x5401;
record_tdep->ioctl_TCSETS = 0x5402;
record_tdep->ioctl_TCSETSW = 0x5403;
record_tdep->ioctl_TCSETSF = 0x5404;
record_tdep->ioctl_TCGETA = 0x5405;
record_tdep->ioctl_TCSETA = 0x5406;
record_tdep->ioctl_TCSETAW = 0x5407;
record_tdep->ioctl_TCSETAF = 0x5408;
record_tdep->ioctl_TCSBRK = 0x5409;
record_tdep->ioctl_TCXONC = 0x540a;
record_tdep->ioctl_TCFLSH = 0x540b;
record_tdep->ioctl_TIOCEXCL = 0x540c;
record_tdep->ioctl_TIOCNXCL = 0x540d;
record_tdep->ioctl_TIOCSCTTY = 0x540e;
record_tdep->ioctl_TIOCGPGRP = 0x540f;
record_tdep->ioctl_TIOCSPGRP = 0x5410;
record_tdep->ioctl_TIOCOUTQ = 0x5411;
record_tdep->ioctl_TIOCSTI = 0x5412;
record_tdep->ioctl_TIOCGWINSZ = 0x5413;
record_tdep->ioctl_TIOCSWINSZ = 0x5414;
record_tdep->ioctl_TIOCMGET = 0x5415;
record_tdep->ioctl_TIOCMBIS = 0x5416;
record_tdep->ioctl_TIOCMBIC = 0x5417;
record_tdep->ioctl_TIOCMSET = 0x5418;
record_tdep->ioctl_TIOCGSOFTCAR = 0x5419;
record_tdep->ioctl_TIOCSSOFTCAR = 0x541a;
record_tdep->ioctl_FIONREAD = 0x541b;
record_tdep->ioctl_TIOCINQ = 0x541b; /* alias */
record_tdep->ioctl_TIOCLINUX = 0x541c;
record_tdep->ioctl_TIOCCONS = 0x541d;
record_tdep->ioctl_TIOCGSERIAL = 0x541e;
record_tdep->ioctl_TIOCSSERIAL = 0x541f;
record_tdep->ioctl_TIOCPKT = 0x5420;
record_tdep->ioctl_FIONBIO = 0x5421;
record_tdep->ioctl_TIOCNOTTY = 0x5422;
record_tdep->ioctl_TIOCSETD = 0x5423;
record_tdep->ioctl_TIOCGETD = 0x5424;
record_tdep->ioctl_TCSBRKP = 0x5425;
record_tdep->ioctl_TIOCSBRK = 0x5427;
record_tdep->ioctl_TIOCCBRK = 0x5428;
record_tdep->ioctl_TIOCGSID = 0x5429;
record_tdep->ioctl_TCGETS2 = 0x802c542a;
record_tdep->ioctl_TCSETS2 = 0x402c542b;
record_tdep->ioctl_TCSETSW2 = 0x402c542c;
record_tdep->ioctl_TCSETSF2 = 0x402c542d;
record_tdep->ioctl_TIOCGPTN = 0x80045430;
record_tdep->ioctl_TIOCSPTLCK = 0x40045431;
record_tdep->ioctl_FIONCLEX = 0x5450;
record_tdep->ioctl_FIOCLEX = 0x5451;
record_tdep->ioctl_FIOASYNC = 0x5452;
record_tdep->ioctl_TIOCSERCONFIG = 0x5453;
record_tdep->ioctl_TIOCSERGWILD = 0x5454;
record_tdep->ioctl_TIOCSERSWILD = 0x5455;
record_tdep->ioctl_TIOCGLCKTRMIOS = 0x5456;
record_tdep->ioctl_TIOCSLCKTRMIOS = 0x5457;
record_tdep->ioctl_TIOCSERGSTRUCT = 0x5458;
record_tdep->ioctl_TIOCSERGETLSR = 0x5459;
record_tdep->ioctl_TIOCSERGETMULTI = 0x545a;
record_tdep->ioctl_TIOCSERSETMULTI = 0x545b;
record_tdep->ioctl_TIOCMIWAIT = 0x545c;
record_tdep->ioctl_TIOCGICOUNT = 0x545d;
record_tdep->ioctl_FIOQSIZE = 0x545e;
}
/* Initialize OSABI common for GNU/Linux on 31- and 64-bit systems. */
static void
s390_linux_init_abi_any (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
tdep->s390_syscall_record = s390_linux_syscall_record;
linux_init_abi (info, gdbarch);
ChangeLog: * s390-tdep.h (S390_ORIG_R2_REGNUM): Define. (S390_LAST_BREAK_REGNUM): Likewise. (S390_SYSTEM_CALL_REGNUM): Likewise. (S390_NUM_REGS): Update. (s390_regmap_last_break): Add declaration. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (tdesc_s390_linux32v1): Add declaration. (tdesc_s390_linux32v2): Likewise. (tdesc_s390_linux64v1): Likewise. (tdesc_s390_linux64v2): Likewise. (tdesc_s390x_linux64v1): Likewise. (tdesc_s390x_linux64v2): Likewise. * s390-tdep.c: Include new target description files "features/s390-linux32v1.c", "features/s390-linux32v2.c", "features/s390-linux64v1.c", "features/s390-linux64v2.c", "features/s390x-linux64v1.c", and "features/s390x-linux64v2.c". (s390_cannot_store_register): New function. (s390_write_pc): Likewise. (s390_dwarf_regmap): Add fields for new registers. (s390_regmap_gregset): Likewise. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): Likewise. (s390_regmap_last_break): New variable. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (s390_last_break_regset): Likewise. (s390x_last_break_regset): Likewise. (s390_system_call_regset): Likewise. (s390_upper_regset_sections): Rename to ... (s390_linux64_regset_sections): ... this. (s390_linux32_regset_sections): New variable. (s390x_linux64_regset_sections): Likewise. (s390_linux32v1_regset_sections): Likewise. (s390_linux32v2_regset_sections): Likewise. (s390_linux64v1_regset_sections): Likewise. (s390_linux64v2_regset_sections): Likewise. (s390x_linux64v1_regset_sections): Likewise. (s390x_linux64v2_regset_sections): Likewise. (s390_regset_from_core_section): Handle .reg-s390-last-break and .reg-s390-system-call core file sections. (s390_core_read_description): Check for presence of .reg-s390-last-break and .reg-s390-system-call core file sections and return appropriate target description. (s390_gdbarch_init): Detect Linux-specific registers "orig_r2", "last_break" and "system_call" in target description. Install appropriate gdbarch_core_regset_sections array. Call set_gdbarch_cannot_store_register and set_gdbarch_write_pc. (_initialize_s390_tdep): Initialize additional target descriptions. * s390-nat.c: Include "elf/common.h". (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (have_regset_last_break): New static variable. (have_regset_system_call): Likewise. (s390_native_supply): Handle S390_ORIG_R2_REGNUM. (s390_native_collect): Likewise. (fetch_regset, store_regset, check_regset): New functions. (s390_linux_fetch_inferior_registers): Handle S390_LAST_BREAK_REGNUM and S390_SYSTEM_CALL_REGNUM. (s390_linux_store_inferior_registers): Likewise. (s390_read_description): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. * features/Makefile (WHICH): Add s390-linux32v1, s390-linux64v1, s390x-linux64v1, s390-linux32v2, s390-linux64v2, and s390x-linux64v2. (s390-linux32v1-expedite): Define. (s390-linux32v2-expedite): Likewise. (s390-linux64v1-expedite): Likewise. (s390-linux64v2-expedite): Likewise. (s390x-linux64v1-expedite): Likewise. (s390x-linux64v2-expedite): Likewise. * features/s390-linux32.xml: Add orig_r2 register. * features/s390-linux64.xml: Likewise. * features/s390x-linux64.xml: Likewise. * features/s390-linux32v1.xml: New file. * features/s390-linux32v2.xml: Likewise. * features/s390-linux64v1.xml: Likewise. * features/s390-linux64v2.xml: Likewise. * features/s390x-linux64v1.xml: Likewise. * features/s390x-linux64v2.xml: Likewise. * features/s390-linux32.c: Regenerate. * features/s390-linux64.c: Likewise. * features/s390x-linux64.c: Likewise. * features/s390-linux32v1.c: New generated file. * features/s390-linux32v2.c: Likewise. * features/s390-linux64v1.c: Likewise. * features/s390-linux64v2.c: Likewise. * features/s390x-linux64v1.c: Likewise. * features/s390x-linux64v2.c: Likewise. * regformats/s390-linux32.dat: Regenerate. * regformats/s390-linux64.dat: Regenerate. * regformats/s390x-linux64.dat: Regenerate. * regformats/s390-linux32v1.dat: New generated file. * regformats/s390-linux32v2.dat: Likewise. * regformats/s390-linux64v1.dat: Likewise. * regformats/s390-linux64v2.dat: Likewise. * regformats/s390x-linux64v1.dat: Likewise. * regformats/s390x-linux64v2.dat: Likewise. gdbserver/ChangeLog: * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules. (s390-linux32v2.o, s390-linux32v2.c): Likewise. (s390-linux64v1.o, s390-linux64v1.c): Likewise. (s390-linux64v2.o, s390-linux64v2.c): Likewise. (s390x-linux64v1.o, s390x-linux64v1.c): Likewise. (s390x-linux64v2.o, s390x-linux64v2.c): Likewise. * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects. (srv_xmlfiles): Add new XML files. * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>, and <sys/uio.h>. (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (init_registers_s390_linux32v1): Add prototype. (init_registers_s390_linux32v2): Likewise. (init_registers_s390_linux64v1): Likewise. (init_registers_s390_linux64v2): Likewise. (init_registers_s390x_linux64v1): Likewise. (init_registers_s390x_linux64v2): Likewise. (s390_num_regs): Increment to 52. (s390_regmap): Add orig_r2 register. (s390_num_regs_3264): Increment to 68. (s390_regmap_3264): Add orig_r2 register. (s390_collect_ptrace_register): Handle orig_r2 register. (s390_supply_ptrace_register): Likewise. (s390_fill_last_break): New function. (s390_store_last_break): Likewise. (s390_fill_system_call): New function. (s390_store_system_call): Likewise. (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL register sets. (s390_check_regset): New function. (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. Update target_regsets for available register sets. testsuite/ChangeLog: * gdb.base/callfuncs.exp (fetch_all_registers): Filter out read-only last_break register on s390*-*-* targets.
2011-12-06 15:14:50 +01:00
/* Register handling. */
set_gdbarch_core_read_description (gdbarch, s390_core_read_description);
set_gdbarch_iterate_over_regset_sections (gdbarch,
s390_iterate_over_regset_sections);
set_gdbarch_write_pc (gdbarch, s390_write_pc);
set_gdbarch_cannot_store_register (gdbarch, s390_cannot_store_register);
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * s390-tdep.c (struct gdbarch_tdep): Add 'abi' member. (S390_STACK_FRAME_OVERHEAD): Remove. (S390_STACK_PARAMETER_ALIGNMENT): Remove. (S390_NUM_FP_PARAMETER_REGISTERS): Remove. (s390_promote_integer_argument): Remove. (s390_cannot_extract_struct_value_address): Remove. (s390_use_struct_convention, s390_store_struct_return): Remove. (s390_extract_return_value, s390_store_return_value): Remove. (s390_return_value_convention, s390_return_value): New functions. (is_float_singleton): Handle typedefs. (is_double_or_float, is_double_arg, is_simple_arg, pass_by_copy_ref): Remove, replace by ... (s390_function_arg_pass_by_reference, s390_function_arg_float, s390_function_arg_integer): ... these new functions. (s390_push_arguments, s390_push_return_address): Remove, replace by ... (s390_push_dummy_call, s390_unwind_dummy_id): ... these new functions. (s390_gdbarch_init): Remove s390_call_dummy_words and elf_flags. Fill in tdep->abi. Remove calls to: set_gdbarch_deprecated_store_struct_return, set_gdbarch_deprecated_extract_return_value, set_gdbarch_deprecated_store_return_value, set_gdbarch_use_struct_convention, set_gdbarch_extract_struct_value_address, set_gdbarch_deprecated_pc_in_call_dummy, set_gdbarch_deprecated_push_arguments, set_gdbarch_deprecated_save_dummy_frame_tos, set_gdbarch_deprecated_push_return_address, set_gdbarch_deprecated_sizeof_call_dummy_words, set_gdbarch_deprecated_call_dummy_words, set_gdbarch_deprecated_dummy_write_sp. Add calls to: set_gdbarch_push_dummy_call, set_gdbarch_unwind_dummy_id, set_gdbarch_return_value.
2004-02-18 04:54:11 +01:00
/* Syscall handling. */
set_gdbarch_get_syscall_number (gdbarch, s390_linux_get_syscall_number);
/* Frame handling. */
frame_unwind_append_unwinder (gdbarch, &s390_sigtramp_frame_unwind);
* config/tm-linux.h: Delete file. * config/alpha/alpha-linux.mt (DEPRECATED_TM_FILE): Set to tm-alpha.h. * config/alpha/tm-alphalinux.h: Delete file. * config/arm/linux.mt (DEPRECATED_TM_FILE): Set to tm-arm.h * config/arm/tm-linux.h: Delete file. * config/i386/tm-linux.h: Do not include "config/tm-linux.h". * config/ia64/tm-linux.h: Do not include "config/tm-linux.h". * config/m32r/linux.mt (DEPRECATED_TM_FILE): Remove. * config/mips/tm-linux.h: Do not include "config/tm-linux.h". * config/pa/linux.mt (DEPRECATED_TM_FILE): Set to tm-hppa.h. * config/pa/tm-linux.h: Delete file. * config/powerpc/tm-linux.h: Do not include "config/tm-linux.h". * config/s390/linux.mt (DEPRECATED_TM_FILE): Remove. * config/sh/linux.mt (DEPRECATED_TM_FILE): Set to tm-sh.h. * config/sh/tm-linux.h: Delete file. * alpha-linux-tdep.c: Include "symtab.h". (alpha_linux_init_abi): Call set_gdbarch_skip_trampoline_code. * i386-linux-tdep.c: Include "symtab.h". (i386_linux_init_abi): Call set_gdbarch_skip_trampoline_code. * ia64-linux-tdep.c: Include "symtab.h". (ia64_linux_init_abi): Call set_gdbarch_skip_trampoline_code. * m32r-linux-tdep.c: Include "symtab.h". (m32r_linux_init_abi): Call set_gdbarch_skip_trampoline_code. * mips-linux-tdep.c: Include "symtab.h". (mips_linux_init_abi): Call set_gdbarch_skip_trampoline_code. * sh-linux-tdep.c: Include "symtab.h". (sh_linux_init_abi): Call set_gdbarch_skip_trampoline_code. * s390-tdep.c (s390_gdbarch_init): Call set_gdbarch_skip_trampoline_code. * s390-nat.c: Do not include "tm.h". * Makefile.in (alpha-linux-tdep.o): Add dependency on $(symtab_h). (i386-linux-tdep.o): Likewise. (ia64-linux-tdep.o): Likewise. (m32r-linux-tdep.o): Likewise. (mips-linux-tdep.o): Likewise. (sh-linux-tdep.o): Likewise. (s390-nat.o): Remove dependency on $(tm_h).
2006-11-28 22:41:03 +01:00
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
/* Enable TLS support. */
set_gdbarch_fetch_tls_load_module_address (gdbarch,
svr4_fetch_objfile_link_map);
/* Support reverse debugging. */
set_gdbarch_process_record_signal (gdbarch, s390_linux_record_signal);
s390_init_linux_record_tdep (&s390_linux_record_tdep, ABI_LINUX_S390);
s390_init_linux_record_tdep (&s390x_linux_record_tdep, ABI_LINUX_ZSERIES);
}
/* Initialize OSABI for GNU/Linux on 31-bit systems. */
GDB: Add support for the new set/show disassembler-options commands. This commit adds support to GDB so that it can modify the disassembler-options value that is passed to the disassembler, similar to objdump's -M option. Currently, the only supported targets are ARM, PowerPC and S/390, but adding support for a new target(s) is not difficult. include/ * dis-asm.h (disasm_options_t): New typedef. (parse_arm_disassembler_option): Remove prototype. (set_arm_regname_option): Likewise. (get_arm_regnames): Likewise. (get_arm_regname_num_options): Likewise. (disassemble_init_s390): New prototype. (disassembler_options_powerpc): Likewise. (disassembler_options_arm): Likewise. (disassembler_options_s390): Likewise. (remove_whitespace_and_extra_commas): Likewise. (disassembler_options_cmp): Likewise. (next_disassembler_option): New inline function. (FOR_EACH_DISASSEMBLER_OPTION): New macro. opcodes/ * disassemble.c Include "safe-ctype.h". (disassemble_init_for_target): Handle s390 init. (remove_whitespace_and_extra_commas): New function. (disassembler_options_cmp): Likewise. * arm-dis.c: Include "libiberty.h". (NUM_ELEM): Delete. (regnames): Use long disassembler style names. Add force-thumb and no-force-thumb options. (NUM_ARM_REGNAMES): Rename from this... (NUM_ARM_OPTIONS): ...to this. Use ARRAY_SIZE. (get_arm_regname_num_options): Delete. (set_arm_regname_option): Likewise. (get_arm_regnames): Likewise. (parse_disassembler_options): Likewise. (parse_arm_disassembler_option): Rename from this... (parse_arm_disassembler_options): ...to this. Make static. Use new FOR_EACH_DISASSEMBLER_OPTION macro to scan over options. (print_insn): Use parse_arm_disassembler_options. (disassembler_options_arm): New function. (print_arm_disassembler_options): Handle updated regnames. * ppc-dis.c: Include "libiberty.h". (ppc_opts): Add "32" and "64" entries. (ppc_parse_cpu): Use ARRAY_SIZE and disassembler_options_cmp. (powerpc_init_dialect): Add break to switch statement. Use new FOR_EACH_DISASSEMBLER_OPTION macro. (disassembler_options_powerpc): New function. (print_ppc_disassembler_options): Use ARRAY_SIZE. Remove printing of "32" and "64". * s390-dis.c: Include "libiberty.h". (init_flag): Remove unneeded variable. (struct s390_options_t): New structure type. (options): New structure. (init_disasm): Rename from this... (disassemble_init_s390): ...to this. Add initializations for current_arch_mask and option_use_insn_len_bits_p. Remove init_flag. (print_insn_s390): Delete call to init_disasm. (disassembler_options_s390): New function. (print_s390_disassembler_options): Print using information from struct 'options'. * po/opcodes.pot: Regenerate. binutils/ * objdump.c (main): Use remove_whitespace_and_extra_commas. gdb/ * NEWS: Mention new set/show disassembler-options commands. * doc/gdb.texinfo: Document new set/show disassembler-options commands. * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h". (prospective_options): New static variable. (gdb_disassembler::gdb_disassembler): Initialize m_di.disassembler_options. (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options. (get_disassembler_options): New function. (set_disassembler_options): Likewise. (set_disassembler_options_sfunc): Likewise. (show_disassembler_options_sfunc): Likewise. (disassembler_options_completer): Likewise. (_initialize_disasm): Likewise. * disasm.h (get_disassembler_options): New prototype. (set_disassembler_options): Likewise. * gdbarch.sh (gdbarch_disassembler_options): New variable. (gdbarch_verify_disassembler_options): Likewise. * gdbarch.c: Regenerate. * gdbarch.h: Likewise. * arm-tdep.c (num_disassembly_options): Delete. (set_disassembly_style): Likewise. (arm_disassembler_options): New static variable. (set_disassembly_style_sfunc): Convert short style name into long option name. Call set_disassembler_options. (show_disassembly_style_sfunc): New function. (arm_gdbarch_init): Call set_gdbarch_disassembler_options and set_gdbarch_verify_disassembler_options. (_initialize_arm_tdep): Delete regnames variable and update callers. (arm_disassembler_options): Initialize. (disasm_options): New variable. (num_disassembly_options): Rename from this... (num_disassembly_styles): ...to this. Compute by scanning through disasm_options. (valid_disassembly_styles): Initialize using disasm_options. Remove calls to parse_arm_disassembler_option, get_arm_regnames and set_arm_regname_option. Pass show_disassembly_style_sfunc to the "disassembler" setshow command. * rs6000-tdep.c (powerpc_disassembler_options): New static variable. (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and set_gdbarch_verify_disassembler_options. * s390-tdep.c (s390_disassembler_options): New static variable. (s390_gdbarch_init):all set_gdbarch_disassembler_options and set_gdbarch_verify_disassembler_options. gdb/testsuite/ * gdb.arch/powerpc-power.exp: Delete test. * gdb.arch/powerpc-power.s: Likewise. * gdb.disasm/disassembler-options.exp: New test. * gdb.arch/powerpc-altivec.exp: Likewise. * gdb.arch/powerpc-altivec.s: Likewise. * gdb.arch/powerpc-altivec2.exp: Likewise. * gdb.arch/powerpc-altivec2.s: Likewise. * gdb.arch/powerpc-altivec3.exp: Likewise. * gdb.arch/powerpc-altivec3.s: Likewise. * gdb.arch/powerpc-power7.exp: Likewise. * gdb.arch/powerpc-power7.s: Likewise. * gdb.arch/powerpc-power8.exp: Likewise. * gdb.arch/powerpc-power8.s: Likewise. * gdb.arch/powerpc-power9.exp: Likewise. * gdb.arch/powerpc-power9.s: Likewise. * gdb.arch/powerpc-vsx.exp: Likewise. * gdb.arch/powerpc-vsx.s: Likewise. * gdb.arch/powerpc-vsx2.exp: Likewise. * gdb.arch/powerpc-vsx2.s: Likewise. * gdb.arch/powerpc-vsx3.exp: Likewise. * gdb.arch/powerpc-vsx3.s: Likewise. * gdb.arch/arm-disassembler-options.exp: Likewise. * gdb.arch/powerpc-disassembler-options.exp: Likewise. * gdb.arch/s390-disassembler-options.exp: Likewise.
2017-02-28 19:32:07 +01:00
static void
s390_linux_init_abi_31 (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
tdep->abi = ABI_LINUX_S390;
s390_linux_init_abi_any (info, gdbarch);
set_solib_svr4_fetch_link_map_offsets (gdbarch,
svr4_ilp32_fetch_link_map_offsets);
set_xml_syscall_file_name (gdbarch, XML_SYSCALL_FILENAME_S390);
}
/* Initialize OSABI for GNU/Linux on 64-bit systems. */
static void
s390_linux_init_abi_64 (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
tdep->abi = ABI_LINUX_ZSERIES;
s390_linux_init_abi_any (info, gdbarch);
set_solib_svr4_fetch_link_map_offsets (gdbarch,
svr4_lp64_fetch_link_map_offsets);
set_xml_syscall_file_name (gdbarch, XML_SYSCALL_FILENAME_S390X);
}
gdb: add back declarations for _initialize functions I'd like to enable the -Wmissing-declarations warning. However, it warns for every _initialize function, for example: CXX dcache.o /home/smarchi/src/binutils-gdb/gdb/dcache.c: In function ‘void _initialize_dcache()’: /home/smarchi/src/binutils-gdb/gdb/dcache.c:688:1: error: no previous declaration for ‘void _initialize_dcache()’ [-Werror=missing-declarations] _initialize_dcache (void) ^~~~~~~~~~~~~~~~~~ The only practical way forward I found is to add back the declarations, which were removed by this commit: commit 481695ed5f6e0a8a9c9c50bfac1cdd2b3151e6c9 Author: John Baldwin <jhb@FreeBSD.org> Date: Sat Sep 9 11:02:37 2017 -0700 Remove unnecessary function prototypes. I don't think it's a big problem to have the declarations for these functions, but if anybody has a better solution for this, I'll be happy to use it. gdb/ChangeLog: * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration. * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration. * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration. * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration. * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration. * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration. * ada-exp.y (_initialize_ada_exp): Add declaration. * ada-lang.c (_initialize_ada_language): Add declaration. * ada-tasks.c (_initialize_tasks): Add declaration. * agent.c (_initialize_agent): Add declaration. * aix-thread.c (_initialize_aix_thread): Add declaration. * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration. * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration. * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration. * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration. * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration. * alpha-tdep.c (_initialize_alpha_tdep): Add declaration. * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration. * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration. * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration. * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration. * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration. * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration. * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration. * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration. * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration. * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration. * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration. * amd64-tdep.c (_initialize_amd64_tdep): Add declaration. * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration. * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration. * annotate.c (_initialize_annotate): Add declaration. * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration. * arc-tdep.c (_initialize_arc_tdep): Add declaration. * arch-utils.c (_initialize_gdbarch_utils): Add declaration. * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration. * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration. * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration. * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration. * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration. * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration. * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration. * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration. * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration. * arm-tdep.c (_initialize_arm_tdep): Add declaration. * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration. * auto-load.c (_initialize_auto_load): Add declaration. * auxv.c (_initialize_auxv): Add declaration. * avr-tdep.c (_initialize_avr_tdep): Add declaration. * ax-gdb.c (_initialize_ax_gdb): Add declaration. * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration. * bfin-tdep.c (_initialize_bfin_tdep): Add declaration. * break-catch-sig.c (_initialize_break_catch_sig): Add declaration. * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration. * break-catch-throw.c (_initialize_break_catch_throw): Add declaration. * breakpoint.c (_initialize_breakpoint): Add declaration. * bsd-uthread.c (_initialize_bsd_uthread): Add declaration. * btrace.c (_initialize_btrace): Add declaration. * charset.c (_initialize_charset): Add declaration. * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration. * cli/cli-dump.c (_initialize_cli_dump): Add declaration. * cli/cli-interp.c (_initialize_cli_interp): Add declaration. * cli/cli-logging.c (_initialize_cli_logging): Add declaration. * cli/cli-script.c (_initialize_cli_script): Add declaration. * cli/cli-style.c (_initialize_cli_style): Add declaration. * coff-pe-read.c (_initialize_coff_pe_read): Add declaration. * coffread.c (_initialize_coffread): Add declaration. * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration. * compile/compile.c (_initialize_compile): Add declaration. * complaints.c (_initialize_complaints): Add declaration. * completer.c (_initialize_completer): Add declaration. * copying.c (_initialize_copying): Add declaration. * corefile.c (_initialize_core): Add declaration. * corelow.c (_initialize_corelow): Add declaration. * cp-abi.c (_initialize_cp_abi): Add declaration. * cp-namespace.c (_initialize_cp_namespace): Add declaration. * cp-support.c (_initialize_cp_support): Add declaration. * cp-valprint.c (_initialize_cp_valprint): Add declaration. * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration. * cris-tdep.c (_initialize_cris_tdep): Add declaration. * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration. * csky-tdep.c (_initialize_csky_tdep): Add declaration. * ctfread.c (_initialize_ctfread): Add declaration. * d-lang.c (_initialize_d_language): Add declaration. * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration. * darwin-nat.c (_initialize_darwin_nat): Add declaration. * dbxread.c (_initialize_dbxread): Add declaration. * dcache.c (_initialize_dcache): Add declaration. * disasm-selftests.c (_initialize_disasm_selftests): Add declaration. * disasm.c (_initialize_disasm): Add declaration. * dtrace-probe.c (_initialize_dtrace_probe): Add declaration. * dummy-frame.c (_initialize_dummy_frame): Add declaration. * dwarf-index-cache.c (_initialize_index_cache): Add declaration. * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration. * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration. * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration. * dwarf2expr.c (_initialize_dwarf2expr): Add declaration. * dwarf2loc.c (_initialize_dwarf2loc): Add declaration. * dwarf2read.c (_initialize_dwarf2_read): Add declaration. * elfread.c (_initialize_elfread): Add declaration. * exec.c (_initialize_exec): Add declaration. * extension.c (_initialize_extension): Add declaration. * f-lang.c (_initialize_f_language): Add declaration. * f-valprint.c (_initialize_f_valprint): Add declaration. * fbsd-nat.c (_initialize_fbsd_nat): Add declaration. * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration. * filesystem.c (_initialize_filesystem): Add declaration. * findcmd.c (_initialize_mem_search): Add declaration. * findvar.c (_initialize_findvar): Add declaration. * fork-child.c (_initialize_fork_child): Add declaration. * frame-base.c (_initialize_frame_base): Add declaration. * frame-unwind.c (_initialize_frame_unwind): Add declaration. * frame.c (_initialize_frame): Add declaration. * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration. * frv-tdep.c (_initialize_frv_tdep): Add declaration. * ft32-tdep.c (_initialize_ft32_tdep): Add declaration. * gcore.c (_initialize_gcore): Add declaration. * gdb-demangle.c (_initialize_gdb_demangle): Add declaration. * gdb_bfd.c (_initialize_gdb_bfd): Add declaration. * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration. * gdbarch.c (_initialize_gdbarch): Add declaration. * gdbtypes.c (_initialize_gdbtypes): Add declaration. * gnu-nat.c (_initialize_gnu_nat): Add declaration. * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration. * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration. * go-lang.c (_initialize_go_language): Add declaration. * go32-nat.c (_initialize_go32_nat): Add declaration. * guile/guile.c (_initialize_guile): Add declaration. * h8300-tdep.c (_initialize_h8300_tdep): Add declaration. * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration. * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration. * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration. * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration. * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration. * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration. * hppa-tdep.c (_initialize_hppa_tdep): Add declaration. * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration. * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration. * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration. * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration. * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration. * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration. * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration. * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration. * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration. * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration. * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration. * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration. * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration. * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration. * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration. * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration. * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration. * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration. * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration. * i386-tdep.c (_initialize_i386_tdep): Add declaration. * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration. * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration. * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration. * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration. * ia64-tdep.c (_initialize_ia64_tdep): Add declaration. * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration. * infcall.c (_initialize_infcall): Add declaration. * infcmd.c (_initialize_infcmd): Add declaration. * inflow.c (_initialize_inflow): Add declaration. * infrun.c (_initialize_infrun): Add declaration. * interps.c (_initialize_interpreter): Add declaration. * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration. * jit.c (_initialize_jit): Add declaration. * language.c (_initialize_language): Add declaration. * linux-fork.c (_initialize_linux_fork): Add declaration. * linux-nat.c (_initialize_linux_nat): Add declaration. * linux-tdep.c (_initialize_linux_tdep): Add declaration. * linux-thread-db.c (_initialize_thread_db): Add declaration. * lm32-tdep.c (_initialize_lm32_tdep): Add declaration. * m2-lang.c (_initialize_m2_language): Add declaration. * m32c-tdep.c (_initialize_m32c_tdep): Add declaration. * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration. * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration. * m32r-tdep.c (_initialize_m32r_tdep): Add declaration. * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration. * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration. * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration. * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration. * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration. * m68k-tdep.c (_initialize_m68k_tdep): Add declaration. * machoread.c (_initialize_machoread): Add declaration. * macrocmd.c (_initialize_macrocmd): Add declaration. * macroscope.c (_initialize_macroscope): Add declaration. * maint-test-options.c (_initialize_maint_test_options): Add declaration. * maint-test-settings.c (_initialize_maint_test_settings): Add declaration. * maint.c (_initialize_maint_cmds): Add declaration. * mdebugread.c (_initialize_mdebugread): Add declaration. * memattr.c (_initialize_mem): Add declaration. * mep-tdep.c (_initialize_mep_tdep): Add declaration. * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration. * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration. * mi/mi-interp.c (_initialize_mi_interp): Add declaration. * mi/mi-main.c (_initialize_mi_main): Add declaration. * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration. * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration. * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration. * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration. * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration. * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration. * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration. * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration. * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration. * mips-tdep.c (_initialize_mips_tdep): Add declaration. * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration. * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration. * mipsread.c (_initialize_mipsread): Add declaration. * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration. * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration. * moxie-tdep.c (_initialize_moxie_tdep): Add declaration. * msp430-tdep.c (_initialize_msp430_tdep): Add declaration. * nds32-tdep.c (_initialize_nds32_tdep): Add declaration. * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration. * nios2-tdep.c (_initialize_nios2_tdep): Add declaration. * nto-procfs.c (_initialize_procfs): Add declaration. * objc-lang.c (_initialize_objc_language): Add declaration. * observable.c (_initialize_observer): Add declaration. * opencl-lang.c (_initialize_opencl_language): Add declaration. * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration. * or1k-tdep.c (_initialize_or1k_tdep): Add declaration. * osabi.c (_initialize_gdb_osabi): Add declaration. * osdata.c (_initialize_osdata): Add declaration. * p-valprint.c (_initialize_pascal_valprint): Add declaration. * parse.c (_initialize_parse): Add declaration. * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration. * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration. * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration. * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration. * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration. * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration. * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration. * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration. * printcmd.c (_initialize_printcmd): Add declaration. * probe.c (_initialize_probe): Add declaration. * proc-api.c (_initialize_proc_api): Add declaration. * proc-events.c (_initialize_proc_events): Add declaration. * proc-service.c (_initialize_proc_service): Add declaration. * procfs.c (_initialize_procfs): Add declaration. * producer.c (_initialize_producer): Add declaration. * psymtab.c (_initialize_psymtab): Add declaration. * python/python.c (_initialize_python): Add declaration. * ravenscar-thread.c (_initialize_ravenscar): Add declaration. * record-btrace.c (_initialize_record_btrace): Add declaration. * record-full.c (_initialize_record_full): Add declaration. * record.c (_initialize_record): Add declaration. * regcache-dump.c (_initialize_regcache_dump): Add declaration. * regcache.c (_initialize_regcache): Add declaration. * reggroups.c (_initialize_reggroup): Add declaration. * remote-notif.c (_initialize_notif): Add declaration. * remote-sim.c (_initialize_remote_sim): Add declaration. * remote.c (_initialize_remote): Add declaration. * reverse.c (_initialize_reverse): Add declaration. * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration. * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration. * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration. * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration. * riscv-tdep.c (_initialize_riscv_tdep): Add declaration. * rl78-tdep.c (_initialize_rl78_tdep): Add declaration. * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration. * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep): Add declaration. * rs6000-nat.c (_initialize_rs6000_nat): Add declaration. * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration. * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration. * rust-exp.y (_initialize_rust_exp): Add declaration. * rx-tdep.c (_initialize_rx_tdep): Add declaration. * s12z-tdep.c (_initialize_s12z_tdep): Add declaration. * s390-linux-nat.c (_initialize_s390_nat): Add declaration. * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration. * s390-tdep.c (_initialize_s390_tdep): Add declaration. * score-tdep.c (_initialize_score_tdep): Add declaration. * ser-go32.c (_initialize_ser_dos): Add declaration. * ser-mingw.c (_initialize_ser_windows): Add declaration. * ser-pipe.c (_initialize_ser_pipe): Add declaration. * ser-tcp.c (_initialize_ser_tcp): Add declaration. * ser-uds.c (_initialize_ser_socket): Add declaration. * ser-unix.c (_initialize_ser_hardwire): Add declaration. * serial.c (_initialize_serial): Add declaration. * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration. * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration. * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration. * sh-tdep.c (_initialize_sh_tdep): Add declaration. * skip.c (_initialize_step_skip): Add declaration. * sol-thread.c (_initialize_sol_thread): Add declaration. * solib-aix.c (_initialize_solib_aix): Add declaration. * solib-darwin.c (_initialize_darwin_solib): Add declaration. * solib-dsbt.c (_initialize_dsbt_solib): Add declaration. * solib-frv.c (_initialize_frv_solib): Add declaration. * solib-svr4.c (_initialize_svr4_solib): Add declaration. * solib-target.c (_initialize_solib_target): Add declaration. * solib.c (_initialize_solib): Add declaration. * source-cache.c (_initialize_source_cache): Add declaration. * source.c (_initialize_source): Add declaration. * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration. * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration. * sparc-nat.c (_initialize_sparc_nat): Add declaration. * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration. * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration. * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration. * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration. * sparc-tdep.c (_initialize_sparc_tdep): Add declaration. * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration. * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration. * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration. * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration. * sparc64-nat.c (_initialize_sparc64_nat): Add declaration. * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration. * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration. * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration. * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration. * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration. * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration. * stabsread.c (_initialize_stabsread): Add declaration. * stack.c (_initialize_stack): Add declaration. * stap-probe.c (_initialize_stap_probe): Add declaration. * std-regs.c (_initialize_frame_reg): Add declaration. * symfile-debug.c (_initialize_symfile_debug): Add declaration. * symfile-mem.c (_initialize_symfile_mem): Add declaration. * symfile.c (_initialize_symfile): Add declaration. * symmisc.c (_initialize_symmisc): Add declaration. * symtab.c (_initialize_symtab): Add declaration. * target.c (_initialize_target): Add declaration. * target-connection.c (_initialize_target_connection): Add declaration. * target-dcache.c (_initialize_target_dcache): Add declaration. * target-descriptions.c (_initialize_target_descriptions): Add declaration. * thread.c (_initialize_thread): Add declaration. * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration. * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration. * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration. * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration. * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration. * tracectf.c (_initialize_ctf): Add declaration. * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration. * tracefile.c (_initialize_tracefile): Add declaration. * tracepoint.c (_initialize_tracepoint): Add declaration. * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration. * tui/tui-interp.c (_initialize_tui_interp): Add declaration. * tui/tui-layout.c (_initialize_tui_layout): Add declaration. * tui/tui-regs.c (_initialize_tui_regs): Add declaration. * tui/tui-stack.c (_initialize_tui_stack): Add declaration. * tui/tui-win.c (_initialize_tui_win): Add declaration. * tui/tui.c (_initialize_tui): Add declaration. * typeprint.c (_initialize_typeprint): Add declaration. * ui-style.c (_initialize_ui_style): Add declaration. * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration. * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration. * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration. * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration. * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration. * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration. * unittests/filtered_iterator-selftests.c (_initialize_filtered_iterator_selftests): Add declaration. * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration. * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration. * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration. * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration. * unittests/main-thread-selftests.c (_initialize_main_thread_selftests): Add declaration. * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration. * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration. * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration. * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration. * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration. * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration. * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration. * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration. * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration. * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration. * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration. * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration. * unittests/style-selftests.c (_initialize_style_selftest): Add declaration. * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration. * unittests/tui-selftests.c (_initialize_tui_selftest): Add declaration. * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration. * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration. * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration. * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration. * user-regs.c (_initialize_user_regs): Add declaration. * utils.c (_initialize_utils): Add declaration. * v850-tdep.c (_initialize_v850_tdep): Add declaration. * valops.c (_initialize_valops): Add declaration. * valprint.c (_initialize_valprint): Add declaration. * value.c (_initialize_values): Add declaration. * varobj.c (_initialize_varobj): Add declaration. * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration. * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration. * vax-tdep.c (_initialize_vax_tdep): Add declaration. * windows-nat.c (_initialize_windows_nat): Add declaration. (_initialize_check_for_gdb_ini): Add declaration. (_initialize_loadable): Add declaration. * windows-tdep.c (_initialize_windows_tdep): Add declaration. * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration. * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration. * xcoffread.c (_initialize_xcoffread): Add declaration. * xml-support.c (_initialize_xml_support): Add declaration. * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration. * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration. * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration. * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration. Change-Id: I13eec7e0ed2b3c427377a7bdb055cf46da64def9
2020-01-13 20:01:38 +01:00
void _initialize_s390_linux_tdep ();
void
gdb: add back declarations for _initialize functions I'd like to enable the -Wmissing-declarations warning. However, it warns for every _initialize function, for example: CXX dcache.o /home/smarchi/src/binutils-gdb/gdb/dcache.c: In function ‘void _initialize_dcache()’: /home/smarchi/src/binutils-gdb/gdb/dcache.c:688:1: error: no previous declaration for ‘void _initialize_dcache()’ [-Werror=missing-declarations] _initialize_dcache (void) ^~~~~~~~~~~~~~~~~~ The only practical way forward I found is to add back the declarations, which were removed by this commit: commit 481695ed5f6e0a8a9c9c50bfac1cdd2b3151e6c9 Author: John Baldwin <jhb@FreeBSD.org> Date: Sat Sep 9 11:02:37 2017 -0700 Remove unnecessary function prototypes. I don't think it's a big problem to have the declarations for these functions, but if anybody has a better solution for this, I'll be happy to use it. gdb/ChangeLog: * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration. * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration. * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration. * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration. * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration. * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration. * ada-exp.y (_initialize_ada_exp): Add declaration. * ada-lang.c (_initialize_ada_language): Add declaration. * ada-tasks.c (_initialize_tasks): Add declaration. * agent.c (_initialize_agent): Add declaration. * aix-thread.c (_initialize_aix_thread): Add declaration. * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration. * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration. * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration. * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration. * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration. * alpha-tdep.c (_initialize_alpha_tdep): Add declaration. * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration. * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration. * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration. * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration. * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration. * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration. * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration. * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration. * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration. * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration. * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration. * amd64-tdep.c (_initialize_amd64_tdep): Add declaration. * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration. * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration. * annotate.c (_initialize_annotate): Add declaration. * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration. * arc-tdep.c (_initialize_arc_tdep): Add declaration. * arch-utils.c (_initialize_gdbarch_utils): Add declaration. * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration. * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration. * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration. * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration. * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration. * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration. * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration. * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration. * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration. * arm-tdep.c (_initialize_arm_tdep): Add declaration. * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration. * auto-load.c (_initialize_auto_load): Add declaration. * auxv.c (_initialize_auxv): Add declaration. * avr-tdep.c (_initialize_avr_tdep): Add declaration. * ax-gdb.c (_initialize_ax_gdb): Add declaration. * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration. * bfin-tdep.c (_initialize_bfin_tdep): Add declaration. * break-catch-sig.c (_initialize_break_catch_sig): Add declaration. * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration. * break-catch-throw.c (_initialize_break_catch_throw): Add declaration. * breakpoint.c (_initialize_breakpoint): Add declaration. * bsd-uthread.c (_initialize_bsd_uthread): Add declaration. * btrace.c (_initialize_btrace): Add declaration. * charset.c (_initialize_charset): Add declaration. * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration. * cli/cli-dump.c (_initialize_cli_dump): Add declaration. * cli/cli-interp.c (_initialize_cli_interp): Add declaration. * cli/cli-logging.c (_initialize_cli_logging): Add declaration. * cli/cli-script.c (_initialize_cli_script): Add declaration. * cli/cli-style.c (_initialize_cli_style): Add declaration. * coff-pe-read.c (_initialize_coff_pe_read): Add declaration. * coffread.c (_initialize_coffread): Add declaration. * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration. * compile/compile.c (_initialize_compile): Add declaration. * complaints.c (_initialize_complaints): Add declaration. * completer.c (_initialize_completer): Add declaration. * copying.c (_initialize_copying): Add declaration. * corefile.c (_initialize_core): Add declaration. * corelow.c (_initialize_corelow): Add declaration. * cp-abi.c (_initialize_cp_abi): Add declaration. * cp-namespace.c (_initialize_cp_namespace): Add declaration. * cp-support.c (_initialize_cp_support): Add declaration. * cp-valprint.c (_initialize_cp_valprint): Add declaration. * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration. * cris-tdep.c (_initialize_cris_tdep): Add declaration. * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration. * csky-tdep.c (_initialize_csky_tdep): Add declaration. * ctfread.c (_initialize_ctfread): Add declaration. * d-lang.c (_initialize_d_language): Add declaration. * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration. * darwin-nat.c (_initialize_darwin_nat): Add declaration. * dbxread.c (_initialize_dbxread): Add declaration. * dcache.c (_initialize_dcache): Add declaration. * disasm-selftests.c (_initialize_disasm_selftests): Add declaration. * disasm.c (_initialize_disasm): Add declaration. * dtrace-probe.c (_initialize_dtrace_probe): Add declaration. * dummy-frame.c (_initialize_dummy_frame): Add declaration. * dwarf-index-cache.c (_initialize_index_cache): Add declaration. * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration. * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration. * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration. * dwarf2expr.c (_initialize_dwarf2expr): Add declaration. * dwarf2loc.c (_initialize_dwarf2loc): Add declaration. * dwarf2read.c (_initialize_dwarf2_read): Add declaration. * elfread.c (_initialize_elfread): Add declaration. * exec.c (_initialize_exec): Add declaration. * extension.c (_initialize_extension): Add declaration. * f-lang.c (_initialize_f_language): Add declaration. * f-valprint.c (_initialize_f_valprint): Add declaration. * fbsd-nat.c (_initialize_fbsd_nat): Add declaration. * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration. * filesystem.c (_initialize_filesystem): Add declaration. * findcmd.c (_initialize_mem_search): Add declaration. * findvar.c (_initialize_findvar): Add declaration. * fork-child.c (_initialize_fork_child): Add declaration. * frame-base.c (_initialize_frame_base): Add declaration. * frame-unwind.c (_initialize_frame_unwind): Add declaration. * frame.c (_initialize_frame): Add declaration. * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration. * frv-tdep.c (_initialize_frv_tdep): Add declaration. * ft32-tdep.c (_initialize_ft32_tdep): Add declaration. * gcore.c (_initialize_gcore): Add declaration. * gdb-demangle.c (_initialize_gdb_demangle): Add declaration. * gdb_bfd.c (_initialize_gdb_bfd): Add declaration. * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration. * gdbarch.c (_initialize_gdbarch): Add declaration. * gdbtypes.c (_initialize_gdbtypes): Add declaration. * gnu-nat.c (_initialize_gnu_nat): Add declaration. * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration. * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration. * go-lang.c (_initialize_go_language): Add declaration. * go32-nat.c (_initialize_go32_nat): Add declaration. * guile/guile.c (_initialize_guile): Add declaration. * h8300-tdep.c (_initialize_h8300_tdep): Add declaration. * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration. * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration. * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration. * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration. * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration. * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration. * hppa-tdep.c (_initialize_hppa_tdep): Add declaration. * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration. * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration. * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration. * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration. * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration. * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration. * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration. * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration. * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration. * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration. * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration. * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration. * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration. * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration. * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration. * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration. * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration. * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration. * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration. * i386-tdep.c (_initialize_i386_tdep): Add declaration. * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration. * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration. * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration. * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration. * ia64-tdep.c (_initialize_ia64_tdep): Add declaration. * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration. * infcall.c (_initialize_infcall): Add declaration. * infcmd.c (_initialize_infcmd): Add declaration. * inflow.c (_initialize_inflow): Add declaration. * infrun.c (_initialize_infrun): Add declaration. * interps.c (_initialize_interpreter): Add declaration. * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration. * jit.c (_initialize_jit): Add declaration. * language.c (_initialize_language): Add declaration. * linux-fork.c (_initialize_linux_fork): Add declaration. * linux-nat.c (_initialize_linux_nat): Add declaration. * linux-tdep.c (_initialize_linux_tdep): Add declaration. * linux-thread-db.c (_initialize_thread_db): Add declaration. * lm32-tdep.c (_initialize_lm32_tdep): Add declaration. * m2-lang.c (_initialize_m2_language): Add declaration. * m32c-tdep.c (_initialize_m32c_tdep): Add declaration. * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration. * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration. * m32r-tdep.c (_initialize_m32r_tdep): Add declaration. * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration. * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration. * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration. * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration. * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration. * m68k-tdep.c (_initialize_m68k_tdep): Add declaration. * machoread.c (_initialize_machoread): Add declaration. * macrocmd.c (_initialize_macrocmd): Add declaration. * macroscope.c (_initialize_macroscope): Add declaration. * maint-test-options.c (_initialize_maint_test_options): Add declaration. * maint-test-settings.c (_initialize_maint_test_settings): Add declaration. * maint.c (_initialize_maint_cmds): Add declaration. * mdebugread.c (_initialize_mdebugread): Add declaration. * memattr.c (_initialize_mem): Add declaration. * mep-tdep.c (_initialize_mep_tdep): Add declaration. * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration. * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration. * mi/mi-interp.c (_initialize_mi_interp): Add declaration. * mi/mi-main.c (_initialize_mi_main): Add declaration. * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration. * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration. * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration. * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration. * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration. * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration. * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration. * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration. * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration. * mips-tdep.c (_initialize_mips_tdep): Add declaration. * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration. * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration. * mipsread.c (_initialize_mipsread): Add declaration. * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration. * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration. * moxie-tdep.c (_initialize_moxie_tdep): Add declaration. * msp430-tdep.c (_initialize_msp430_tdep): Add declaration. * nds32-tdep.c (_initialize_nds32_tdep): Add declaration. * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration. * nios2-tdep.c (_initialize_nios2_tdep): Add declaration. * nto-procfs.c (_initialize_procfs): Add declaration. * objc-lang.c (_initialize_objc_language): Add declaration. * observable.c (_initialize_observer): Add declaration. * opencl-lang.c (_initialize_opencl_language): Add declaration. * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration. * or1k-tdep.c (_initialize_or1k_tdep): Add declaration. * osabi.c (_initialize_gdb_osabi): Add declaration. * osdata.c (_initialize_osdata): Add declaration. * p-valprint.c (_initialize_pascal_valprint): Add declaration. * parse.c (_initialize_parse): Add declaration. * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration. * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration. * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration. * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration. * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration. * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration. * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration. * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration. * printcmd.c (_initialize_printcmd): Add declaration. * probe.c (_initialize_probe): Add declaration. * proc-api.c (_initialize_proc_api): Add declaration. * proc-events.c (_initialize_proc_events): Add declaration. * proc-service.c (_initialize_proc_service): Add declaration. * procfs.c (_initialize_procfs): Add declaration. * producer.c (_initialize_producer): Add declaration. * psymtab.c (_initialize_psymtab): Add declaration. * python/python.c (_initialize_python): Add declaration. * ravenscar-thread.c (_initialize_ravenscar): Add declaration. * record-btrace.c (_initialize_record_btrace): Add declaration. * record-full.c (_initialize_record_full): Add declaration. * record.c (_initialize_record): Add declaration. * regcache-dump.c (_initialize_regcache_dump): Add declaration. * regcache.c (_initialize_regcache): Add declaration. * reggroups.c (_initialize_reggroup): Add declaration. * remote-notif.c (_initialize_notif): Add declaration. * remote-sim.c (_initialize_remote_sim): Add declaration. * remote.c (_initialize_remote): Add declaration. * reverse.c (_initialize_reverse): Add declaration. * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration. * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration. * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration. * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration. * riscv-tdep.c (_initialize_riscv_tdep): Add declaration. * rl78-tdep.c (_initialize_rl78_tdep): Add declaration. * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration. * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep): Add declaration. * rs6000-nat.c (_initialize_rs6000_nat): Add declaration. * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration. * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration. * rust-exp.y (_initialize_rust_exp): Add declaration. * rx-tdep.c (_initialize_rx_tdep): Add declaration. * s12z-tdep.c (_initialize_s12z_tdep): Add declaration. * s390-linux-nat.c (_initialize_s390_nat): Add declaration. * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration. * s390-tdep.c (_initialize_s390_tdep): Add declaration. * score-tdep.c (_initialize_score_tdep): Add declaration. * ser-go32.c (_initialize_ser_dos): Add declaration. * ser-mingw.c (_initialize_ser_windows): Add declaration. * ser-pipe.c (_initialize_ser_pipe): Add declaration. * ser-tcp.c (_initialize_ser_tcp): Add declaration. * ser-uds.c (_initialize_ser_socket): Add declaration. * ser-unix.c (_initialize_ser_hardwire): Add declaration. * serial.c (_initialize_serial): Add declaration. * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration. * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration. * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration. * sh-tdep.c (_initialize_sh_tdep): Add declaration. * skip.c (_initialize_step_skip): Add declaration. * sol-thread.c (_initialize_sol_thread): Add declaration. * solib-aix.c (_initialize_solib_aix): Add declaration. * solib-darwin.c (_initialize_darwin_solib): Add declaration. * solib-dsbt.c (_initialize_dsbt_solib): Add declaration. * solib-frv.c (_initialize_frv_solib): Add declaration. * solib-svr4.c (_initialize_svr4_solib): Add declaration. * solib-target.c (_initialize_solib_target): Add declaration. * solib.c (_initialize_solib): Add declaration. * source-cache.c (_initialize_source_cache): Add declaration. * source.c (_initialize_source): Add declaration. * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration. * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration. * sparc-nat.c (_initialize_sparc_nat): Add declaration. * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration. * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration. * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration. * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration. * sparc-tdep.c (_initialize_sparc_tdep): Add declaration. * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration. * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration. * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration. * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration. * sparc64-nat.c (_initialize_sparc64_nat): Add declaration. * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration. * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration. * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration. * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration. * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration. * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration. * stabsread.c (_initialize_stabsread): Add declaration. * stack.c (_initialize_stack): Add declaration. * stap-probe.c (_initialize_stap_probe): Add declaration. * std-regs.c (_initialize_frame_reg): Add declaration. * symfile-debug.c (_initialize_symfile_debug): Add declaration. * symfile-mem.c (_initialize_symfile_mem): Add declaration. * symfile.c (_initialize_symfile): Add declaration. * symmisc.c (_initialize_symmisc): Add declaration. * symtab.c (_initialize_symtab): Add declaration. * target.c (_initialize_target): Add declaration. * target-connection.c (_initialize_target_connection): Add declaration. * target-dcache.c (_initialize_target_dcache): Add declaration. * target-descriptions.c (_initialize_target_descriptions): Add declaration. * thread.c (_initialize_thread): Add declaration. * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration. * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration. * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration. * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration. * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration. * tracectf.c (_initialize_ctf): Add declaration. * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration. * tracefile.c (_initialize_tracefile): Add declaration. * tracepoint.c (_initialize_tracepoint): Add declaration. * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration. * tui/tui-interp.c (_initialize_tui_interp): Add declaration. * tui/tui-layout.c (_initialize_tui_layout): Add declaration. * tui/tui-regs.c (_initialize_tui_regs): Add declaration. * tui/tui-stack.c (_initialize_tui_stack): Add declaration. * tui/tui-win.c (_initialize_tui_win): Add declaration. * tui/tui.c (_initialize_tui): Add declaration. * typeprint.c (_initialize_typeprint): Add declaration. * ui-style.c (_initialize_ui_style): Add declaration. * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration. * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration. * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration. * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration. * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration. * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration. * unittests/filtered_iterator-selftests.c (_initialize_filtered_iterator_selftests): Add declaration. * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration. * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration. * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration. * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration. * unittests/main-thread-selftests.c (_initialize_main_thread_selftests): Add declaration. * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration. * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration. * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration. * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration. * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration. * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration. * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration. * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration. * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration. * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration. * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration. * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration. * unittests/style-selftests.c (_initialize_style_selftest): Add declaration. * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration. * unittests/tui-selftests.c (_initialize_tui_selftest): Add declaration. * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration. * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration. * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration. * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration. * user-regs.c (_initialize_user_regs): Add declaration. * utils.c (_initialize_utils): Add declaration. * v850-tdep.c (_initialize_v850_tdep): Add declaration. * valops.c (_initialize_valops): Add declaration. * valprint.c (_initialize_valprint): Add declaration. * value.c (_initialize_values): Add declaration. * varobj.c (_initialize_varobj): Add declaration. * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration. * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration. * vax-tdep.c (_initialize_vax_tdep): Add declaration. * windows-nat.c (_initialize_windows_nat): Add declaration. (_initialize_check_for_gdb_ini): Add declaration. (_initialize_loadable): Add declaration. * windows-tdep.c (_initialize_windows_tdep): Add declaration. * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration. * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration. * xcoffread.c (_initialize_xcoffread): Add declaration. * xml-support.c (_initialize_xml_support): Add declaration. * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration. * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration. * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration. * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration. Change-Id: I13eec7e0ed2b3c427377a7bdb055cf46da64def9
2020-01-13 20:01:38 +01:00
_initialize_s390_linux_tdep ()
{
/* Hook us into the OSABI mechanism. */
gdbarch_register_osabi (bfd_arch_s390, bfd_mach_s390_31, GDB_OSABI_LINUX,
s390_linux_init_abi_31);
gdbarch_register_osabi (bfd_arch_s390, bfd_mach_s390_64, GDB_OSABI_LINUX,
s390_linux_init_abi_64);
/* Initialize the GNU/Linux target descriptions. */
ChangeLog: * s390-tdep.h (S390_ORIG_R2_REGNUM): Define. (S390_LAST_BREAK_REGNUM): Likewise. (S390_SYSTEM_CALL_REGNUM): Likewise. (S390_NUM_REGS): Update. (s390_regmap_last_break): Add declaration. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (tdesc_s390_linux32v1): Add declaration. (tdesc_s390_linux32v2): Likewise. (tdesc_s390_linux64v1): Likewise. (tdesc_s390_linux64v2): Likewise. (tdesc_s390x_linux64v1): Likewise. (tdesc_s390x_linux64v2): Likewise. * s390-tdep.c: Include new target description files "features/s390-linux32v1.c", "features/s390-linux32v2.c", "features/s390-linux64v1.c", "features/s390-linux64v2.c", "features/s390x-linux64v1.c", and "features/s390x-linux64v2.c". (s390_cannot_store_register): New function. (s390_write_pc): Likewise. (s390_dwarf_regmap): Add fields for new registers. (s390_regmap_gregset): Likewise. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): Likewise. (s390_regmap_last_break): New variable. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (s390_last_break_regset): Likewise. (s390x_last_break_regset): Likewise. (s390_system_call_regset): Likewise. (s390_upper_regset_sections): Rename to ... (s390_linux64_regset_sections): ... this. (s390_linux32_regset_sections): New variable. (s390x_linux64_regset_sections): Likewise. (s390_linux32v1_regset_sections): Likewise. (s390_linux32v2_regset_sections): Likewise. (s390_linux64v1_regset_sections): Likewise. (s390_linux64v2_regset_sections): Likewise. (s390x_linux64v1_regset_sections): Likewise. (s390x_linux64v2_regset_sections): Likewise. (s390_regset_from_core_section): Handle .reg-s390-last-break and .reg-s390-system-call core file sections. (s390_core_read_description): Check for presence of .reg-s390-last-break and .reg-s390-system-call core file sections and return appropriate target description. (s390_gdbarch_init): Detect Linux-specific registers "orig_r2", "last_break" and "system_call" in target description. Install appropriate gdbarch_core_regset_sections array. Call set_gdbarch_cannot_store_register and set_gdbarch_write_pc. (_initialize_s390_tdep): Initialize additional target descriptions. * s390-nat.c: Include "elf/common.h". (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (have_regset_last_break): New static variable. (have_regset_system_call): Likewise. (s390_native_supply): Handle S390_ORIG_R2_REGNUM. (s390_native_collect): Likewise. (fetch_regset, store_regset, check_regset): New functions. (s390_linux_fetch_inferior_registers): Handle S390_LAST_BREAK_REGNUM and S390_SYSTEM_CALL_REGNUM. (s390_linux_store_inferior_registers): Likewise. (s390_read_description): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. * features/Makefile (WHICH): Add s390-linux32v1, s390-linux64v1, s390x-linux64v1, s390-linux32v2, s390-linux64v2, and s390x-linux64v2. (s390-linux32v1-expedite): Define. (s390-linux32v2-expedite): Likewise. (s390-linux64v1-expedite): Likewise. (s390-linux64v2-expedite): Likewise. (s390x-linux64v1-expedite): Likewise. (s390x-linux64v2-expedite): Likewise. * features/s390-linux32.xml: Add orig_r2 register. * features/s390-linux64.xml: Likewise. * features/s390x-linux64.xml: Likewise. * features/s390-linux32v1.xml: New file. * features/s390-linux32v2.xml: Likewise. * features/s390-linux64v1.xml: Likewise. * features/s390-linux64v2.xml: Likewise. * features/s390x-linux64v1.xml: Likewise. * features/s390x-linux64v2.xml: Likewise. * features/s390-linux32.c: Regenerate. * features/s390-linux64.c: Likewise. * features/s390x-linux64.c: Likewise. * features/s390-linux32v1.c: New generated file. * features/s390-linux32v2.c: Likewise. * features/s390-linux64v1.c: Likewise. * features/s390-linux64v2.c: Likewise. * features/s390x-linux64v1.c: Likewise. * features/s390x-linux64v2.c: Likewise. * regformats/s390-linux32.dat: Regenerate. * regformats/s390-linux64.dat: Regenerate. * regformats/s390x-linux64.dat: Regenerate. * regformats/s390-linux32v1.dat: New generated file. * regformats/s390-linux32v2.dat: Likewise. * regformats/s390-linux64v1.dat: Likewise. * regformats/s390-linux64v2.dat: Likewise. * regformats/s390x-linux64v1.dat: Likewise. * regformats/s390x-linux64v2.dat: Likewise. gdbserver/ChangeLog: * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules. (s390-linux32v2.o, s390-linux32v2.c): Likewise. (s390-linux64v1.o, s390-linux64v1.c): Likewise. (s390-linux64v2.o, s390-linux64v2.c): Likewise. (s390x-linux64v1.o, s390x-linux64v1.c): Likewise. (s390x-linux64v2.o, s390x-linux64v2.c): Likewise. * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects. (srv_xmlfiles): Add new XML files. * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>, and <sys/uio.h>. (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (init_registers_s390_linux32v1): Add prototype. (init_registers_s390_linux32v2): Likewise. (init_registers_s390_linux64v1): Likewise. (init_registers_s390_linux64v2): Likewise. (init_registers_s390x_linux64v1): Likewise. (init_registers_s390x_linux64v2): Likewise. (s390_num_regs): Increment to 52. (s390_regmap): Add orig_r2 register. (s390_num_regs_3264): Increment to 68. (s390_regmap_3264): Add orig_r2 register. (s390_collect_ptrace_register): Handle orig_r2 register. (s390_supply_ptrace_register): Likewise. (s390_fill_last_break): New function. (s390_store_last_break): Likewise. (s390_fill_system_call): New function. (s390_store_system_call): Likewise. (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL register sets. (s390_check_regset): New function. (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. Update target_regsets for available register sets. testsuite/ChangeLog: * gdb.base/callfuncs.exp (fetch_all_registers): Filter out read-only last_break register on s390*-*-* targets.
2011-12-06 15:14:50 +01:00
initialize_tdesc_s390_linux32v1 ();
initialize_tdesc_s390_linux32v2 ();
* features/Makefile (WHICH): Add s390-linux32, s390-linux64, and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
initialize_tdesc_s390_linux64 ();
ChangeLog: * s390-tdep.h (S390_ORIG_R2_REGNUM): Define. (S390_LAST_BREAK_REGNUM): Likewise. (S390_SYSTEM_CALL_REGNUM): Likewise. (S390_NUM_REGS): Update. (s390_regmap_last_break): Add declaration. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (tdesc_s390_linux32v1): Add declaration. (tdesc_s390_linux32v2): Likewise. (tdesc_s390_linux64v1): Likewise. (tdesc_s390_linux64v2): Likewise. (tdesc_s390x_linux64v1): Likewise. (tdesc_s390x_linux64v2): Likewise. * s390-tdep.c: Include new target description files "features/s390-linux32v1.c", "features/s390-linux32v2.c", "features/s390-linux64v1.c", "features/s390-linux64v2.c", "features/s390x-linux64v1.c", and "features/s390x-linux64v2.c". (s390_cannot_store_register): New function. (s390_write_pc): Likewise. (s390_dwarf_regmap): Add fields for new registers. (s390_regmap_gregset): Likewise. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): Likewise. (s390_regmap_last_break): New variable. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (s390_last_break_regset): Likewise. (s390x_last_break_regset): Likewise. (s390_system_call_regset): Likewise. (s390_upper_regset_sections): Rename to ... (s390_linux64_regset_sections): ... this. (s390_linux32_regset_sections): New variable. (s390x_linux64_regset_sections): Likewise. (s390_linux32v1_regset_sections): Likewise. (s390_linux32v2_regset_sections): Likewise. (s390_linux64v1_regset_sections): Likewise. (s390_linux64v2_regset_sections): Likewise. (s390x_linux64v1_regset_sections): Likewise. (s390x_linux64v2_regset_sections): Likewise. (s390_regset_from_core_section): Handle .reg-s390-last-break and .reg-s390-system-call core file sections. (s390_core_read_description): Check for presence of .reg-s390-last-break and .reg-s390-system-call core file sections and return appropriate target description. (s390_gdbarch_init): Detect Linux-specific registers "orig_r2", "last_break" and "system_call" in target description. Install appropriate gdbarch_core_regset_sections array. Call set_gdbarch_cannot_store_register and set_gdbarch_write_pc. (_initialize_s390_tdep): Initialize additional target descriptions. * s390-nat.c: Include "elf/common.h". (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (have_regset_last_break): New static variable. (have_regset_system_call): Likewise. (s390_native_supply): Handle S390_ORIG_R2_REGNUM. (s390_native_collect): Likewise. (fetch_regset, store_regset, check_regset): New functions. (s390_linux_fetch_inferior_registers): Handle S390_LAST_BREAK_REGNUM and S390_SYSTEM_CALL_REGNUM. (s390_linux_store_inferior_registers): Likewise. (s390_read_description): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. * features/Makefile (WHICH): Add s390-linux32v1, s390-linux64v1, s390x-linux64v1, s390-linux32v2, s390-linux64v2, and s390x-linux64v2. (s390-linux32v1-expedite): Define. (s390-linux32v2-expedite): Likewise. (s390-linux64v1-expedite): Likewise. (s390-linux64v2-expedite): Likewise. (s390x-linux64v1-expedite): Likewise. (s390x-linux64v2-expedite): Likewise. * features/s390-linux32.xml: Add orig_r2 register. * features/s390-linux64.xml: Likewise. * features/s390x-linux64.xml: Likewise. * features/s390-linux32v1.xml: New file. * features/s390-linux32v2.xml: Likewise. * features/s390-linux64v1.xml: Likewise. * features/s390-linux64v2.xml: Likewise. * features/s390x-linux64v1.xml: Likewise. * features/s390x-linux64v2.xml: Likewise. * features/s390-linux32.c: Regenerate. * features/s390-linux64.c: Likewise. * features/s390x-linux64.c: Likewise. * features/s390-linux32v1.c: New generated file. * features/s390-linux32v2.c: Likewise. * features/s390-linux64v1.c: Likewise. * features/s390-linux64v2.c: Likewise. * features/s390x-linux64v1.c: Likewise. * features/s390x-linux64v2.c: Likewise. * regformats/s390-linux32.dat: Regenerate. * regformats/s390-linux64.dat: Regenerate. * regformats/s390x-linux64.dat: Regenerate. * regformats/s390-linux32v1.dat: New generated file. * regformats/s390-linux32v2.dat: Likewise. * regformats/s390-linux64v1.dat: Likewise. * regformats/s390-linux64v2.dat: Likewise. * regformats/s390x-linux64v1.dat: Likewise. * regformats/s390x-linux64v2.dat: Likewise. gdbserver/ChangeLog: * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules. (s390-linux32v2.o, s390-linux32v2.c): Likewise. (s390-linux64v1.o, s390-linux64v1.c): Likewise. (s390-linux64v2.o, s390-linux64v2.c): Likewise. (s390x-linux64v1.o, s390x-linux64v1.c): Likewise. (s390x-linux64v2.o, s390x-linux64v2.c): Likewise. * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects. (srv_xmlfiles): Add new XML files. * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>, and <sys/uio.h>. (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (init_registers_s390_linux32v1): Add prototype. (init_registers_s390_linux32v2): Likewise. (init_registers_s390_linux64v1): Likewise. (init_registers_s390_linux64v2): Likewise. (init_registers_s390x_linux64v1): Likewise. (init_registers_s390x_linux64v2): Likewise. (s390_num_regs): Increment to 52. (s390_regmap): Add orig_r2 register. (s390_num_regs_3264): Increment to 68. (s390_regmap_3264): Add orig_r2 register. (s390_collect_ptrace_register): Handle orig_r2 register. (s390_supply_ptrace_register): Likewise. (s390_fill_last_break): New function. (s390_store_last_break): Likewise. (s390_fill_system_call): New function. (s390_store_system_call): Likewise. (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL register sets. (s390_check_regset): New function. (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. Update target_regsets for available register sets. testsuite/ChangeLog: * gdb.base/callfuncs.exp (fetch_all_registers): Filter out read-only last_break register on s390*-*-* targets.
2011-12-06 15:14:50 +01:00
initialize_tdesc_s390_linux64v1 ();
initialize_tdesc_s390_linux64v2 ();
gdb/ChangeLog: 2013-09-13 Andreas Arnez <arnez@linux.vnet.ibm.com> * NEWS: Mention TDB support. * features/s390-tdb.xml: New file. * features/s390-te-linux64.xml: New file. * features/s390x-te-linux64.xml: New file. * features/Makefile (WHICH): Add new tdescs above. (s390-te-linux64-expedite): Set. (s390x-te-linux64-expedite): Set. * features/s390-te-linux64.c: New file (generated). * features/s390x-te-linux64.c: New file (generated). * regformats/s390-te-linux64.dat: New file (generated). * regformats/s390x-te-linux64.dat: New file (generated). * s390-tdep.h (HWCAP_S390_HIGH_GPRS): Define. (HWCAP_S390_TE): Likewise. (S390_TDB_DWORD0_REGNUM): Likewise. (S390_TDB_DWORD0_REGNUM): Likewise. (S390_TDB_ABORT_CODE_REGNUM): Likewise. (S390_TDB_CONFLICT_TOKEN_REGNUM): Likewise. (S390_TDB_ATIA_REGNUM): Likewise. (S390_TDB_R0_REGNUM): Likewise. (S390_TDB_R1_REGNUM): Likewise. (S390_TDB_R2_REGNUM): Likewise. (S390_TDB_R3_REGNUM): Likewise. (S390_TDB_R4_REGNUM): Likewise. (S390_TDB_R5_REGNUM): Likewise. (S390_TDB_R6_REGNUM): Likewise. (S390_TDB_R7_REGNUM): Likewise. (S390_TDB_R8_REGNUM): Likewise. (S390_TDB_R9_REGNUM): Likewise. (S390_TDB_R10_REGNUM): Likewise. (S390_TDB_R11_REGNUM): Likewise. (S390_TDB_R12_REGNUM): Likewise. (S390_TDB_R13_REGNUM): Likewise. (S390_TDB_R14_REGNUM): Likewise. (S390_TDB_R15_REGNUM): Likewise. (S390_NUM_REGS): Increase. (S390_IS_TDBREGSET_REGNUM): New macro. (s390_regmap_tdb): Declare. (s390_sizeof_tdbregset): Define. (tdesc_s390_te_linux64): Declare. (tdesc_s390x_te_linux64): Likewise. * s390-tdep.c: Add includes for "auxv.h", <elf.h>, "features/s390-te-linux64.c", and "features/s390x-te-linux64.c". (s390_regmap_tdb): New regmap. (s390_supply_tdb_regset): New function. (s390_tdb_regset): New regset. (s390_linux64v2_regset_sections): Add TDB regset to list. (s390x_linux64v2_regset_sections): Likewise. (s390_regset_from_core_section): Recognize TDB core note section. (s390_core_read_description): If HWCAP indicates TE support, select tdesc_s390_te_linux64 or tdesc_s390_s390x_te_linux64. (s390_gdbarch_init): Handle TDB regset. (_initialize_s390_tdep): Initialize new tdescs. * s390-nat.c (HWCAP_S390_HIGH_GPRS): Remove define. (have_regset_tdb): New variable. (s390_native_supply): Support register invalidation. (fetch_regset): Invalidate registers if ptrace yields ENODATA. (check_regset): Treat ENODATA as "regset exists". (s390_linux_fetch_inferior_registers): Add TDB. (s390_read_description): Check for TDB existence and select appropriate tdesc. * gdbserver/Makefile.in (clean): Add removal of new makefile targets. (s390-te-linux64.c): New makefile target. (s390x-te-linux64.c): Likewise. * gdbserver/configure.srv (srv_regobj): Append new objects s390-te-linux64.o and s390x-te-linux64.o. (srv_xmlfiles): Append new files s390-te-linux64.xml, s390x-te-linux64.xml, and s390-tdb.xml. * gdbserver/linux-s390-low.c (init_registers_s390_te_linux64): New declaration. (tdesc_s390_te_linux64): Likewise. (init_registers_s390x_te_linux64): Likewise. (tdesc_s390x_te_linux64): Likewise. (s390_check_regset): Treat ENODATA as "regset exists". (s390_arch_setup): Add TDB regset support. (initialize_low_arch): Initialize registers for new tdescs. gdb/doc/ChangeLog: 2013-09-13 Andreas Arnez <arnez@linux.vnet.ibm.com> * gdb.texinfo (Decimal Floating Point format): Mention S/390. (Standard Target Features): Add new node to menu. (S/390 and System z Features): New node. gdb/testsuite/ChangeLog: 2013-09-13 Andreas Arnez <arnez@linux.vnet.ibm.com> * gdb.arch/s390-tdbregs.c: New file. * gdb.arch/s390-tdbregs.exp: New file.
2013-09-13 16:17:31 +02:00
initialize_tdesc_s390_te_linux64 ();
S390: Add vector register support to gdb Recognize S/390 targets with the new vector feature and present their vector registers appropriately: as 32 new 128-bit wide registers v0-v31, where the first 16 embed the floating point registers f0-f15. Each of the full registers v0-v15 is modelled as a pseudo register. gdb/ChangeLog: * s390-linux-nat.c (have_regset_vxrs): New static variable. (s390_linux_fetch_inferior_registers): Handle vector registers, if present. (s390_linux_store_inferior_registers): Likewise. (s390_get_hwcap): Remove function. Embed its logic... (s390_read_description): ...here. Yield a target description with vector registers if applicable. * s390-linux-tdep.c: Include "features/s390-vx-linux64.c", "features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and "features/s390x-tevx-linux64.c". (struct gdbarch_tdep) <v0_full_regnum>: New field. (s390_dwarf_regmap): Add vector registers. Remove bogus entries for "GNU/Linux-specific registers". (s390_dwarf_reg_r0l): New enum value. (s390_dwarf_reg_to_regnum): Support vector registers. (s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers of GPR lower halves. (regnum_is_vxr_full): New function. (s390_register_name): New function. (s390_pseudo_register_name): Handle v0-v15, which are composed of f0-f15 and v0l-v15l. (s390_pseudo_register_type): Likewise. (s390_pseudo_register_read): Likewise. (s390_pseudo_register_write): Likewise. (s390_value_from_register): Account for the fact that values are placed left-justified in vector registers. (s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to the vector reggroup and omit them from the general reggroup. (s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps. (s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets. (s390_iterate_over_regset_sections): Add iterations for the two new vector regsets. (s390_core_read_description): Yield a target description with vector registers if applicable. (s390_gdbarch_init): Handle target descriptions with vector registers. Add "register_name" gdbarch method. (_initialize_s390_tdep): Call new tdesc initialization functions. * s390-linux-tdep.h (HWCAP_S390_VX): New macro. (S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM) (S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM) (S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM) (S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM) (S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM) (S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM) (S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM) (S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM) (S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM) (S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM) (S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM) (S390_V30_REGNUM, S390_V31_REGNUM): New macros. (S390_NUM_REGS): Adjust value. (s390_vxrs_low_regset, s390_vxrs_high_regset): Declare. (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64) (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise. * NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
initialize_tdesc_s390_vx_linux64 ();
initialize_tdesc_s390_tevx_linux64 ();
initialize_tdesc_s390_gs_linux64 ();
ChangeLog: * s390-tdep.h (S390_ORIG_R2_REGNUM): Define. (S390_LAST_BREAK_REGNUM): Likewise. (S390_SYSTEM_CALL_REGNUM): Likewise. (S390_NUM_REGS): Update. (s390_regmap_last_break): Add declaration. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (tdesc_s390_linux32v1): Add declaration. (tdesc_s390_linux32v2): Likewise. (tdesc_s390_linux64v1): Likewise. (tdesc_s390_linux64v2): Likewise. (tdesc_s390x_linux64v1): Likewise. (tdesc_s390x_linux64v2): Likewise. * s390-tdep.c: Include new target description files "features/s390-linux32v1.c", "features/s390-linux32v2.c", "features/s390-linux64v1.c", "features/s390-linux64v2.c", "features/s390x-linux64v1.c", and "features/s390x-linux64v2.c". (s390_cannot_store_register): New function. (s390_write_pc): Likewise. (s390_dwarf_regmap): Add fields for new registers. (s390_regmap_gregset): Likewise. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): Likewise. (s390_regmap_last_break): New variable. (s390x_regmap_last_break): Likewise. (s390_regmap_system_call): Likewise. (s390_last_break_regset): Likewise. (s390x_last_break_regset): Likewise. (s390_system_call_regset): Likewise. (s390_upper_regset_sections): Rename to ... (s390_linux64_regset_sections): ... this. (s390_linux32_regset_sections): New variable. (s390x_linux64_regset_sections): Likewise. (s390_linux32v1_regset_sections): Likewise. (s390_linux32v2_regset_sections): Likewise. (s390_linux64v1_regset_sections): Likewise. (s390_linux64v2_regset_sections): Likewise. (s390x_linux64v1_regset_sections): Likewise. (s390x_linux64v2_regset_sections): Likewise. (s390_regset_from_core_section): Handle .reg-s390-last-break and .reg-s390-system-call core file sections. (s390_core_read_description): Check for presence of .reg-s390-last-break and .reg-s390-system-call core file sections and return appropriate target description. (s390_gdbarch_init): Detect Linux-specific registers "orig_r2", "last_break" and "system_call" in target description. Install appropriate gdbarch_core_regset_sections array. Call set_gdbarch_cannot_store_register and set_gdbarch_write_pc. (_initialize_s390_tdep): Initialize additional target descriptions. * s390-nat.c: Include "elf/common.h". (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (have_regset_last_break): New static variable. (have_regset_system_call): Likewise. (s390_native_supply): Handle S390_ORIG_R2_REGNUM. (s390_native_collect): Likewise. (fetch_regset, store_regset, check_regset): New functions. (s390_linux_fetch_inferior_registers): Handle S390_LAST_BREAK_REGNUM and S390_SYSTEM_CALL_REGNUM. (s390_linux_store_inferior_registers): Likewise. (s390_read_description): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. * features/Makefile (WHICH): Add s390-linux32v1, s390-linux64v1, s390x-linux64v1, s390-linux32v2, s390-linux64v2, and s390x-linux64v2. (s390-linux32v1-expedite): Define. (s390-linux32v2-expedite): Likewise. (s390-linux64v1-expedite): Likewise. (s390-linux64v2-expedite): Likewise. (s390x-linux64v1-expedite): Likewise. (s390x-linux64v2-expedite): Likewise. * features/s390-linux32.xml: Add orig_r2 register. * features/s390-linux64.xml: Likewise. * features/s390x-linux64.xml: Likewise. * features/s390-linux32v1.xml: New file. * features/s390-linux32v2.xml: Likewise. * features/s390-linux64v1.xml: Likewise. * features/s390-linux64v2.xml: Likewise. * features/s390x-linux64v1.xml: Likewise. * features/s390x-linux64v2.xml: Likewise. * features/s390-linux32.c: Regenerate. * features/s390-linux64.c: Likewise. * features/s390x-linux64.c: Likewise. * features/s390-linux32v1.c: New generated file. * features/s390-linux32v2.c: Likewise. * features/s390-linux64v1.c: Likewise. * features/s390-linux64v2.c: Likewise. * features/s390x-linux64v1.c: Likewise. * features/s390x-linux64v2.c: Likewise. * regformats/s390-linux32.dat: Regenerate. * regformats/s390-linux64.dat: Regenerate. * regformats/s390x-linux64.dat: Regenerate. * regformats/s390-linux32v1.dat: New generated file. * regformats/s390-linux32v2.dat: Likewise. * regformats/s390-linux64v1.dat: Likewise. * regformats/s390-linux64v2.dat: Likewise. * regformats/s390x-linux64v1.dat: Likewise. * regformats/s390x-linux64v2.dat: Likewise. gdbserver/ChangeLog: * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules. (s390-linux32v2.o, s390-linux32v2.c): Likewise. (s390-linux64v1.o, s390-linux64v1.c): Likewise. (s390-linux64v2.o, s390-linux64v2.c): Likewise. (s390x-linux64v1.o, s390x-linux64v1.c): Likewise. (s390x-linux64v2.o, s390x-linux64v2.c): Likewise. * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects. (srv_xmlfiles): Add new XML files. * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>, and <sys/uio.h>. (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined. (init_registers_s390_linux32v1): Add prototype. (init_registers_s390_linux32v2): Likewise. (init_registers_s390_linux64v1): Likewise. (init_registers_s390_linux64v2): Likewise. (init_registers_s390x_linux64v1): Likewise. (init_registers_s390x_linux64v2): Likewise. (s390_num_regs): Increment to 52. (s390_regmap): Add orig_r2 register. (s390_num_regs_3264): Increment to 68. (s390_regmap_3264): Add orig_r2 register. (s390_collect_ptrace_register): Handle orig_r2 register. (s390_supply_ptrace_register): Likewise. (s390_fill_last_break): New function. (s390_store_last_break): Likewise. (s390_fill_system_call): New function. (s390_store_system_call): Likewise. (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL register sets. (s390_check_regset): New function. (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL regsets and use appropriate description. Update target_regsets for available register sets. testsuite/ChangeLog: * gdb.base/callfuncs.exp (fetch_all_registers): Filter out read-only last_break register on s390*-*-* targets.
2011-12-06 15:14:50 +01:00
initialize_tdesc_s390x_linux64v1 ();
initialize_tdesc_s390x_linux64v2 ();
gdb/ChangeLog: 2013-09-13 Andreas Arnez <arnez@linux.vnet.ibm.com> * NEWS: Mention TDB support. * features/s390-tdb.xml: New file. * features/s390-te-linux64.xml: New file. * features/s390x-te-linux64.xml: New file. * features/Makefile (WHICH): Add new tdescs above. (s390-te-linux64-expedite): Set. (s390x-te-linux64-expedite): Set. * features/s390-te-linux64.c: New file (generated). * features/s390x-te-linux64.c: New file (generated). * regformats/s390-te-linux64.dat: New file (generated). * regformats/s390x-te-linux64.dat: New file (generated). * s390-tdep.h (HWCAP_S390_HIGH_GPRS): Define. (HWCAP_S390_TE): Likewise. (S390_TDB_DWORD0_REGNUM): Likewise. (S390_TDB_DWORD0_REGNUM): Likewise. (S390_TDB_ABORT_CODE_REGNUM): Likewise. (S390_TDB_CONFLICT_TOKEN_REGNUM): Likewise. (S390_TDB_ATIA_REGNUM): Likewise. (S390_TDB_R0_REGNUM): Likewise. (S390_TDB_R1_REGNUM): Likewise. (S390_TDB_R2_REGNUM): Likewise. (S390_TDB_R3_REGNUM): Likewise. (S390_TDB_R4_REGNUM): Likewise. (S390_TDB_R5_REGNUM): Likewise. (S390_TDB_R6_REGNUM): Likewise. (S390_TDB_R7_REGNUM): Likewise. (S390_TDB_R8_REGNUM): Likewise. (S390_TDB_R9_REGNUM): Likewise. (S390_TDB_R10_REGNUM): Likewise. (S390_TDB_R11_REGNUM): Likewise. (S390_TDB_R12_REGNUM): Likewise. (S390_TDB_R13_REGNUM): Likewise. (S390_TDB_R14_REGNUM): Likewise. (S390_TDB_R15_REGNUM): Likewise. (S390_NUM_REGS): Increase. (S390_IS_TDBREGSET_REGNUM): New macro. (s390_regmap_tdb): Declare. (s390_sizeof_tdbregset): Define. (tdesc_s390_te_linux64): Declare. (tdesc_s390x_te_linux64): Likewise. * s390-tdep.c: Add includes for "auxv.h", <elf.h>, "features/s390-te-linux64.c", and "features/s390x-te-linux64.c". (s390_regmap_tdb): New regmap. (s390_supply_tdb_regset): New function. (s390_tdb_regset): New regset. (s390_linux64v2_regset_sections): Add TDB regset to list. (s390x_linux64v2_regset_sections): Likewise. (s390_regset_from_core_section): Recognize TDB core note section. (s390_core_read_description): If HWCAP indicates TE support, select tdesc_s390_te_linux64 or tdesc_s390_s390x_te_linux64. (s390_gdbarch_init): Handle TDB regset. (_initialize_s390_tdep): Initialize new tdescs. * s390-nat.c (HWCAP_S390_HIGH_GPRS): Remove define. (have_regset_tdb): New variable. (s390_native_supply): Support register invalidation. (fetch_regset): Invalidate registers if ptrace yields ENODATA. (check_regset): Treat ENODATA as "regset exists". (s390_linux_fetch_inferior_registers): Add TDB. (s390_read_description): Check for TDB existence and select appropriate tdesc. * gdbserver/Makefile.in (clean): Add removal of new makefile targets. (s390-te-linux64.c): New makefile target. (s390x-te-linux64.c): Likewise. * gdbserver/configure.srv (srv_regobj): Append new objects s390-te-linux64.o and s390x-te-linux64.o. (srv_xmlfiles): Append new files s390-te-linux64.xml, s390x-te-linux64.xml, and s390-tdb.xml. * gdbserver/linux-s390-low.c (init_registers_s390_te_linux64): New declaration. (tdesc_s390_te_linux64): Likewise. (init_registers_s390x_te_linux64): Likewise. (tdesc_s390x_te_linux64): Likewise. (s390_check_regset): Treat ENODATA as "regset exists". (s390_arch_setup): Add TDB regset support. (initialize_low_arch): Initialize registers for new tdescs. gdb/doc/ChangeLog: 2013-09-13 Andreas Arnez <arnez@linux.vnet.ibm.com> * gdb.texinfo (Decimal Floating Point format): Mention S/390. (Standard Target Features): Add new node to menu. (S/390 and System z Features): New node. gdb/testsuite/ChangeLog: 2013-09-13 Andreas Arnez <arnez@linux.vnet.ibm.com> * gdb.arch/s390-tdbregs.c: New file. * gdb.arch/s390-tdbregs.exp: New file.
2013-09-13 16:17:31 +02:00
initialize_tdesc_s390x_te_linux64 ();
S390: Add vector register support to gdb Recognize S/390 targets with the new vector feature and present their vector registers appropriately: as 32 new 128-bit wide registers v0-v31, where the first 16 embed the floating point registers f0-f15. Each of the full registers v0-v15 is modelled as a pseudo register. gdb/ChangeLog: * s390-linux-nat.c (have_regset_vxrs): New static variable. (s390_linux_fetch_inferior_registers): Handle vector registers, if present. (s390_linux_store_inferior_registers): Likewise. (s390_get_hwcap): Remove function. Embed its logic... (s390_read_description): ...here. Yield a target description with vector registers if applicable. * s390-linux-tdep.c: Include "features/s390-vx-linux64.c", "features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and "features/s390x-tevx-linux64.c". (struct gdbarch_tdep) <v0_full_regnum>: New field. (s390_dwarf_regmap): Add vector registers. Remove bogus entries for "GNU/Linux-specific registers". (s390_dwarf_reg_r0l): New enum value. (s390_dwarf_reg_to_regnum): Support vector registers. (s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers of GPR lower halves. (regnum_is_vxr_full): New function. (s390_register_name): New function. (s390_pseudo_register_name): Handle v0-v15, which are composed of f0-f15 and v0l-v15l. (s390_pseudo_register_type): Likewise. (s390_pseudo_register_read): Likewise. (s390_pseudo_register_write): Likewise. (s390_value_from_register): Account for the fact that values are placed left-justified in vector registers. (s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to the vector reggroup and omit them from the general reggroup. (s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps. (s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets. (s390_iterate_over_regset_sections): Add iterations for the two new vector regsets. (s390_core_read_description): Yield a target description with vector registers if applicable. (s390_gdbarch_init): Handle target descriptions with vector registers. Add "register_name" gdbarch method. (_initialize_s390_tdep): Call new tdesc initialization functions. * s390-linux-tdep.h (HWCAP_S390_VX): New macro. (S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM) (S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM) (S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM) (S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM) (S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM) (S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM) (S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM) (S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM) (S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM) (S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM) (S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM) (S390_V30_REGNUM, S390_V31_REGNUM): New macros. (S390_NUM_REGS): Adjust value. (s390_vxrs_low_regset, s390_vxrs_high_regset): Declare. (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64) (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise. * NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
initialize_tdesc_s390x_vx_linux64 ();
initialize_tdesc_s390x_tevx_linux64 ();
initialize_tdesc_s390x_gs_linux64 ();
}