This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tdep/18377] Implement gdbserver in-process agent for System z


https://sourceware.org/bugzilla/show_bug.cgi?id=18377

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marcin Ko&#347;cielnicki
<mwk@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=abd9baf9c61a76537766c81e235a4a5a49b7dee3

commit abd9baf9c61a76537766c81e235a4a5a49b7dee3
Author: Marcin KoÅcielnicki <koriakin@0x04.net>
Date:   Sun Jan 17 22:59:06 2016 +0100

    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.

--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marcin Ko&#347;cielnicki
<mwk@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f39e8743546602977f860811f44aa327736b97dc

commit f39e8743546602977f860811f44aa327736b97dc
Author: Marcin KoÅcielnicki <koriakin@0x04.net>
Date:   Sun Nov 15 02:52:34 2015 +0100

    gdbserver/s390: Add support for compiled agent expressions.

    These sequences assume a z900+ CPU, like the rest of fast tracepoint
    support.

    gdb/gdbserver/ChangeLog:

        PR 18377
        * linux-s390-low.c (add_insns): New function.
        (s390_emit_prologue): New function.
        (s390_emit_epilogue): New function.
        (s390_emit_add): New function.
        (s390_emit_sub): New function.
        (s390_emit_mul): New function.
        (s390_emit_lsh): New function.
        (s390_emit_rsh_signed): New function.
        (s390_emit_rsh_unsigned): New function.
        (s390_emit_ext): New function.
        (s390_emit_log_not): New function.
        (s390_emit_bit_and): New function.
        (s390_emit_bit_or): New function.
        (s390_emit_bit_xor): New function.
        (s390_emit_bit_not): New function.
        (s390_emit_equal): New function.
        (s390_emit_less_signed): New function.
        (s390_emit_less_unsigned): New function.
        (s390_emit_ref): New function.
        (s390_emit_if_goto): New function.
        (s390_emit_goto): New function.
        (s390_write_goto_address): New function.
        (s390_emit_litpool): New function.
        (s390_emit_const): New function.
        (s390_emit_call): New function.
        (s390_emit_reg): New function.
        (s390_emit_pop): New function.
        (s390_emit_stack_flush): New function.
        (s390_emit_zero_ext): New function.
        (s390_emit_swap): New function.
        (s390_emit_stack_adjust): New function.
        (s390_emit_set_r2): New function.
        (s390_emit_int_call_1): New function.
        (s390_emit_void_call_2): New function.
        (s390_emit_eq_goto): New function.
        (s390_emit_ne_goto): New function.
        (s390_emit_lt_goto): New function.
        (s390_emit_le_goto): New function.
        (s390_emit_gt_goto): New function.
        (s390_emit_ge_goto): New function.
        (s390x_emit_prologue): New function.
        (s390x_emit_epilogue): New function.
        (s390x_emit_add): New function.
        (s390x_emit_sub): New function.
        (s390x_emit_mul): New function.
        (s390x_emit_lsh): New function.
        (s390x_emit_rsh_signed): New function.
        (s390x_emit_rsh_unsigned): New function.
        (s390x_emit_ext): New function.
        (s390x_emit_log_not): New function.
        (s390x_emit_bit_and): New function.
        (s390x_emit_bit_or): New function.
        (s390x_emit_bit_xor): New function.
        (s390x_emit_bit_not): New function.
        (s390x_emit_equal): New function.
        (s390x_emit_less_signed): New function.
        (s390x_emit_less_unsigned): New function.
        (s390x_emit_ref): New function.
        (s390x_emit_if_goto): New function.
        (s390x_emit_const): New function.
        (s390x_emit_call): New function.
        (s390x_emit_reg): New function.
        (s390x_emit_pop): New function.
        (s390x_emit_stack_flush): New function.
        (s390x_emit_zero_ext): New function.
        (s390x_emit_swap): New function.
        (s390x_emit_stack_adjust): New function.
        (s390x_emit_int_call_1): New function.
        (s390x_emit_void_call_2): New function.
        (s390x_emit_eq_goto): New function.
        (s390x_emit_ne_goto): New function.
        (s390x_emit_lt_goto): New function.
        (s390x_emit_le_goto): New function.
        (s390x_emit_gt_goto): New function.
        (s390x_emit_ge_goto): New function.
        (s390_emit_ops): New function.
        (struct linux_target_ops): Fill in emit_ops hook.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]