Move OpenBSD-only functions from inf-ptrace to obsd-nat

All major BSDs implement PT_GET_PROCESS_STATE, but they differ in
details and want to implement follow-fork functionality differently.

gdb/ChangeLog:

	* inf-ptrace.h (follow_fork, insert_fork_catchpoint)
	(remove_fork_catchpoint, post_startup_inferior)
	(post_attach): Move...
	* obsd-nat.h (follow_fork, insert_fork_catchpoint)
	(remove_fork_catchpoint, post_startup_inferior)
	(post_attach): ...here.
	* inf-ptrace.c (follow_fork, insert_fork_catchpoint)
	(remove_fork_catchpoint, post_startup_inferior)
	(post_attach): Move...
	* obsd-nat.c (follow_fork, insert_fork_catchpoint)
	(remove_fork_catchpoint, post_startup_inferior)
	(post_attach): ...here.
This commit is contained in:
Kamil Rytarowski
2020-04-16 17:36:32 +02:00
parent 86e887ae11
commit 7632c6ce2b
5 changed files with 90 additions and 81 deletions

View File

@ -28,6 +28,18 @@ class obsd_nat_target : public inf_ptrace_target
std::string pid_to_str (ptid_t) override;
void update_thread_list () override;
ptid_t wait (ptid_t, struct target_waitstatus *, int) override;
#ifdef PT_GET_PROCESS_STATE
bool follow_fork (bool, bool) override;
int insert_fork_catchpoint (int) override;
int remove_fork_catchpoint (int) override;
void post_startup_inferior (ptid_t) override;
void post_attach (int) override;
#endif
};
#endif /* obsd-nat.h */