diff options
author | Gary Benson <gbenson@redhat.com> | 2014-09-11 11:19:56 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2014-09-11 11:19:56 +0100 |
commit | 721ec300e1e27c2fa7540ef97f39b6c5ce65083f (patch) | |
tree | a0dfc0a39a7bbce24a32af6bed353ba57675eafc /gdb/target.h | |
parent | c5e92cca56da9153985d4c15dab243e383f66919 (diff) | |
download | gdb-721ec300e1e27c2fa7540ef97f39b6c5ce65083f.zip gdb-721ec300e1e27c2fa7540ef97f39b6c5ce65083f.tar.gz gdb-721ec300e1e27c2fa7540ef97f39b6c5ce65083f.tar.bz2 |
Introduce target/target.h
This introduces target/target.h. This file declares some functions
that the shared code can use and that clients must implement. It also
changes some shared code to use these functions.
gdb/ChangeLog:
* target/target.h: New file.
* Makefile.in (HFILES_NO_SRCDIR): Add target/target.h.
* target.h: Include target/target.h.
(target_read_memory, target_write_memory): Don't declare.
* target.c (target_read_uint32): New function.
* common/agent.c: Include target/target.h.
[!GDBSERVER]: Don't include target.h.
(helper_thread_id): Type changed to uint32_t.
(agent_get_helper_thread_id): Use target_read_uint32.
(agent_run_command): Always use target_read_memory and
target_write_memory.
(agent_capability): Type changed to uint32_t.
(agent_capability_check): Use target_read_uint32.
gdb/gdbserver/ChangeLog:
* target.h: Include target/target.h.
* target.c (target_read_memory, target_read_uint32)
(target_write_memory): New functions.
Diffstat (limited to 'gdb/target.h')
-rw-r--r-- | gdb/target.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/target.h b/gdb/target.h index 85763ba..2ea7a2d 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -58,6 +58,7 @@ struct dcache_struct; it goes into the file stratum, which is always below the process stratum. */ +#include "target/target.h" #include "target/resume.h" #include "target/wait.h" #include "target/waitstatus.h" @@ -1292,8 +1293,7 @@ int target_supports_disable_randomization (void); extern int target_read_string (CORE_ADDR, char **, int, int *); -extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, - ssize_t len); +/* For target_read_memory see target/target.h. */ extern int target_read_raw_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len); @@ -1302,8 +1302,7 @@ extern int target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len); extern int target_read_code (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len); -extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, - ssize_t len); +/* For target_write_memory see target/target.h. */ extern int target_write_raw_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len); |