aboutsummaryrefslogtreecommitdiff
path: root/gdb/fbsd-nat.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-02-22 11:22:14 -0800
committerJohn Baldwin <jhb@FreeBSD.org>2022-02-22 11:22:14 -0800
commit9385df2a5818f08bd13b17e503fdb5e2011093c0 (patch)
treeec90061aa64d009a6474b6cfcc8e66cd7694ee62 /gdb/fbsd-nat.h
parentca81b5334e074e6c00137dba00154ef1b4489388 (diff)
downloadgdb-9385df2a5818f08bd13b17e503fdb5e2011093c0.zip
gdb-9385df2a5818f08bd13b17e503fdb5e2011093c0.tar.gz
gdb-9385df2a5818f08bd13b17e503fdb5e2011093c0.tar.bz2
fbsd-nat: Implement async target support.
This is a fairly simple version of async target support. Synchronous mode still uses blocking waitpid() calls in inf_ptrace::wait() unlike the Linux native target which always uses WNOHANG and uses sigsuspend() for synchronous operation. Asynchronous mode registers an event pipe with the core as a file handle and writes to the pipe when SIGCHLD is raised. TARGET_WNOHANG is handled by inf_ptrace::wait().
Diffstat (limited to 'gdb/fbsd-nat.h')
-rw-r--r--gdb/fbsd-nat.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/fbsd-nat.h b/gdb/fbsd-nat.h
index b32cabb..411573b 100644
--- a/gdb/fbsd-nat.h
+++ b/gdb/fbsd-nat.h
@@ -66,9 +66,19 @@ public:
void update_thread_list () override;
+ bool can_async_p () override;
+ bool is_async_p () override;
+
+ int async_wait_fd () override;
+ void async (int) override;
+
+ void close () override;
+
thread_control_capabilities get_thread_control_capabilities () override
{ return tc_schedlock; }
+ void attach (const char *, int) override;
+
void create_inferior (const char *, const std::string &,
char **, int) override;
@@ -110,6 +120,8 @@ protected:
void post_startup_inferior (ptid_t) override;
private:
+ ptid_t wait_1 (ptid_t, struct target_waitstatus *, target_wait_flags);
+
/* Helper routines for use in fetch_registers and store_registers in
subclasses. These routines fetch and store a single set of
registers described by REGSET. The REGSET's 'regmap' field must