diff options
Diffstat (limited to 'gdb/inf-child.h')
-rw-r--r-- | gdb/inf-child.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/gdb/inf-child.h b/gdb/inf-child.h index 017e8e3..f0a383d 100644 --- a/gdb/inf-child.h +++ b/gdb/inf-child.h @@ -30,6 +30,7 @@ class inf_child_target : public memory_breakpoint_target<process_stratum_target> { public: + inf_child_target () = default; ~inf_child_target () override = 0; @@ -63,8 +64,9 @@ public: bool can_run () override; bool can_create_inferior () override; - void create_inferior (const char *, const std::string &, - char **, int) override = 0; + void create_inferior (const char *, const std::string &, char **, + int) override + = 0; bool can_attach () override; void attach (const char *, int) override = 0; @@ -73,26 +75,27 @@ public: const char *pid_to_exec_file (int pid) override; - int fileio_open (struct inferior *inf, const char *filename, - int flags, int mode, int warn_if_slow, + int fileio_open (struct inferior *inf, const char *filename, int flags, + int mode, int warn_if_slow, fileio_error *target_errno) override; int fileio_pwrite (int fd, const gdb_byte *write_buf, int len, ULONGEST offset, fileio_error *target_errno) override; - int fileio_pread (int fd, gdb_byte *read_buf, int len, - ULONGEST offset, fileio_error *target_errno) override; - int fileio_fstat (int fd, struct stat *sb, fileio_error *target_errno) override; + int fileio_pread (int fd, gdb_byte *read_buf, int len, ULONGEST offset, + fileio_error *target_errno) override; + int fileio_fstat (int fd, struct stat *sb, + fileio_error *target_errno) override; int fileio_close (int fd, fileio_error *target_errno) override; - int fileio_unlink (struct inferior *inf, - const char *filename, + int fileio_unlink (struct inferior *inf, const char *filename, fileio_error *target_errno) override; - gdb::optional<std::string> fileio_readlink (struct inferior *inf, - const char *filename, - fileio_error *target_errno) override; + gdb::optional<std::string> + fileio_readlink (struct inferior *inf, const char *filename, + fileio_error *target_errno) override; bool use_agent (bool use) override; bool can_use_agent () override; protected: + /* Unpush the target if it wasn't explicitly open with "target native" and there are no live inferiors left. Note: if calling this as a result of a mourn or detach, the current inferior shall already |