From c23c939174445a65de521041509b038f5839a742 Mon Sep 17 00:00:00 2001 From: Tankut Baris Aktemur Date: Mon, 17 Feb 2020 16:12:00 +0100 Subject: gdbserver: turn fast tracepoint target ops into methods gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur Turn process_stratum_target's install_fast_tracepoint_jump_pad and get_min_fast_tracepoint_insn_len ops into methods of process_target. * target.h (struct process_stratum_target): Remove the target ops. (class process_target): Add the target ops. Also add 'supports_fast_tracepoints'. (target_supports_fast_tracepoints): Update the macro. (target_get_min_fast_tracepoint_insn_len): Update the macro. (install_fast_tracepoint_jump_pad): Update and rename the macro to ... (target_install_fast_tracepoint_jump_pad): ... this. * target.cc (process_target::supports_fast_tracepoints): Define. (process_target::install_fast_tracepoint_jump_pad): Define. (process_target::get_min_fast_tracepoint_insn_len): Define. Update the derived classes and callers below. * tracepoint.cc (install_fast_tracepoint): Update. * linux-low.cc (linux_target_ops): Update. (linux_process_target::supports_fast_tracepoints): Define. (linux_install_fast_tracepoint_jump_pad): Turn into ... (linux_process_target::install_fast_tracepoint_jump_pad): ... this. (linux_get_min_fast_tracepoint_insn_len): Turn into ... (linux_process_target::get_min_fast_tracepoint_insn_len): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update. --- gdbserver/target.cc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gdbserver/target.cc') diff --git a/gdbserver/target.cc b/gdbserver/target.cc index 42f2284..29b5bbc 100644 --- a/gdbserver/target.cc +++ b/gdbserver/target.cc @@ -668,3 +668,28 @@ process_target::stabilize_threads () { /* Nop. */ } + +bool +process_target::supports_fast_tracepoints () +{ + return false; +} + +int +process_target::install_fast_tracepoint_jump_pad + (CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector, + CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry, + CORE_ADDR *trampoline, ULONGEST *trampoline_size, + unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size, + CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end, + char *err) +{ + gdb_assert_not_reached ("target op install_fast_tracepoint_jump_pad " + "not supported"); +} + +int +process_target::get_min_fast_tracepoint_insn_len () +{ + return 0; +} -- cgit v1.1