diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:36:23 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:46:02 -0500 |
commit | c583a2520616c2736cffc389c89a48b159366e6c (patch) | |
tree | b4925f26506fcee96c16119431c01760f05db95d /gdb/inf-ptrace.h | |
parent | ca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff) | |
download | fsf-binutils-gdb-users/simark/clang-format.zip fsf-binutils-gdb-users/simark/clang-format.tar.gz fsf-binutils-gdb-users/simark/clang-format.tar.bz2 |
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdb/inf-ptrace.h')
-rw-r--r-- | gdb/inf-ptrace.h | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/gdb/inf-ptrace.h b/gdb/inf-ptrace.h index 96fd4d7..011f095 100644 --- a/gdb/inf-ptrace.h +++ b/gdb/inf-ptrace.h @@ -44,8 +44,8 @@ struct inf_ptrace_target : public inf_child_target void kill () override; - void create_inferior (const char *, const std::string &, - char **, int) override; + void create_inferior (const char *, const std::string &, char **, + int) override; void mourn_inferior () override; @@ -54,17 +54,14 @@ struct inf_ptrace_target : public inf_child_target std::string pid_to_str (ptid_t) override; enum target_xfer_status xfer_partial (enum target_object object, - const char *annex, - gdb_byte *readbuf, + const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len) override; - bool is_async_p () override - { return m_event_pipe.is_open (); } + bool is_async_p () override { return m_event_pipe.is_open (); } - int async_wait_fd () override - { return m_event_pipe.event_fd (); } + int async_wait_fd () override { return m_event_pipe.event_fd (); } /* Helper routine used from SIGCHLD handlers to signal the async event pipe. */ @@ -75,15 +72,15 @@ struct inf_ptrace_target : public inf_child_target } protected: + /* Helper routines for interacting with the async event pipe. */ - bool async_file_open () - { return m_event_pipe.open_pipe (); } - void async_file_close () - { m_event_pipe.close_pipe (); } - void async_file_flush () - { m_event_pipe.flush (); } - void async_file_mark () - { m_event_pipe.mark (); } + bool async_file_open () { return m_event_pipe.open_pipe (); } + + void async_file_close () { m_event_pipe.close_pipe (); } + + void async_file_flush () { m_event_pipe.flush (); } + + void async_file_mark () { m_event_pipe.mark (); } /* Cleanup the inferior after a successful ptrace detach. */ void detach_success (inferior *inf); @@ -100,6 +97,7 @@ protected: virtual void post_startup_inferior (ptid_t ptid) = 0; private: + static event_pipe m_event_pipe; }; |