aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/linux-low.cc
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-04-02 15:11:23 +0200
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-04-02 15:11:23 +0200
commit797bcff595c5e161b333077299fcaca19bb4fd17 (patch)
tree4be46e20ff8ef62c5965e68f375b87866cef7ddb /gdbserver/linux-low.cc
parentef0478f6112ede4da9b70e07aa3124f0d2faf108 (diff)
downloadgdb-797bcff595c5e161b333077299fcaca19bb4fd17.zip
gdb-797bcff595c5e161b333077299fcaca19bb4fd17.tar.gz
gdb-797bcff595c5e161b333077299fcaca19bb4fd17.tar.bz2
gdbserver/linux-low: turn 'arch_setup' into a method
gdbserver/ChangeLog: 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn the 'arch_setup' linux target op into a method of linux_process_target. * linux-low.h (struct linux_target_ops) <arch_setup>: Delete. (class linux_process_target) <arch_setup_thread> <low_arch_setup>: New declarations. * linux-low.cc (linux_arch_setup): Delete. (linux_arch_setup_thread): Turn into... (linux_process_target::arch_setup_thread): ... this. Update the callers below. (linux_process_target::handle_extended_wait) (linux_process_target::post_create_inferior) (linux_process_target::filter_event) * linux-x86-low.cc (class x86_target) <low_arch_setup>: New declaration. (x86_linux_update_xmltarget): Turn into... (x86_target::update_xmltarget): ...this. (x86_linux_process_qsupported): Update the call to x86_linux_update_xmltarget. (x86_arch_setup): Turn into ... (x86_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New declaration. (aarch64_arch_setup): Turn into ... (aarch64_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-arm-low.cc (class arm_target) <low_arch_setup>: New declaration. (arm_arch_setup): Turn into ... (arm_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New declaration. (bfin_arch_setup): Turn into ... (bfin_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-cris-low.cc (class cris_target) <low_arch_setup>: New declaration. (cris_arch_setup): Turn into ... (cris_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New declaration. (crisv32_arch_setup): Turn into ... (crisv32_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New declaration. (ia64_arch_setup): Turn into ... (ia64_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New declaration. (m32r_arch_setup): Turn into ... (m32r_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New declaration. (m68k_arch_setup): Turn into ... (m68k_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-mips-low.cc (class mips_target) <low_arch_setup>: New declaration. (mips_arch_setup): Turn into ... (mips_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New declaration. (nios2_arch_setup): Turn into ... (nios2_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New declaration. (ppc_arch_setup): Turn into ... (ppc_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New declaration. (riscv_arch_setup): Turn into ... (riscv_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-s390-low.cc (class s390_target) <low_arch_setup>: New declaration. (s390_arch_setup): Turn into ... (s390_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-sh-low.cc (class sh_target) <low_arch_setup>: New declaration. (sh_arch_setup): Turn into ... (sh_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New declaration. (sparc_arch_setup): Turn into ... (sparc_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New declaration. (tic6x_arch_setup): Turn into ... (tic6x_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-tile-low.cc (class tile_target) <low_arch_setup>: New declaration. (tile_arch_setup): Turn into ... (tile_target::low_arch_setup): ...this. (the_low_target): Remove the op field. * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New declaration. (xtensa_arch_setup): Turn into ... (xtensa_target::low_arch_setup): ...this. (the_low_target): Remove the op field.
Diffstat (limited to 'gdbserver/linux-low.cc')
-rw-r--r--gdbserver/linux-low.cc22
1 files changed, 6 insertions, 16 deletions
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index d399ea5..5553337 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -440,25 +440,15 @@ linux_add_process (int pid, int attached)
static CORE_ADDR get_pc (struct lwp_info *lwp);
-/* Call the target arch_setup function on the current thread. */
-
-static void
-linux_arch_setup (void)
-{
- the_low_target.arch_setup ();
-}
-
-/* Call the target arch_setup function on THREAD. */
-
-static void
-linux_arch_setup_thread (struct thread_info *thread)
+void
+linux_process_target::arch_setup_thread (thread_info *thread)
{
struct thread_info *saved_thread;
saved_thread = current_thread;
current_thread = thread;
- linux_arch_setup ();
+ low_arch_setup ();
current_thread = saved_thread;
}
@@ -706,7 +696,7 @@ linux_process_target::handle_extended_wait (lwp_info **orig_event_lwp,
event_lwp = add_lwp (event_ptid);
event_thr = get_lwp_thread (event_lwp);
gdb_assert (current_thread == event_thr);
- linux_arch_setup_thread (event_thr);
+ arch_setup_thread (event_thr);
/* Set the event status. */
event_lwp->waitstatus.kind = TARGET_WAITKIND_EXECD;
@@ -1025,7 +1015,7 @@ linux_process_target::post_create_inferior ()
{
struct lwp_info *lwp = get_thread_lwp (current_thread);
- linux_arch_setup ();
+ low_arch_setup ();
if (lwp->must_set_ptrace_flags)
{
@@ -2433,7 +2423,7 @@ linux_process_target::filter_event (int lwpid, int wstat)
/* This needs to happen after we have attached to the
inferior and it is stopped for the first time, but
before we access any inferior registers. */
- linux_arch_setup_thread (thread);
+ arch_setup_thread (thread);
}
else
{