gdbserver: turn target op 'detach' into a method

gdbserver/ChangeLog:
2020-02-20  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	Turn process_stratum_target's detach op into a method of
	process_target.

	* target.h (struct process_stratum_target): Remove the target op.
	(class process_target): Add the target op.
	(detach_inferior): Update the macro.

	Update the derived classes and callers below.

	* linux-low.cc (linux_target_ops): Update.
	(linux_detach): Turn into ...
	(linux_process_target::detach): ... this.
	* linux-low.h (class linux_process_target): Update.
	* lynx-low.cc (lynx_target_ops): Update.
	(lynx_detach): Turn into ...
	(lynx_process_target::detach): ... this.
	* lynx-low.h (class lynx_process_target): Update.
	* nto-low.cc (nto_target_ops): Update.
	(nto_detach): Turn into ...
	(nto_process_target::detach): ... this.
	* nto-low.h (class nto_process_target): Update.
	* win32-low.cc (win32_target_ops): Update.
	(win32_detach): Turn into ...
	(win32_process_target::detach): ... this.
	* win32-low.h (class win32_process_target): Update.
This commit is contained in:
Tankut Baris Aktemur
2020-02-17 16:11:51 +01:00
parent c6885a575f
commit 9061c9cfb3
10 changed files with 49 additions and 18 deletions

View File

@@ -278,6 +278,8 @@ public:
int attach (unsigned long pid) override;
int kill (process_info *proc) override;
int detach (process_info *proc) override;
};
#define get_thread_lwp(thr) ((struct lwp_info *) (thread_target_data (thr)))