[v2,8/8] fbsd-nat: Implement the target stop method.
Commit Message
Stop each requested process via the stop_process helper function.
---
gdb/fbsd-nat.c | 19 +++++++++++++++++++
gdb/fbsd-nat.h | 2 ++
2 files changed, 21 insertions(+)
@@ -1367,6 +1367,25 @@ fbsd_nat_target::commit_resumed ()
resume_one_process (inf);
}
+/* Implement the "stop" target method. */
+
+void
+fbsd_nat_target::stop (ptid_t ptid)
+{
+ fbsd_nat_debug_printf ("[%s]", target_pid_to_str (ptid).c_str ());
+ if (ptid == minus_one_ptid)
+ {
+ for (inferior *inf : all_non_exited_inferiors (this))
+ stop_process (inf);
+ }
+ else
+ {
+ inferior *inf = find_inferior_ptid (this, ptid);
+ gdb_assert (inf != nullptr);
+ stop_process (inf);
+ }
+}
+
#ifdef USE_SIGTRAP_SIGINFO
/* Handle breakpoint and trace traps reported via SIGTRAP. If the
trap was a breakpoint or trace trap that should be reported to the
@@ -91,6 +91,8 @@ class fbsd_nat_target : public inf_ptrace_target
void commit_resumed () override;
+ void stop (ptid_t) override;
+
ptid_t wait (ptid_t, struct target_waitstatus *, target_wait_flags) override;
void post_attach (int) override;