+public:
+
+ virtual ~process_stratum_target () = default;
+
+ /* Start a new process.
+
+ PROGRAM is a path to the program to execute.
+ PROGRAM_ARGS is a standard NULL-terminated array of arguments,
+ to be passed to the inferior as ``argv'' (along with PROGRAM).
+
+ Returns the new PID on success, -1 on failure. Registers the new
+ process with the process list. */
+ virtual int create_inferior (const char *program,
+ const std::vector<char *> &program_args) = 0;
+
+ /* Do additional setup after a new process is created, including
+ exec-wrapper completion. */
+ virtual void post_create_inferior ();
+
+ /* Attach to a running process.
+
+ PID is the process ID to attach to, specified by the user
+ or a higher layer.
+
+ Returns -1 if attaching is unsupported, 0 on success, and calls
+ error() otherwise. */
+ virtual int attach (unsigned long pid) = 0;
+
+ /* Kill process PROC. Return -1 on failure, and 0 on success. */
+ virtual int kill (process_info *proc) = 0;
+
+ /* Detach from process PROC. Return -1 on failure, and 0 on
+ success. */
+ virtual int detach (process_info *proc) = 0;
+
+ /* The inferior process has died. Do what is right. */
+ virtual void mourn (process_info *proc) = 0;
+
+ /* Wait for process PID to exit. */
+ virtual void join (int pid) = 0;
+
+ /* Return true iff the thread with process ID PID is alive. */
+ virtual bool thread_alive (ptid_t pid) = 0;
+
+ /* Resume the inferior process. */
+ virtual void resume (thread_resume *resume_info, size_t n) = 0;
+
+ /* Wait for the inferior process or thread to change state. Store
+ status through argument pointer STATUS.
+
+ PTID = -1 to wait for any pid to do something, PTID(pid,0,0) to
+ wait for any thread of process pid to do something. Return ptid
+ of child, or -1 in case of error; store status through argument
+ pointer STATUS. OPTIONS is a bit set of options defined as
+ TARGET_W* above. If options contains TARGET_WNOHANG and there's
+ no child stop to report, return is
+ null_ptid/TARGET_WAITKIND_IGNORE. */
+ virtual ptid_t wait (ptid_t ptid, target_waitstatus *status,
+ int options) = 0;
+
+ /* Fetch registers from the inferior process.
+
+ If REGNO is -1, fetch all registers; otherwise, fetch at least REGNO. */
+ virtual void fetch_registers (regcache *regcache, int regno) = 0;
+
+ /* Store registers to the inferior process.
+
+ If REGNO is -1, store all registers; otherwise, store at least REGNO. */
+ virtual void store_registers (regcache *regcache, int regno) = 0;
+
+ /* Prepare to read or write memory from the inferior process.
+ Targets use this to do what is necessary to get the state of the
+ inferior such that it is possible to access memory.
+
+ This should generally only be called from client facing routines,
+ such as gdb_read_memory/gdb_write_memory, or the GDB breakpoint
+ insertion routine.
+
+ Like `read_memory' and `write_memory' below, returns 0 on success
+ and errno on failure. */
+ virtual int prepare_to_access_memory ();
+
+ /* Undo the effects of prepare_to_access_memory. */
+ virtual void done_accessing_memory ();
+
+ /* Read memory from the inferior process. This should generally be
+ called through read_inferior_memory, which handles breakpoint shadowing.
+
+ Read LEN bytes at MEMADDR into a buffer at MYADDR.
+
+ Returns 0 on success and errno on failure. */
+ virtual int read_memory (CORE_ADDR memaddr, unsigned char *myaddr,
+ int len) = 0;
+
+ /* Write memory to the inferior process. This should generally be
+ called through target_write_memory, which handles breakpoint shadowing.
+
+ Write LEN bytes from the buffer at MYADDR to MEMADDR.
+
+ Returns 0 on success and errno on failure. */
+ virtual int write_memory (CORE_ADDR memaddr, const unsigned char *myaddr,
+ int len) = 0;
+
+ /* Query GDB for the values of any symbols we're interested in.
+ This function is called whenever we receive a "qSymbols::"
+ query, which corresponds to every time more symbols (might)
+ become available. */
+ virtual void look_up_symbols ();
+