Introduce target/target.h
authorGary Benson <gbenson@redhat.com>
Thu, 11 Sep 2014 10:19:56 +0000 (11:19 +0100)
committerGary Benson <gbenson@redhat.com>
Thu, 11 Sep 2014 10:19:56 +0000 (11:19 +0100)
commit721ec300e1e27c2fa7540ef97f39b6c5ce65083f
treea0dfc0a39a7bbce24a32af6bed353ba57675eafc
parentc5e92cca56da9153985d4c15dab243e383f66919
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.
gdb/ChangeLog
gdb/Makefile.in
gdb/common/agent.c
gdb/gdbserver/ChangeLog
gdb/gdbserver/target.c
gdb/gdbserver/target.h
gdb/target.c
gdb/target.h
gdb/target/target.h [new file with mode: 0644]