From 13e567af27e45f7e2f7adc9562d4cfe5a81227f9 Mon Sep 17 00:00:00 2001 From: Tankut Baris Aktemur Date: Thu, 2 Apr 2020 15:11:30 +0200 Subject: gdbserver/linux-low: turn 'get_thread_area' into a method gdbserver/ChangeLog: 2020-04-02 Tankut Baris Aktemur Turn the 'get_thread_area' linux target op into a method of process_stratum_target. * linux-low.h (struct linux_target_ops): Remove the op. (class linux_process_target) : Declare. * linux-low.cc (supports_fast_tracepoints): Remove. (linux_fast_tracepoint_collecting): Turn into... (linux_process_target::linux_fast_tracepoint_collecting): ...this. (linux_process_target::low_get_thread_area): Define. (stuck_in_jump_pad_callback): Turn into... (linux_process_target::stuck_in_jump_pad): ...this. Update the caller below. (linux_process_target::stabilize_threads) * linux-x86-low.cc (class x86_target) : Declare. (x86_get_thread_area): Turn into... (x86_target::low_get_thread_area): ...this. (the_low_target): Remove the op field. * linux-aarch64-low.cc (class aarch64_target) : Declare. (aarch64_get_thread_area): Turn into... (aarch64_target::low_get_thread_area): ...this. (the_low_target): Remove the op field. * linux-ppc-low.cc (class ppc_target) : Declare. (ppc_get_thread_area): Turn into... (ppc_target::low_get_thread_area): ...this. (the_low_target): Remove the op field. * linux-s390-low.cc (class s390_target) : Declare. (s390_get_thread_area): Turn into... (s390_target::low_get_thread_area): ...this. (the_low_target): Remove the op field. * linux-arm-low.cc (the_low_target): Remove the op field. * 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. --- gdbserver/linux-s390-low.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gdbserver/linux-s390-low.cc') diff --git a/gdbserver/linux-s390-low.cc b/gdbserver/linux-s390-low.cc index 22305fe9ce9..28a0a8b449f 100644 --- a/gdbserver/linux-s390-low.cc +++ b/gdbserver/linux-s390-low.cc @@ -88,6 +88,8 @@ protected: int low_decr_pc_after_break () override; bool low_breakpoint_at (CORE_ADDR pc) override; + + int low_get_thread_area (int lwpid, CORE_ADDR *addrp) override; }; /* The singleton target ops object. */ @@ -780,10 +782,10 @@ s390_target::supports_tracepoints () return true; } -/* Implementation of linux_target_ops method "get_thread_area". */ +/* Implementation of linux target ops method "low_get_thread_area". */ -static int -s390_get_thread_area (int lwpid, CORE_ADDR *addrp) +int +s390_target::low_get_thread_area (int lwpid, CORE_ADDR *addrp) { CORE_ADDR res = ptrace (PTRACE_PEEKUSER, lwpid, (long) PT_ACR0, (long) 0); #ifdef __s390x__ @@ -2847,7 +2849,6 @@ s390_emit_ops (void) } struct linux_target_ops the_low_target = { - s390_get_thread_area, s390_install_fast_tracepoint_jump_pad, s390_emit_ops, s390_get_min_fast_tracepoint_insn_len, -- cgit v1.2.1