From 049a857091cff98371b5688140832a3cf767153c Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Thu, 25 Aug 2016 16:26:24 -0400 Subject: 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 * 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 * 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. --- gdb/target.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gdb/target.c') diff --git a/gdb/target.c b/gdb/target.c index 13e3cdb..87c9681 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3449,6 +3449,14 @@ target_continue_no_signal (ptid_t ptid) target_resume (ptid, 0, GDB_SIGNAL_0); } +/* See target/target.h. */ + +void +target_continue (ptid_t ptid, enum gdb_signal signal) +{ + target_resume (ptid, 0, signal); +} + /* Concatenate ELEM to LIST, a comma separate list, and return the result. The LIST incoming argument is released. */ -- cgit v1.1