X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fgdbserver%2Ftarget.h;h=1b0810ba04987e2522a00735833ee7c7e5d290bc;hb=5b6d1e4fa4fc6827c7b3f0e99ff120dfa14d65d2;hp=6f810b6db9eeed64d28cedfc2263edc68532730d;hpb=d105de22fc385da878e8db44c9503a7f30419322;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h index 6f810b6db9..1b0810ba04 100644 --- a/gdb/gdbserver/target.h +++ b/gdb/gdbserver/target.h @@ -1,5 +1,5 @@ /* Target operations for the remote server for GDB. - Copyright (C) 2002-2018 Free Software Foundation, Inc. + Copyright (C) 2002-2020 Free Software Foundation, Inc. Contributed by MontaVista Software. @@ -18,8 +18,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef TARGET_H -#define TARGET_H +#ifndef GDBSERVER_TARGET_H +#define GDBSERVER_TARGET_H #include /* for mode_t */ #include "target/target.h" @@ -27,7 +27,7 @@ #include "target/wait.h" #include "target/waitstatus.h" #include "mem-break.h" -#include "btrace-common.h" +#include "gdbsupport/btrace-common.h" #include struct emit_ops; @@ -63,7 +63,10 @@ struct thread_resume CORE_ADDR step_range_end; /* Exclusive */ }; -struct target_ops +/* GDBserver doesn't have a concept of strata like GDB, but we call + its target vector "process_stratum" anyway for the benefit of + shared code. */ +struct process_stratum_target { /* Start a new process. @@ -167,7 +170,7 @@ struct target_ops int (*read_memory) (CORE_ADDR memaddr, unsigned char *myaddr, int len); /* Write memory to the inferior process. This should generally be - called through write_inferior_memory, which handles breakpoint shadowing. + called through target_write_memory, which handles breakpoint shadowing. Write LEN bytes from the buffer at MYADDR to MEMADDR. @@ -256,10 +259,6 @@ struct target_ops int (*get_tls_address) (struct thread_info *thread, CORE_ADDR offset, CORE_ADDR load_module, CORE_ADDR *address); - /* Read/Write from/to spufs using qXfer packets. */ - int (*qxfer_spu) (const char *annex, unsigned char *readbuf, - unsigned const char *writebuf, CORE_ADDR offset, int len); - /* Fill BUF with an hostio error packet representing the last hostio error. */ void (*hostio_last_error) (char *buf); @@ -480,9 +479,9 @@ struct target_ops bool (*thread_handle) (ptid_t ptid, gdb_byte **handle, int *handle_len); }; -extern struct target_ops *the_target; +extern process_stratum_target *the_target; -void set_target_ops (struct target_ops *); +void set_target_ops (process_stratum_target *); #define create_inferior(program, program_args) \ (*the_target->create_inferior) (program, program_args) @@ -706,7 +705,7 @@ ptid_t mywait (ptid_t ptid, struct target_waitstatus *ourstatus, int options, int connected_wait); /* Prepare to read or write memory from the inferior process. See the - corresponding target_ops methods for more details. */ + corresponding process_stratum_target methods for more details. */ int prepare_to_access_memory (void); void done_accessing_memory (void); @@ -726,9 +725,6 @@ void done_accessing_memory (void); int read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len); -int write_inferior_memory (CORE_ADDR memaddr, const unsigned char *myaddr, - int len); - int set_desired_thread (); const char *target_pid_to_str (ptid_t); @@ -737,4 +733,4 @@ int target_can_do_hardware_single_step (void); int default_breakpoint_kind_from_pc (CORE_ADDR *pcptr); -#endif /* TARGET_H */ +#endif /* GDBSERVER_TARGET_H */