aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/configure.srv
diff options
context:
space:
mode:
authorMarcin Koƛcielnicki <koriakin@0x04.net>2016-01-17 22:59:06 +0100
committerMarcin Koƛcielnicki <koriakin@0x04.net>2016-03-29 23:39:00 +0200
commitabd9baf9c61a76537766c81e235a4a5a49b7dee3 (patch)
treead83925c1a5aff7617b7bfcbd9036db40be34c0e /gdb/gdbserver/configure.srv
parenta4105d04e19efdf89d0fa56b62675d7d7ee82a9b (diff)
downloadgdb-abd9baf9c61a76537766c81e235a4a5a49b7dee3.zip
gdb-abd9baf9c61a76537766c81e235a4a5a49b7dee3.tar.gz
gdb-abd9baf9c61a76537766c81e235a4a5a49b7dee3.tar.bz2
gdbserver/s390: Add fast tracepoint support.
Fast tracepoints will only work on 6-byte intructions, and assume at least a z900 CPU. s390 also has 4-byte jump instructions, which also work on pre-z900, but their range is limitted to +-64kiB, which is not very useful (and wouldn't work at all with current jump pad allocation). There's a little problem with s390_relocate_instruction function: it converts BRAS/BRASL instructions to LARL of the return address + JG to the target address. On 31-bit, this sets the high bit of the target register to 0, while BRAS/BRASL would set it to 1. While this is not a problem when the result is only used to address memory, it could possibly break something that expects to compare such addresses for equality without first masking the bit off. In particular, I'm not sure whether leaving the return address high bit unset is ABI-compliant (could confuse some unwinder?). If that's a problem, it could be fixed by handling it in the jump pad (since at that point we can just modify the GPRs in the save area without having to worry about preserving CCs and only having that one GPR to work with - I'm not sure if it's even possible to set the high bit with such constraints). gdb/gdbserver/ChangeLog: PR 18377 * Makefile.in: Add s390 IPA files. * configure.srv: Build IPA for s390. * linux-s390-ipa.c: New file. * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h. (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h. (tdesc_s390_linux32): Likewise. (init_registers_s390_linux32v1): Likewise. (tdesc_s390_linux32v1): Likewise. (init_registers_s390_linux32v2): Likewise. (tdesc_s390_linux32v2): Likewise. (init_registers_s390_linux64): Likewise. (tdesc_s390_linux64): Likewise. (init_registers_s390_linux64v1): Likewise. (tdesc_s390_linux64v1): Likewise. (init_registers_s390_linux64v2): Likewise. (tdesc_s390_linux64v2): Likewise. (init_registers_s390_te_linux64): Likewise. (tdesc_s390_te_linux64): Likewise. (init_registers_s390_vx_linux64): Likewise. (tdesc_s390_vx_linux64): Likewise. (init_registers_s390_tevx_linux64): Likewise. (tdesc_s390_tevx_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (tdesc_s390x_linux64): Likewise. (init_registers_s390x_linux64v1): Likewise. (tdesc_s390x_linux64v1): Likewise. (init_registers_s390x_linux64v2): Likewise. (tdesc_s390x_linux64v2): Likewise. (init_registers_s390x_te_linux64): Likewise. (tdesc_s390x_te_linux64): Likewise. (init_registers_s390x_vx_linux64): Likewise. (tdesc_s390x_vx_linux64): Likewise. (init_registers_s390x_tevx_linux64): Likewise. (tdesc_s390x_tevx_linux64): Likewise. (have_hwcap_s390_vx): New static variable. (s390_arch_setup): Fill have_hwcap_s390_vx. (s390_get_thread_area): New function. (s390_ft_entry_gpr_esa): New const. (s390_ft_entry_gpr_zarch): New const. (s390_ft_entry_misc): New const. (s390_ft_entry_fr): New const. (s390_ft_entry_vr): New const. (s390_ft_main_31): New const. (s390_ft_main_64): New const. (s390_ft_exit_fr): New const. (s390_ft_exit_vr): New const. (s390_ft_exit_misc): New const. (s390_ft_exit_gpr_esa): New const. (s390_ft_exit_gpr_zarch): New const. (append_insns): New function. (s390_relocate_instruction): New function. (s390_install_fast_tracepoint_jump_pad): New function. (s390_get_min_fast_tracepoint_insn_len): New function. (s390_get_ipa_tdesc_idx): New function. (struct linux_target_ops): Wire in the above functions. (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs. * linux-s390-tdesc.h: New file.
Diffstat (limited to 'gdb/gdbserver/configure.srv')
-rw-r--r--gdb/gdbserver/configure.srv16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
index a89b1d1..ce02876 100644
--- a/gdb/gdbserver/configure.srv
+++ b/gdb/gdbserver/configure.srv
@@ -307,6 +307,22 @@ case "${target}" in
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} 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"
;;
sh*-*-linux*) srv_regobj=reg-sh.o
srv_tgtobj="$srv_linux_obj linux-sh-low.o"