diff options
-rw-r--r-- | gdbserver/ChangeLog | 61 | ||||
-rw-r--r-- | gdbserver/linux-aarch64-low.cc | 50 | ||||
-rw-r--r-- | gdbserver/linux-arm-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/linux-bfin-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/linux-crisv32-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/linux-low.cc | 29 | ||||
-rw-r--r-- | gdbserver/linux-low.h | 37 | ||||
-rw-r--r-- | gdbserver/linux-m32r-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/linux-m68k-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/linux-ppc-low.cc | 51 | ||||
-rw-r--r-- | gdbserver/linux-s390-low.cc | 50 | ||||
-rw-r--r-- | gdbserver/linux-sh-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/linux-tic6x-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/linux-tile-low.cc | 2 | ||||
-rw-r--r-- | gdbserver/linux-x86-low.cc | 51 | ||||
-rw-r--r-- | gdbserver/linux-xtensa-low.cc | 2 |
16 files changed, 189 insertions, 158 deletions
diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index e0c1f20..a7689ca 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,5 +1,66 @@ 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> + Remove the 'install_fast_tracepoint_jump_pad' and + 'get_min_fast_tracepoint_insn_len' linux target ops to let the + concrete linux target define the ops by overriding the declarations + of process_stratum_target. + + * linux-low.h (struct linux_target_ops): Remove the ops. + (class linux_process_target) <supports_fast_tracepoints> + <install_fast_tracepoint_jump_pad> + <get_min_fast_tracepoint_insn_len>: Remove. + * linux-low.cc (linux_process_target::supports_fast_tracepoints) + (linux_process_target::install_fast_tracepoint_jump_pad) + (linux_process_target::get_min_fast_tracepoint_insn_len): Remove. + * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints> + <install_fast_tracepoint_jump_pad> + <get_min_fast_tracepoint_insn_len>: Declare. + (x86_target::supports_fast_tracepoints): Define. + (x86_install_fast_tracepoint_jump_pad): Turn into... + (x86_target::install_fast_tracepoint_jump_pad): ...this. + (x86_get_min_fast_tracepoint_insn_len): Turn into... + (x86_target::get_min_fast_tracepoint_insn_len): ...this. + (the_low_target): Remove the op fields. + * linux-aarch64-low.cc (class aarch64_target) + <supports_fast_tracepoints> + <install_fast_tracepoint_jump_pad> + <get_min_fast_tracepoint_insn_len>: Declare. + (aarch64_target::supports_fast_tracepoints): Define. + (aarch64_install_fast_tracepoint_jump_pad): Turn into... + (aarch64_target::install_fast_tracepoint_jump_pad): ...this. + (aarch64_get_min_fast_tracepoint_insn_len): Turn into... + (aarch64_target::get_min_fast_tracepoint_insn_len): ...this. + (the_low_target): Remove the op fields. + * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints> + <install_fast_tracepoint_jump_pad> + <get_min_fast_tracepoint_insn_len>: Declare. + (ppc_target::supports_fast_tracepoints): Define. + (ppc_install_fast_tracepoint_jump_pad): Turn into... + (ppc_target::install_fast_tracepoint_jump_pad): ...this. + (ppc_get_min_fast_tracepoint_insn_len): Turn into... + (ppc_target::get_min_fast_tracepoint_insn_len): ...this. + (the_low_target): Remove the op fields. + * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints> + <install_fast_tracepoint_jump_pad> + <get_min_fast_tracepoint_insn_len>: Declare. + (s390_target::supports_fast_tracepoints): Define. + (s390_install_fast_tracepoint_jump_pad): Turn into... + (s390_target::install_fast_tracepoint_jump_pad): ...this. + (s390_get_min_fast_tracepoint_insn_len): Turn into... + (s390_target::get_min_fast_tracepoint_insn_len): ...this. + (the_low_target): Remove the op fields. + * linux-arm-low.cc (the_low_target): Remove the op fields. + * linux-bfin-low.cc (the_low_target): Ditto. + * linux-crisv32-low.cc (the_low_target): Ditto. + * linux-m32r-low.cc (the_low_target): Ditto. + * linux-m68k-low.cc (the_low_target): Ditto. + * linux-sh-low.cc (the_low_target): Ditto. + * linux-tic6x-low.cc (the_low_target): Ditto. + * linux-tile-low.cc (the_low_target): Ditto. + * linux-xtensa-low.cc (the_low_target): Ditto. + +2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> + Turn the 'get_thread_area' linux target op into a method of process_stratum_target. diff --git a/gdbserver/linux-aarch64-low.cc b/gdbserver/linux-aarch64-low.cc index c58fb44..37fe93c 100644 --- a/gdbserver/linux-aarch64-low.cc +++ b/gdbserver/linux-aarch64-low.cc @@ -67,6 +67,18 @@ public: bool supports_tracepoints () override; + bool supports_fast_tracepoints () override; + + int 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) override; + + int get_min_fast_tracepoint_insn_len () override; + protected: void low_arch_setup () override; @@ -1962,23 +1974,23 @@ static const struct aarch64_insn_visitor visitor = aarch64_ftrace_insn_reloc_others, }; -/* Implementation of linux_target_ops method +bool +aarch64_target::supports_fast_tracepoints () +{ + return true; +} + +/* Implementation of target ops method "install_fast_tracepoint_jump_pad". */ -static int -aarch64_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) +int +aarch64_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) { uint32_t buf[256]; uint32_t *p = buf; @@ -3087,11 +3099,11 @@ aarch64_emit_ops (void) return &aarch64_emit_ops_impl; } -/* Implementation of linux_target_ops method +/* Implementation of target ops method "get_min_fast_tracepoint_insn_len". */ -static int -aarch64_get_min_fast_tracepoint_insn_len (void) +int +aarch64_target::get_min_fast_tracepoint_insn_len () { return 4; } @@ -3151,9 +3163,7 @@ aarch64_supports_hardware_single_step (void) struct linux_target_ops the_low_target = { - aarch64_install_fast_tracepoint_jump_pad, aarch64_emit_ops, - aarch64_get_min_fast_tracepoint_insn_len, aarch64_supports_range_stepping, aarch64_supports_hardware_single_step, aarch64_get_syscall_trapinfo, diff --git a/gdbserver/linux-arm-low.cc b/gdbserver/linux-arm-low.cc index e52341d..942f263 100644 --- a/gdbserver/linux-arm-low.cc +++ b/gdbserver/linux-arm-low.cc @@ -1117,9 +1117,7 @@ arm_target::get_regs_info () } struct linux_target_ops the_low_target = { - NULL, /* install_fast_tracepoint_jump_pad */ NULL, /* emit_ops */ - NULL, /* get_min_fast_tracepoint_insn_len */ NULL, /* supports_range_stepping */ arm_supports_hardware_single_step, arm_get_syscall_trapinfo, diff --git a/gdbserver/linux-bfin-low.cc b/gdbserver/linux-bfin-low.cc index 7a11c5b..4eaa19e 100644 --- a/gdbserver/linux-bfin-low.cc +++ b/gdbserver/linux-bfin-low.cc @@ -171,9 +171,7 @@ bfin_target::get_regs_info () } struct linux_target_ops the_low_target = { - NULL, /* install_fast_tracepoint_jump_pad */ NULL, /* emit_ops */ - NULL, /* get_min_fast_tracepoint_insn_len */ NULL, /* supports_range_stepping */ bfin_supports_hardware_single_step, }; diff --git a/gdbserver/linux-crisv32-low.cc b/gdbserver/linux-crisv32-low.cc index 1aecd25..25816cc 100644 --- a/gdbserver/linux-crisv32-low.cc +++ b/gdbserver/linux-crisv32-low.cc @@ -468,9 +468,7 @@ crisv32_target::get_regs_info () } struct linux_target_ops the_low_target = { - NULL, /* install_fast_tracepoint_jump_pad */ NULL, /* emit_ops */ - NULL, /* get_min_fast_tracepoint_insn_len */ NULL, /* supports_range_stepping */ cris_supports_hardware_single_step, }; diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc index 7172194..f93d495 100644 --- a/gdbserver/linux-low.cc +++ b/gdbserver/linux-low.cc @@ -6496,29 +6496,6 @@ linux_process_target::done_accessing_memory () target_unpause_all (true); } -bool -linux_process_target::supports_fast_tracepoints () -{ - return the_low_target.install_fast_tracepoint_jump_pad != nullptr; -} - -int -linux_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) -{ - return (*the_low_target.install_fast_tracepoint_jump_pad) - (tpoint, tpaddr, collector, lockaddr, orig_size, - jump_entry, trampoline, trampoline_size, - jjump_pad_insn, jjump_pad_insn_size, - adjusted_insn_addr, adjusted_insn_addr_end, - err); -} - emit_ops * linux_process_target::emit_ops () { @@ -6528,12 +6505,6 @@ linux_process_target::emit_ops () return NULL; } -int -linux_process_target::get_min_fast_tracepoint_insn_len () -{ - return (*the_low_target.get_min_fast_tracepoint_insn_len) (); -} - /* Extract &phdr and num_phdr in the inferior. Return 0 on success. */ static int diff --git a/gdbserver/linux-low.h b/gdbserver/linux-low.h index 58e5e67..7c0e358 100644 --- a/gdbserver/linux-low.h +++ b/gdbserver/linux-low.h @@ -131,29 +131,10 @@ struct lwp_info; struct linux_target_ops { - /* Install a fast tracepoint jump pad. See target.h for - comments. */ - int (*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); - /* Return the bytecode operations vector for the current inferior. Returns NULL if bytecode compilation is not supported. */ struct emit_ops *(*emit_ops) (void); - /* Return the minimum length of an instruction that can be safely overwritten - for use as a fast tracepoint. */ - int (*get_min_fast_tracepoint_insn_len) (void); - /* Returns true if the low target supports range stepping. */ int (*supports_range_stepping) (void); @@ -303,24 +284,6 @@ public: void stabilize_threads () override; - bool supports_fast_tracepoints () override; - - int 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) override; - - int get_min_fast_tracepoint_insn_len () override; - struct emit_ops *emit_ops () override; bool supports_disable_randomization () override; diff --git a/gdbserver/linux-m32r-low.cc b/gdbserver/linux-m32r-low.cc index 48dadd6..8ce65da 100644 --- a/gdbserver/linux-m32r-low.cc +++ b/gdbserver/linux-m32r-low.cc @@ -161,9 +161,7 @@ m32r_target::get_regs_info () } struct linux_target_ops the_low_target = { - NULL, /* install_fast_tracepoint_jump_pad */ NULL, /* emit_ops */ - NULL, /* get_min_fast_tracepoint_insn_len */ NULL, /* supports_range_stepping */ m32r_supports_hardware_single_step, }; diff --git a/gdbserver/linux-m68k-low.cc b/gdbserver/linux-m68k-low.cc index acbb6dd..017b26b 100644 --- a/gdbserver/linux-m68k-low.cc +++ b/gdbserver/linux-m68k-low.cc @@ -265,9 +265,7 @@ m68k_supports_hardware_single_step (void) } struct linux_target_ops the_low_target = { - NULL, /* install_fast_tracepoint_jump_pad */ NULL, /* emit_ops */ - NULL, /* get_min_fast_tracepoint_insn_len */ NULL, /* supports_range_stepping */ m68k_supports_hardware_single_step, }; diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc index 5935c42..09a9be3 100644 --- a/gdbserver/linux-ppc-low.cc +++ b/gdbserver/linux-ppc-low.cc @@ -65,6 +65,18 @@ public: bool supports_tracepoints () override; + bool supports_fast_tracepoints () override; + + int 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) override; + + int get_min_fast_tracepoint_insn_len () override; + protected: void low_arch_setup () override; @@ -1570,22 +1582,29 @@ ppc_relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc) *to += 4; } +bool +ppc_target::supports_fast_tracepoints () +{ + return true; +} + /* Implement install_fast_tracepoint_jump_pad of target_ops. See target.h for details. */ -static int -ppc_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) +int +ppc_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) { uint32_t buf[256]; uint32_t *p = buf; @@ -1779,8 +1798,8 @@ ppc_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr, /* Returns the minimum instruction length for installing a tracepoint. */ -static int -ppc_get_min_fast_tracepoint_insn_len (void) +int +ppc_target::get_min_fast_tracepoint_insn_len () { return 4; } @@ -3433,9 +3452,7 @@ ppc_get_ipa_tdesc_idx (void) } struct linux_target_ops the_low_target = { - ppc_install_fast_tracepoint_jump_pad, ppc_emit_ops, - ppc_get_min_fast_tracepoint_insn_len, NULL, /* supports_range_stepping */ ppc_supports_hardware_single_step, NULL, /* get_syscall_trapinfo */ diff --git a/gdbserver/linux-s390-low.cc b/gdbserver/linux-s390-low.cc index 28a0a8b..2b093b8 100644 --- a/gdbserver/linux-s390-low.cc +++ b/gdbserver/linux-s390-low.cc @@ -65,6 +65,18 @@ public: bool supports_tracepoints () override; + bool supports_fast_tracepoints () override; + + int 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) override; + + int get_min_fast_tracepoint_insn_len () override; + void low_collect_ptrace_register (regcache *regcache, int regno, char *buf) override; @@ -1255,23 +1267,23 @@ s390_relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc, int is_64) return 0; } -/* Implementation of linux_target_ops method +bool +s390_target::supports_fast_tracepoints () +{ + return true; +} + +/* Implementation of target ops method "install_fast_tracepoint_jump_pad". */ -static int -s390_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) +int +s390_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) { int i; int64_t loffset; @@ -1425,11 +1437,11 @@ s390_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, return 0; } -/* Implementation of linux_target_ops method +/* Implementation of target ops method "get_min_fast_tracepoint_insn_len". */ -static int -s390_get_min_fast_tracepoint_insn_len (void) +int +s390_target::get_min_fast_tracepoint_insn_len () { /* We only support using 6-byte jumps to reach the tracepoint code. If the tracepoint buffer were allocated sufficiently close (64kiB) @@ -2849,9 +2861,7 @@ s390_emit_ops (void) } struct linux_target_ops the_low_target = { - s390_install_fast_tracepoint_jump_pad, s390_emit_ops, - s390_get_min_fast_tracepoint_insn_len, NULL, /* supports_range_stepping */ s390_supports_hardware_single_step, NULL, /* get_syscall_trapinfo */ diff --git a/gdbserver/linux-sh-low.cc b/gdbserver/linux-sh-low.cc index 30a966d..847f686 100644 --- a/gdbserver/linux-sh-low.cc +++ b/gdbserver/linux-sh-low.cc @@ -192,9 +192,7 @@ sh_target::low_arch_setup () } struct linux_target_ops the_low_target = { - NULL, /* install_fast_tracepoint_jump_pad */ NULL, /* emit_ops */ - NULL, /* get_min_fast_tracepoint_insn_len */ NULL, /* supports_range_stepping */ sh_supports_hardware_single_step, }; diff --git a/gdbserver/linux-tic6x-low.cc b/gdbserver/linux-tic6x-low.cc index f0f9917..220681e 100644 --- a/gdbserver/linux-tic6x-low.cc +++ b/gdbserver/linux-tic6x-low.cc @@ -423,9 +423,7 @@ tic6x_target::get_regs_info () } struct linux_target_ops the_low_target = { - NULL, /* install_fast_tracepoint_jump_pad */ NULL, /* emit_ops */ - NULL, /* get_min_fast_tracepoint_insn_len */ NULL, /* supports_range_stepping */ tic6x_supports_hardware_single_step, }; diff --git a/gdbserver/linux-tile-low.cc b/gdbserver/linux-tile-low.cc index d64d63b..7a840c4 100644 --- a/gdbserver/linux-tile-low.cc +++ b/gdbserver/linux-tile-low.cc @@ -224,9 +224,7 @@ tile_supports_hardware_single_step (void) struct linux_target_ops the_low_target = { - NULL, /* install_fast_tracepoint_jump_pad */ NULL, /* emit_ops */ - NULL, /* get_min_fast_tracepoint_insn_len */ NULL, /* supports_range_stepping */ tile_supports_hardware_single_step, }; diff --git a/gdbserver/linux-x86-low.cc b/gdbserver/linux-x86-low.cc index 664d0d9..de992fc 100644 --- a/gdbserver/linux-x86-low.cc +++ b/gdbserver/linux-x86-low.cc @@ -110,6 +110,18 @@ public: bool supports_tracepoints () override; + bool supports_fast_tracepoints () override; + + int 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) override; + + int get_min_fast_tracepoint_insn_len () override; + protected: void low_arch_setup () override; @@ -1525,19 +1537,26 @@ i386_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr, return 0; } -static int -x86_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) +bool +x86_target::supports_fast_tracepoints () +{ + return true; +} + +int +x86_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) { #ifdef __x86_64__ if (is_64bit_tdesc ()) @@ -1566,8 +1585,8 @@ x86_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr, /* Return the minimum instruction length for fast tracepoints on x86/x86-64 architectures. */ -static int -x86_get_min_fast_tracepoint_insn_len (void) +int +x86_target::get_min_fast_tracepoint_insn_len () { static int warned_about_fast_tracepoints = 0; @@ -2971,9 +2990,7 @@ x86_get_ipa_tdesc_idx (void) struct linux_target_ops the_low_target = { - x86_install_fast_tracepoint_jump_pad, x86_emit_ops, - x86_get_min_fast_tracepoint_insn_len, x86_supports_range_stepping, x86_supports_hardware_single_step, x86_get_syscall_trapinfo, diff --git a/gdbserver/linux-xtensa-low.cc b/gdbserver/linux-xtensa-low.cc index 7bef61a..9450121 100644 --- a/gdbserver/linux-xtensa-low.cc +++ b/gdbserver/linux-xtensa-low.cc @@ -329,9 +329,7 @@ xtensa_target::get_regs_info () } struct linux_target_ops the_low_target = { - NULL, /* install_fast_tracepoint_jump_pad */ NULL, /* emit_ops */ - NULL, /* get_min_fast_tracepoint_insn_len */ NULL, /* supports_range_stepping */ xtensa_supports_hardware_single_step, }; |