From f8c1d06b82ab0fd56bcffc9030cb44b5a946113e Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Thu, 11 Sep 2014 11:19:56 +0100 Subject: Introduce target_{stop,continue}_ptid This commit introduces two new functions to stop and restart target processes that shared code can use and that clients must implement. It also changes some shared code to use these functions. gdb/ChangeLog: * target/target.h (target_stop_ptid, target_continue_ptid): Declare. * target.c (target_stop_ptid, target_continue_ptid): New functions. * common/agent.c [!GDBSERVER]: Don't include infrun.h. (agent_run_command): Always use target_stop_ptid and target_continue_ptid. gdb/gdbserver/ChangeLog: * target.c (target_stop_ptid, target_continue_ptid): New functions. --- gdb/target/target.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gdb/target') diff --git a/gdb/target/target.h b/gdb/target/target.h index 0a3c4b7..99a7966 100644 --- a/gdb/target/target.h +++ b/gdb/target/target.h @@ -59,4 +59,15 @@ extern int target_read_uint32 (CORE_ADDR memaddr, uint32_t *result); extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len); +/* Make target stop in a continuable fashion. (For instance, under + Unix, this should act like SIGSTOP). This function must be + provided by the client. */ + +extern void target_stop_ptid (ptid_t ptid); + +/* Restart a target that was previously stopped by target_stop_ptid. + This function must be provided by the client. */ + +extern void target_continue_ptid (ptid_t ptid); + #endif /* TARGET_COMMON_H */ -- cgit v1.1