shared code. */
struct process_stratum_target
{
- /* 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. */
-
- int (*prepare_to_access_memory) (void);
-
- /* Undo the effects of prepare_to_access_memory. */
-
- void (*done_accessing_memory) (void);
-
- /* 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. */
-
- int (*read_memory) (CORE_ADDR memaddr, unsigned char *myaddr, int len);
-
- /* 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. */
-
- int (*write_memory) (CORE_ADDR memaddr, const unsigned char *myaddr,
- int len);
-
- /* 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. NULL if we aren't interested in any
- symbols. */
-
- void (*look_up_symbols) (void);
-
- /* Send an interrupt request to the inferior process,
- however is appropriate. */
-
- void (*request_interrupt) (void);
-
- /* Read auxiliary vector data from the inferior process.
-
- Read LEN bytes at OFFSET into a buffer at MYADDR. */
-
- int (*read_auxv) (CORE_ADDR offset, unsigned char *myaddr,
- unsigned int len);
-
/* Returns true if GDB Z breakpoint type TYPE is supported, false
otherwise. The type is coded as follows:
'0' - software-breakpoint
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 ();
+
+ /* Send an interrupt request to the inferior process,
+ however is appropriate. */
+ virtual void request_interrupt () = 0;
+
+ /* Return true if the read_auxv target op is supported. */
+ virtual bool supports_read_auxv ();
+
+ /* Read auxiliary vector data from the inferior process.
+
+ Read LEN bytes at OFFSET into a buffer at MYADDR. */
+ virtual int read_auxv (CORE_ADDR offset, unsigned char *myaddr,
+ unsigned int len);
};
extern process_stratum_target *the_target;