8d619c01db
This patch adds support for Hardware Transactional Memory registers for the powerpc linux native and core file targets, and for the pwoerpc linux server stub. These registers include both the HTM special-purpose registers (TFHAR, TEXASR and TFIAR) as well as the set of registers that are checkpointed (saved) when a transaction is initiated, which the processor restores in the event of a transaction failure. The set of checkpointed general-purpose registers is returned by the linux kernel in the same format as the regular general-purpose registers, defined in struct pt_regs. However, the architecture specifies that only some of the registers present in pt_regs are checkpointed (GPRs 0-31, CR, XER, LR and CTR). The kernel fills the slots for MSR and NIP with other info. The other fields usually don't have meaningful values. GDB doesn't define registers that are not checkpointed in the architecture, but when generating a core file, GDB fills the slot for the checkpointed MSR with the regular MSR. These are usually similar, although some bits might be different, and in some cases the checkpointed MSR will have a value of 0 in a kernel-generated core-file. The checkpointed NIP is filled with TFHAR by GDB in the core-file, which is what the kernel does. The other fields are set to 0 by GDB. Core files generated by the kernel have a note section for checkpointed GPRs with the same size for both 32-bit and 64-bit threads, and the values for the registers of a 32-bit thread are squeezed in the first half, with no useful data in the second half. GDB generates a smaller note section for 32-bit threads, but can read both sizes. The checkpointed XER is required to be 32-bit in the target description documentation, even though the more recent ISAs define it as 64-bit wide, since the high-order 32-bits are reserved, and because in Linux there is no way to get a 64-bit checkpointed XER for 32-bit threads. If this changes in the future, the target description feature requirement can be relaxed to allow for a 64-bit checkpointed XER. Access to the checkpointed CR (condition register) can be confusing. The architecture only specifies that CR fields 1 to 7 (the 24 least significant bits) are checkpointed, but the kernel provides all 8 fields (32 bits). The value of field 0 is not masked by ptrace, so it will sometimes show the result of some kernel operation, probably treclaim., which sets this field. The checkpointed registers are marked not to be saved and restored. Inferior function calls during an active transaction don't work well, and it's unclear what should be done in this case. TEXASR and TFIAR can be altered asynchronously, during transaction failure recording, so they are also not saved and restored. For consistency neither is TFHAR. Record and replay also doesn't work well when transactions are involved. This patch doesn't address this, so the values of the HTM SPRs will sometimes be innacurate when the record/relay target is enabled. For instance, executing a "tbegin." alters TFHAR and TEXASR, but these changes are not currently recorded. Because the checkpointed registers are only available when a transaction is active (or suspended), ptrace can return ENODATA when gdb tries to read these registers and the inferior is not in a transactional state. The registers are set to the unavailable state when this happens. When gbd tries to write to one of these registers, and it is unavailable, an error is raised. The "fill" functions for checkpointed register sets in the server stub are not implemented for the same reason as for the EBB register set, since ptrace can also return ENODATA for checkpointed regsets. The same issues with 'G' packets apply here. Just like for the EBB registers, tracepoints will not mark the checkpointed registers as unavailable if the inferior was not in a transaction, so their content will also show 0 instead of <unavailable> when inspecting trace data. The new tests record the values of the regular registers before stepping the inferior through a "tbegin." instruction to start a transaction, then the checkpointed registers are checked against the recorded pre-transactional values. New values are written to the checkpointed registers and recorded, the inferior continues until the transaction aborts (which is usually immediately when it is resumed), and the regular registers are checked against the recorded values, because the abort should have reverted the registers to these values. Like for the EBB registers, target_store_registers will ignore the checkpointed registers when called with -1 as the regno argument (store all registers in one go). gdb/ChangeLog: 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com> Pedro Franco de Carvalho <pedromfc@linux.ibm.com> * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l) (tdesc_powerpc_isa207_htm_vsx64l): Declare. * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET) (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET) (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET) (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET) (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET): Define. (struct ppc_linux_features) <htm>: New field. (ppc_linux_no_features): Add initializer for htm field. * arch/ppc-linux-common.c (ppc_linux_match_description): Return new tdescs. * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR) (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX) (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR): Define if not already defined. * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l and rs6000/powerpc-isa207-htm-vsx64l. (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and rs6000/powerpc-isa207-htm-vsx64l.xml. * features/rs6000/power-htm-spr.xml: New file. * features/rs6000/power-htm-core.xml: New file. * features/rs6000/power64-htm-core.xml: New file. * features/rs6000/power-htm-fpu.xml: New file. * features/rs6000/power-htm-altivec.xml: New file. * features/rs6000/power-htm-vsx.xml: New file. * features/rs6000/power-htm-ppr.xml: New file. * features/rs6000/power-htm-dscr.xml: New file. * features/rs6000/power-htm-tar.xml: New file. * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file. * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file. * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate. * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate. * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate. * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate. * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call fetch_regset with HTM regsets. (store_register, store_ppc_registers): Call store_regset with HTM regsets. (ppc_linux_nat_target::read_description): Set htm field in the features struct if needed. * ppc-linux-tdep.c: Include features/rs6000/powerpc-isa207-htm-vsx32l.c and features/rs6000/powerpc-isa207-htm-vsx64l.c. (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr) (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx) (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr) (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals. (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset) (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset) (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset) (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset) (ppc32_linux_cpprregset, ppc32_linux_cdscrregset) (ppc32_linux_ctarregset): New globals. (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions. (ppc_linux_collect_core_cpgrregset): New function. (ppc_linux_iterate_over_regset_sections): Call back with the htm regsets. (ppc_linux_core_read_description): Check if the tm spr section is present and set htm in the features struct. (_initialize_ppc_linux_tdep): Call initialize_tdesc_powerpc_isa207_htm_vsx32l and initialize_tdesc_powerpc_isa207_htm_vsx64l. * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset): Declare. (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset) (ppc32_linux_cvsxregset, ppc32_linux_cpprregset) (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare. * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>: New fields. <have_htm_fpu, have_htm_altivec, have_htm_vsx>: Likewise. <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise. <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise. (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>: New enum fields. <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise. <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise. <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise. <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise. <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise. <PPC_CTAR_REGNUM>: Likewise. (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM) (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define. * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG) (IS_CEFP_PSEUDOREG): Define. (rs6000_register_name): Hide the upper halves of checkpointed VSX registers. Return names for the checkpointed DFP, VSX, and EFP pseudo registers. (rs6000_pseudo_register_type): Remove initial assert and raise an internal error in the else clause instead. Return types for the checkpointed DFP, VSX, and EFP pseudo registers. (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle checkpointed DFP pseudo registers. (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle checkpointed VSX pseudo registers. (efp_pseudo_register_read, efp_pseudo_register_write): Rename from efpr_pseudo_register_read and efpr_pseudo_register_write. Handle checkpointed EFP pseudo registers. (rs6000_pseudo_register_read, rs6000_pseudo_register_write): Handle checkpointed DFP, VSX, and EFP registers. (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect) (efp_ax_pseudo_register_collect): New functions. (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo register logic to new functions. Handle checkpointed DFP, VSX, and EFP pseudo registers. (rs6000_gdbarch_init): Look for and validate the htm features. Include checkpointed DFP, VSX and EFP pseudo-registers. * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and HTM registers. gdb/gdbserver/ChangeLog: 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com> * configure.srv (ipa_ppc_linux_regobj): Add powerpc-isa207-htm-vsx32l-ipa.o and powerpc-isa207-htm-vsx64l-ipa.o. (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and powerpc-isa207-htm-vsx64l.o to srv_regobj. Add rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml, rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml, rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml, rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml, rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml, and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles. * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc) <PPC_TDESC_ISA207_HTM_VSX>: New enum value. (init_registers_powerpc_isa207_htm_vsx32l) (init_registers_powerpc_isa207_htm_vsx64l): Declare. * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset) (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset) (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset) (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset) (ppc_store_tm_ctarregset): New functions. (ppc_regsets): Add entries for HTM regsets. (ppc_arch_setup): Set htm in features struct when needed. Set sizes for the HTM regsets. (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX. (initialize_low_arch): Call init_registers_powerpc_isa207_htm_vsx32l and init_registers_powerpc_isa207_htm_vsx64l. * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_HTM_VSX. (initialize_low_tracepoint): Call init_registers_powerpc_isa207_htm_vsx32l and init_registers_powerpc_isa207_htm_vsx64l. gdb/testsuite/ChangeLog: 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com> * gdb.arch/powerpc-htm-regs.c: New file. * gdb.arch/powerpc-htm-regs.exp: New file. gdb/doc/ChangeLog: 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com> * gdb.texinfo (PowerPC Features): Describe new features "org.gnu.gdb.power.htm.spr", "org.gnu.gdb.power.htm.core", "org.gnu.gdb.power.htm.fpu", "org.gnu.gdb.power.htm.altivec", "org.gnu.gdb.power.htm.vsx", "org.gnu.gdb.power.htm.ppr", "org.gnu.gdb.power.htm.dscr", "org.gnu.gdb.power.htm.tar".
424 lines
18 KiB
Plaintext
424 lines
18 KiB
Plaintext
# Mappings from configuration triplets to gdbserver build options.
|
|
# This is invoked from the autoconf-generated configure script, to
|
|
# produce the appropriate Makefile substitutions.
|
|
|
|
# This file sets the following shell variables:
|
|
# srv_regobj The register protocol appropriate for this target.
|
|
# srv_tgtobj Any other target-specific modules appropriate
|
|
# for this target.
|
|
# srv_hostio_err The object implementing the hostio_last_error
|
|
# target method.
|
|
# srv_xmlfiles All XML files which should be available for
|
|
# gdbserver in this configuration.
|
|
# ipa_obj Any other target-specific modules appropriate
|
|
# for this target's in-process agent.
|
|
#
|
|
# In addition, on GNU/Linux the following shell variables will be set:
|
|
# srv_linux_regsets Set to "yes" if ptrace(PTRACE_GETREGS) and friends
|
|
# may be available on this platform; unset otherwise.
|
|
# They will only be used if <sys/ptrace.h> defines
|
|
# PTRACE_GETREGS.
|
|
# srv_linux_usrregs Set to "yes" if we can get at registers via
|
|
# PTRACE_PEEKUSR / PTRACE_POKEUSR.
|
|
|
|
# Default hostio_last_error implementation
|
|
srv_hostio_err_objs="hostio-errno.o"
|
|
|
|
if $enable_unittests; then
|
|
srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-avx-avx512-linux.o i386-avx-mpx-avx512-pku-linux.o i386-mpx-linux.o i386-avx-mpx-linux.o i386-mmx-linux.o linux-x86-tdesc-selftest.o"
|
|
srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx-avx512-linux.o amd64-avx-mpx-avx512-pku-linux.o amd64-mpx-linux.o amd64-avx-mpx-linux.o x32-linux.o x32-avx-linux.o x32-avx-avx512-linux.o"
|
|
else
|
|
srv_i386_linux_regobj=""
|
|
srv_amd64_linux_regobj=""
|
|
fi
|
|
|
|
ipa_ppc_linux_regobj="powerpc-32l-ipa.o powerpc-altivec32l-ipa.o powerpc-cell32l-ipa.o powerpc-vsx32l-ipa.o powerpc-isa205-32l-ipa.o powerpc-isa205-altivec32l-ipa.o powerpc-isa205-vsx32l-ipa.o powerpc-isa205-ppr-dscr-vsx32l-ipa.o powerpc-isa207-vsx32l-ipa.o powerpc-isa207-htm-vsx32l-ipa.o powerpc-e500l-ipa.o powerpc-64l-ipa.o powerpc-altivec64l-ipa.o powerpc-cell64l-ipa.o powerpc-vsx64l-ipa.o powerpc-isa205-64l-ipa.o powerpc-isa205-altivec64l-ipa.o powerpc-isa205-vsx64l-ipa.o powerpc-isa205-ppr-dscr-vsx64l-ipa.o powerpc-isa207-vsx64l-ipa.o powerpc-isa207-htm-vsx64l-ipa.o"
|
|
|
|
# Linux object files. This is so we don't have to repeat
|
|
# these files over and over again.
|
|
srv_linux_obj="linux-low.o linux-osdata.o linux-procfs.o linux-ptrace.o linux-waitpid.o linux-personality.o linux-namespaces.o fork-child.o fork-inferior.o"
|
|
|
|
# Input is taken from the "${target}" variable.
|
|
|
|
case "${target}" in
|
|
aarch64*-*-linux*)
|
|
srv_regobj="arm-with-neon.o"
|
|
if $development; then
|
|
srv_regobj="${srv_regobj} aarch64.o"
|
|
srv_regobj="${srv_regobj} linux-aarch64-tdesc-selftest.o"
|
|
fi
|
|
srv_tgtobj="linux-aarch64-low.o aarch64-linux-hw-point.o"
|
|
srv_tgtobj="$srv_tgtobj linux-aarch32-low.o"
|
|
srv_tgtobj="${srv_tgtobj} arch/arm.o"
|
|
srv_tgtobj="$srv_tgtobj aarch64-linux.o"
|
|
srv_tgtobj="$srv_tgtobj arch/aarch64-insn.o"
|
|
srv_tgtobj="$srv_tgtobj arch/aarch64.o"
|
|
srv_tgtobj="$srv_tgtobj linux-aarch64-tdesc.o"
|
|
srv_tgtobj="$srv_tgtobj aarch64-sve-linux-ptrace.o"
|
|
srv_tgtobj="${srv_tgtobj} $srv_linux_obj"
|
|
srv_linux_regsets=yes
|
|
srv_linux_thread_db=yes
|
|
ipa_obj="linux-aarch64-ipa.o"
|
|
ipa_obj="${ipa_obj} linux-aarch64-tdesc-ipa.o"
|
|
ipa_obj="${ipa_obj} arch/aarch64-ipa.o"
|
|
;;
|
|
arm*-*-linux*) srv_regobj="reg-arm.o arm-with-iwmmxt.o"
|
|
srv_regobj="${srv_regobj} arm-with-vfpv2.o"
|
|
srv_regobj="${srv_regobj} arm-with-vfpv3.o"
|
|
srv_regobj="${srv_regobj} arm-with-neon.o"
|
|
srv_tgtobj="$srv_linux_obj linux-arm-low.o"
|
|
srv_tgtobj="$srv_tgtobj linux-aarch32-low.o"
|
|
srv_tgtobj="${srv_tgtobj} arch/arm.o"
|
|
srv_tgtobj="${srv_tgtobj} arch/arm-linux.o"
|
|
srv_tgtobj="${srv_tgtobj} arch/arm-get-next-pcs.o"
|
|
srv_xmlfiles="arm/arm-with-iwmmxt.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} arm/arm-with-vfpv2.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} arm/arm-with-vfpv3.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} arm/arm-with-neon.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} arm/arm-core.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} arm/xscale-iwmmxt.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} arm/arm-vfpv2.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} arm/arm-vfpv3.xml"
|
|
srv_linux_usrregs=yes
|
|
srv_linux_regsets=yes
|
|
srv_linux_thread_db=yes
|
|
;;
|
|
arm*-*-mingw32ce*) srv_regobj=reg-arm.o
|
|
srv_tgtobj="win32-low.o win32-arm-low.o"
|
|
srv_tgtobj="${srv_tgtobj} wincecompat.o"
|
|
# hostio_last_error implementation is in win32-low.c
|
|
srv_hostio_err_objs=""
|
|
srv_mingw=yes
|
|
srv_mingwce=yes
|
|
;;
|
|
bfin-*-*linux*) srv_regobj=reg-bfin.o
|
|
srv_tgtobj="$srv_linux_obj linux-bfin-low.o"
|
|
srv_linux_usrregs=yes
|
|
srv_linux_thread_db=yes
|
|
;;
|
|
crisv32-*-linux*) srv_regobj=reg-crisv32.o
|
|
srv_tgtobj="$srv_linux_obj linux-crisv32-low.o"
|
|
srv_linux_regsets=yes
|
|
srv_linux_thread_db=yes
|
|
;;
|
|
cris-*-linux*) srv_regobj=reg-cris.o
|
|
srv_tgtobj="$srv_linux_obj linux-cris-low.o"
|
|
srv_linux_usrregs=yes
|
|
srv_linux_thread_db=yes
|
|
;;
|
|
i[34567]86-*-cygwin*) srv_regobj=""
|
|
srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
|
|
srv_tgtobj="${srv_tgtobj} arch/i386.o"
|
|
;;
|
|
i[34567]86-*-linux*) srv_regobj="$srv_i386_linux_regobj"
|
|
if test "$gdb_cv_i386_is_x86_64" = yes ; then
|
|
srv_regobj="$srv_regobj $srv_amd64_linux_regobj"
|
|
srv_tgtobj="amd64-linux-siginfo.o"
|
|
fi
|
|
srv_tgtobj="${srv_tgtobj} arch/i386.o"
|
|
srv_tgtobj="${srv_tgtobj} $srv_linux_obj linux-x86-low.o x86-low.o x86-dregs.o i387-fp.o"
|
|
srv_tgtobj="${srv_tgtobj} linux-x86-tdesc.o"
|
|
srv_tgtobj="${srv_tgtobj} linux-btrace.o x86-linux.o"
|
|
srv_tgtobj="${srv_tgtobj} x86-linux-dregs.o"
|
|
srv_linux_usrregs=yes
|
|
srv_linux_regsets=yes
|
|
srv_linux_thread_db=yes
|
|
srv_linux_btrace=yes
|
|
ipa_obj="linux-i386-ipa.o linux-x86-tdesc-ipa.o"
|
|
ipa_obj="${ipa_obj} arch/i386-ipa.o"
|
|
;;
|
|
i[34567]86-*-lynxos*) srv_regobj=""
|
|
srv_tgtobj="lynx-low.o lynx-i386-low.o fork-child.o fork-inferior.o"
|
|
srv_tgtobj="${srv_tgtobj} arch/i386.o"
|
|
srv_lynxos=yes
|
|
;;
|
|
i[34567]86-*-mingw32ce*)
|
|
srv_regobj=""
|
|
srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
|
|
srv_tgtobj="${srv_tgtobj} arch/i386.o"
|
|
srv_tgtobj="${srv_tgtobj} wincecompat.o"
|
|
# hostio_last_error implementation is in win32-low.c
|
|
srv_hostio_err_objs=""
|
|
srv_mingw=yes
|
|
srv_mingwce=yes
|
|
;;
|
|
i[34567]86-*-mingw*) srv_regobj=""
|
|
srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
|
|
srv_tgtobj="${srv_tgtobj} arch/i386.o"
|
|
srv_mingw=yes
|
|
;;
|
|
i[34567]86-*-nto*) srv_regobj=""
|
|
srv_tgtobj="nto-low.o nto-x86-low.o arch/i386.o"
|
|
srv_qnx="yes"
|
|
;;
|
|
ia64-*-linux*) srv_regobj=reg-ia64.o
|
|
srv_tgtobj="$srv_linux_obj linux-ia64-low.o"
|
|
srv_linux_usrregs=yes
|
|
;;
|
|
m32r*-*-linux*) srv_regobj=reg-m32r.o
|
|
srv_tgtobj="$srv_linux_obj linux-m32r-low.o"
|
|
srv_linux_usrregs=yes
|
|
srv_linux_thread_db=yes
|
|
;;
|
|
m68*-*-linux*) if test "$gdb_cv_m68k_is_coldfire" = yes; then
|
|
srv_regobj=reg-cf.o
|
|
else
|
|
srv_regobj=reg-m68k.o
|
|
fi
|
|
srv_tgtobj="$srv_linux_obj linux-m68k-low.o"
|
|
srv_linux_usrregs=yes
|
|
srv_linux_regsets=yes
|
|
srv_linux_thread_db=yes
|
|
;;
|
|
m68*-*-uclinux*) if test "$gdb_cv_m68k_is_coldfire" = yes; then
|
|
srv_regobj=reg-cf.o
|
|
else
|
|
srv_regobj=reg-m68k.o
|
|
fi
|
|
srv_tgtobj="$srv_linux_obj linux-m68k-low.o"
|
|
srv_linux_usrregs=yes
|
|
srv_linux_regsets=yes
|
|
srv_linux_thread_db=yes
|
|
;;
|
|
mips*-*-linux*) srv_regobj="mips-linux.o"
|
|
srv_regobj="${srv_regobj} mips-dsp-linux.o"
|
|
srv_regobj="${srv_regobj} mips64-linux.o"
|
|
srv_regobj="${srv_regobj} mips64-dsp-linux.o"
|
|
srv_tgtobj="$srv_linux_obj linux-mips-low.o"
|
|
srv_tgtobj="${srv_tgtobj} mips-linux-watch.o"
|
|
srv_xmlfiles="mips-linux.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} mips-dsp-linux.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} mips-cpu.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} mips-cp0.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} mips-fpu.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} mips-dsp.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} mips64-linux.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} mips64-dsp-linux.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} mips64-cpu.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} mips64-cp0.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} mips64-fpu.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} mips64-dsp.xml"
|
|
srv_linux_regsets=yes
|
|
srv_linux_usrregs=yes
|
|
srv_linux_thread_db=yes
|
|
;;
|
|
nios2*-*-linux*) srv_regobj="nios2-linux.o"
|
|
srv_tgtobj="$srv_linux_obj linux-nios2-low.o"
|
|
srv_xmlfiles="nios2-linux.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} nios2-cpu.xml"
|
|
srv_linux_regsets=yes
|
|
srv_linux_usrregs=yes
|
|
srv_linux_thread_db=yes
|
|
;;
|
|
powerpc*-*-linux*) srv_regobj="powerpc-32l.o"
|
|
srv_regobj="${srv_regobj} powerpc-altivec32l.o"
|
|
srv_regobj="${srv_regobj} powerpc-cell32l.o"
|
|
srv_regobj="${srv_regobj} powerpc-vsx32l.o"
|
|
srv_regobj="${srv_regobj} powerpc-isa205-32l.o"
|
|
srv_regobj="${srv_regobj} powerpc-isa205-altivec32l.o"
|
|
srv_regobj="${srv_regobj} powerpc-isa205-vsx32l.o"
|
|
srv_regobj="${srv_regobj} powerpc-isa205-ppr-dscr-vsx32l.o"
|
|
srv_regobj="${srv_regobj} powerpc-isa207-vsx32l.o"
|
|
srv_regobj="${srv_regobj} powerpc-isa207-htm-vsx32l.o"
|
|
srv_regobj="${srv_regobj} powerpc-e500l.o"
|
|
srv_regobj="${srv_regobj} powerpc-64l.o"
|
|
srv_regobj="${srv_regobj} powerpc-altivec64l.o"
|
|
srv_regobj="${srv_regobj} powerpc-cell64l.o"
|
|
srv_regobj="${srv_regobj} powerpc-vsx64l.o"
|
|
srv_regobj="${srv_regobj} powerpc-isa205-64l.o"
|
|
srv_regobj="${srv_regobj} powerpc-isa205-altivec64l.o"
|
|
srv_regobj="${srv_regobj} powerpc-isa205-vsx64l.o"
|
|
srv_regobj="${srv_regobj} powerpc-isa205-ppr-dscr-vsx64l.o"
|
|
srv_regobj="${srv_regobj} powerpc-isa207-vsx64l.o"
|
|
srv_regobj="${srv_regobj} powerpc-isa207-htm-vsx64l.o"
|
|
srv_tgtobj="$srv_linux_obj linux-ppc-low.o ppc-linux.o"
|
|
srv_tgtobj="${srv_tgtobj} arch/ppc-linux-common.o"
|
|
srv_xmlfiles="rs6000/powerpc-32l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-altivec32l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-cell32l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-vsx32l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa205-32l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa205-altivec32l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa205-vsx32l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa207-vsx32l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa207-htm-vsx32l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-altivec.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-vsx.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-core.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-linux.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-fpu.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-fpu-isa205.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-dscr.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-ppr.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-tar.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-ebb.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-linux-pmu.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-htm-spr.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-htm-core.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-htm-fpu.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-htm-altivec.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-htm-vsx.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-htm-ppr.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-htm-dscr.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-htm-tar.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-e500l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-spe.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-64l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-altivec64l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-cell64l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-vsx64l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa205-64l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa205-altivec64l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa205-vsx64l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa207-vsx64l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa207-htm-vsx64l.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power64-core.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power64-linux.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power64-htm-core.xml"
|
|
srv_linux_usrregs=yes
|
|
srv_linux_regsets=yes
|
|
srv_linux_thread_db=yes
|
|
ipa_obj="${ipa_ppc_linux_regobj} linux-ppc-ipa.o"
|
|
;;
|
|
powerpc-*-lynxos*) srv_regobj="powerpc-32.o"
|
|
srv_tgtobj="lynx-low.o lynx-ppc-low.o"
|
|
srv_xmlfiles="rs6000/powerpc-32.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-core.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} rs6000/power-fpu.xml"
|
|
srv_lynxos=yes
|
|
;;
|
|
s390*-*-linux*) srv_regobj="s390-linux32.o"
|
|
srv_regobj="${srv_regobj} s390-linux32v1.o"
|
|
srv_regobj="${srv_regobj} s390-linux32v2.o"
|
|
srv_regobj="${srv_regobj} s390-linux64.o"
|
|
srv_regobj="${srv_regobj} s390-linux64v1.o"
|
|
srv_regobj="${srv_regobj} s390-linux64v2.o"
|
|
srv_regobj="${srv_regobj} s390-te-linux64.o"
|
|
srv_regobj="${srv_regobj} s390-vx-linux64.o"
|
|
srv_regobj="${srv_regobj} s390-tevx-linux64.o"
|
|
srv_regobj="${srv_regobj} s390-gs-linux64.o"
|
|
srv_regobj="${srv_regobj} s390x-linux64.o"
|
|
srv_regobj="${srv_regobj} s390x-linux64v1.o"
|
|
srv_regobj="${srv_regobj} s390x-linux64v2.o"
|
|
srv_regobj="${srv_regobj} s390x-te-linux64.o"
|
|
srv_regobj="${srv_regobj} s390x-vx-linux64.o"
|
|
srv_regobj="${srv_regobj} s390x-tevx-linux64.o"
|
|
srv_regobj="${srv_regobj} s390x-gs-linux64.o"
|
|
srv_tgtobj="$srv_linux_obj linux-s390-low.o"
|
|
srv_xmlfiles="s390-linux32.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-linux32v1.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-linux32v2.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-linux64.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-linux64v1.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-linux64v2.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-te-linux64.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-vx-linux64.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-tevx-linux64.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-gs-linux64.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390x-linux64.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390x-linux64v1.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390x-linux64v2.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390x-te-linux64.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390x-vx-linux64.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390x-tevx-linux64.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390x-gs-linux64.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-core32.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-core64.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390x-core64.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-acr.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-fpr.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-tdb.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-vx.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-gs.xml"
|
|
srv_xmlfiles="${srv_xmlfiles} s390-gsbc.xml"
|
|
srv_linux_usrregs=yes
|
|
srv_linux_regsets=yes
|
|
srv_linux_thread_db=yes
|
|
ipa_obj="linux-s390-ipa.o"
|
|
ipa_obj="${ipa_obj} s390-linux32-ipa.o"
|
|
ipa_obj="${ipa_obj} s390-linux32v1-ipa.o"
|
|
ipa_obj="${ipa_obj} s390-linux32v2-ipa.o"
|
|
ipa_obj="${ipa_obj} s390-linux64-ipa.o"
|
|
ipa_obj="${ipa_obj} s390-linux64v1-ipa.o"
|
|
ipa_obj="${ipa_obj} s390-linux64v2-ipa.o"
|
|
ipa_obj="${ipa_obj} s390-vx-linux64-ipa.o"
|
|
ipa_obj="${ipa_obj} s390-te-linux64-ipa.o"
|
|
ipa_obj="${ipa_obj} s390-tevx-linux64-ipa.o"
|
|
ipa_obj="${ipa_obj} s390-gs-linux64-ipa.o"
|
|
ipa_obj="${ipa_obj} s390x-linux64-ipa.o"
|
|
ipa_obj="${ipa_obj} s390x-linux64v1-ipa.o"
|
|
ipa_obj="${ipa_obj} s390x-linux64v2-ipa.o"
|
|
ipa_obj="${ipa_obj} s390x-vx-linux64-ipa.o"
|
|
ipa_obj="${ipa_obj} s390x-te-linux64-ipa.o"
|
|
ipa_obj="${ipa_obj} s390x-tevx-linux64-ipa.o"
|
|
ipa_obj="${ipa_obj} s390x-gs-linux64-ipa.o"
|
|
;;
|
|
sh*-*-linux*) srv_regobj=reg-sh.o
|
|
srv_tgtobj="$srv_linux_obj linux-sh-low.o"
|
|
srv_linux_usrregs=yes
|
|
srv_linux_regsets=yes
|
|
srv_linux_thread_db=yes
|
|
;;
|
|
sparc*-*-linux*) srv_regobj=reg-sparc64.o
|
|
srv_tgtobj="$srv_linux_obj linux-sparc-low.o"
|
|
srv_linux_regsets=yes
|
|
srv_linux_thread_db=yes
|
|
;;
|
|
spu*-*-*) srv_regobj=reg-spu.o
|
|
srv_tgtobj="spu-low.o fork-child.o fork-inferior.o"
|
|
;;
|
|
tic6x-*-uclinux) if $development; then
|
|
srv_regobj="tic6x-c64xp-linux.o"
|
|
srv_regobj="${srv_regobj} tic6x-c64x-linux.o"
|
|
srv_regobj="${srv_regobj} tic6x-c62x-linux.o"
|
|
else
|
|
srv_regobj=""
|
|
fi
|
|
srv_tgtobj="$srv_linux_obj linux-tic6x-low.o"
|
|
srv_tgtobj="${srv_tgtobj} arch/tic6x.o"
|
|
srv_linux_regsets=yes
|
|
srv_linux_usrregs=yes
|
|
srv_linux_thread_db=yes
|
|
;;
|
|
x86_64-*-linux*) srv_regobj="$srv_amd64_linux_regobj $srv_i386_linux_regobj"
|
|
srv_tgtobj="$srv_linux_obj linux-x86-low.o x86-low.o x86-dregs.o i387-fp.o"
|
|
srv_tgtobj="${srv_tgtobj} arch/i386.o arch/amd64.o"
|
|
srv_tgtobj="${srv_tgtobj} linux-x86-tdesc.o"
|
|
srv_tgtobj="${srv_tgtobj} linux-btrace.o x86-linux.o"
|
|
srv_tgtobj="${srv_tgtobj} x86-linux-dregs.o"
|
|
srv_tgtobj="${srv_tgtobj} amd64-linux-siginfo.o"
|
|
srv_linux_usrregs=yes # This is for i386 progs.
|
|
srv_linux_regsets=yes
|
|
srv_linux_thread_db=yes
|
|
srv_linux_btrace=yes
|
|
ipa_obj="linux-amd64-ipa.o linux-x86-tdesc-ipa.o"
|
|
ipa_obj="${ipa_obj} arch/amd64-ipa.o"
|
|
;;
|
|
x86_64-*-mingw*) srv_regobj=""
|
|
srv_tgtobj="x86-low.o x86-dregs.o i387-fp.o win32-low.o win32-i386-low.o"
|
|
srv_tgtobj="${srv_tgtobj} arch/amd64.o"
|
|
srv_mingw=yes
|
|
;;
|
|
x86_64-*-cygwin*) srv_regobj=""
|
|
srv_tgtobj="x86-low.o x86-dregs.o i387-fp.o win32-low.o win32-i386-low.o"
|
|
srv_tgtobj="${srv_tgtobj} arch/amd64.o"
|
|
;;
|
|
|
|
xtensa*-*-linux*) srv_regobj=reg-xtensa.o
|
|
srv_tgtobj="$srv_linux_obj linux-xtensa-low.o"
|
|
srv_linux_regsets=yes
|
|
srv_linux_thread_db=yes
|
|
;;
|
|
tilegx-*-linux*) srv_regobj=reg-tilegx.o
|
|
srv_regobj="${srv_regobj} reg-tilegx32.o"
|
|
srv_tgtobj="$srv_linux_obj linux-tile-low.o"
|
|
srv_linux_regsets=yes
|
|
srv_linux_thread_db=yes
|
|
;;
|
|
*) echo "Error: target not supported by gdbserver."
|
|
exit 1
|
|
;;
|
|
esac
|