From 29e8dc09ff78e102ede0cdbb802cb771613bb8b1 Mon Sep 17 00:00:00 2001 From: Tankut Baris Aktemur Date: Mon, 17 Feb 2020 16:12:00 +0100 Subject: gdbserver: turn target ops 'pause_all' and 'unpause_all' into methods gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur Turn process_stratum_target's pause_all and unpause_all ops into methods of process_target. * target.h (struct process_stratum_target): Remove the target ops. (class process_target): Add the target ops. (pause_all): Update the macro and rename to... (target_pause_all): ... this. (unpause_all): Update the macro and rename to... (target_unpause_all): ... this. * target.cc (process_target::pause_all): Define. (process_target::unpause_all): Define. Update the derived classes and callers below. * server.cc (handle_status): Update. * tracepoint.cc (clear_installed_tracepoints): Update. (cmd_qtdp): Update. (cmd_qtstart): Update. (stop_tracing): Update. (cmd_qtstatus): Update. (upload_fast_traceframes): Update. (run_inferior_command): Update. * linux-low.cc (linux_target_ops): Update. (linux_pause_all): Turn into ... (linux_process_target::pause_all): ... this. (linux_unpause_all): Turn into ... (linux_process_target::unpause_all): ... this. (linux_process_target::prepare_to_access_memory): Update. (linux_process_target::done_accessing_memory): Update. * 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/linux-low.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'gdbserver/linux-low.cc') diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc index c7ebffd..1a1af79 100644 --- a/gdbserver/linux-low.cc +++ b/gdbserver/linux-low.cc @@ -6586,8 +6586,8 @@ linux_process_target::thread_stopped (thread_info *thread) /* This exposes stop-all-threads functionality to other modules. */ -static void -linux_pause_all (int freeze) +void +linux_process_target::pause_all (bool freeze) { stop_all_lwps (freeze, NULL); } @@ -6595,8 +6595,8 @@ linux_pause_all (int freeze) /* This exposes unstop-all-threads functionality to other gdbserver modules. */ -static void -linux_unpause_all (int unfreeze) +void +linux_process_target::unpause_all (bool unfreeze) { unstop_all_lwps (unfreeze, NULL); } @@ -6607,7 +6607,7 @@ linux_process_target::prepare_to_access_memory () /* Neither ptrace nor /proc/PID/mem allow accessing memory through a running LWP. */ if (non_stop) - linux_pause_all (1); + target_pause_all (true); return 0; } @@ -6617,7 +6617,7 @@ linux_process_target::done_accessing_memory () /* Neither ptrace nor /proc/PID/mem allow accessing memory through a running LWP. */ if (non_stop) - linux_unpause_all (1); + target_unpause_all (true); } static int @@ -7455,8 +7455,6 @@ linux_get_hwcap2 (int wordsize) static linux_process_target the_linux_target; static process_stratum_target linux_target_ops = { - linux_pause_all, - linux_unpause_all, linux_stabilize_threads, linux_install_fast_tracepoint_jump_pad, linux_emit_ops, -- cgit v1.1