Re: [PATCH 2/9 v7] Introduce target/target.h

Pedro Alves
2014-09-10T10:17:55Z

On 08/29/2014 02:51 PM, Gary Benson wrote:
> 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.
>
> This patch differs from the version I posted on August 1
> (https://sourceware.org/ml/gdb-patches/2014-08/msg00014.html) in that
> the target_stop, target_wait and target_resume parts have been split
> into patch 3 of this series and that target_read_uint32's result is
> now a uint32_t.

OK.

Thanks,
Pedro Alves

>
> 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.