diff options
author | Sergio Durigan Junior <sergiodj@redhat.com> | 2016-08-25 16:26:24 -0400 |
---|---|---|
committer | Sergio Durigan Junior <sergiodj@redhat.com> | 2016-09-01 14:53:51 -0400 |
commit | 049a857091cff98371b5688140832a3cf767153c (patch) | |
tree | d9c21fa009e7cac0b35a1dfd8f655b8c90f5ccf8 /gdb/target | |
parent | 424844864aa6f49c616b3bb74a0a5ba9bcb92e72 (diff) | |
download | gdb-049a857091cff98371b5688140832a3cf767153c.zip gdb-049a857091cff98371b5688140832a3cf767153c.tar.gz gdb-049a857091cff98371b5688140832a3cf767153c.tar.bz2 |
Use target_continue{,_no_signal} instead of target_resume
This commit implements a new function, target_continue, on top of the
target_resume function. Then, it replaces all calls to target_resume
by calls to target_continue or to the already existing
target_continue_no_signal.
This is one of the (many) necessary steps needed to consolidate the
target interface between GDB and gdbserver. In particular, I am
interested in the impact this change will have on the unification of
the fork_inferior function (which I have been working on).
Tested on the BuildBot, no regressions introduced.
gdb/gdbserver/ChangeLog:
2016-09-31 Sergio Durigan Junior <sergiodj@redhat.com>
* server.c (start_inferior): New variable 'ptid'. Replace calls
to the_target->resume by target_continue{,_no_signal}, depending
on the case.
* target.c (target_stop_and_wait): Call target_continue_no_signal
instead of the_target->resume.
(target_continue): New function.
gdb/ChangeLog:
2016-09-31 Sergio Durigan Junior <sergiodj@redhat.com>
* fork-child.c (startup_inferior): Replace calls to target_resume
by target_continue{,_no_signal}, depending on the case.
* linux-nat.c (cleanup_target_stop): Call
target_continue_no_signal instead of target_resume.
* procfs.c (procfs_wait): Likewise.
* target.c (target_continue): New function.
* target/target.h (target_continue): New prototype.
Diffstat (limited to 'gdb/target')
-rw-r--r-- | gdb/target/target.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/target/target.h b/gdb/target/target.h index 76af732..64ef782 100644 --- a/gdb/target/target.h +++ b/gdb/target/target.h @@ -64,10 +64,14 @@ extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, extern void target_stop_and_wait (ptid_t ptid); -/* Restart a target previously stopped by target_stop_and_wait. - No signal is delivered to the target. This function must be - provided by the client. */ +/* Restart a target previously stopped. No signal is delivered to the + target. This function must be provided by the client. */ extern void target_continue_no_signal (ptid_t ptid); +/* Restart a target previously stopped. SIGNAL is delivered to the + target. This function must be provided by the client. */ + +extern void target_continue (ptid_t ptid, enum gdb_signal signal); + #endif /* TARGET_COMMON_H */ |