mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-26 07:19:16 +08:00
Share target_wait prototype between GDB and gdbserver
This commit moves the target_wait prototype from the GDB-specific target.h header to the common target/target.h header. Then, it creates a compatible implementation of target_wait on gdbserver using the_target->wait, and adjusts the (only) caller (mywait function). Pretty straightforward, no regressions introduced. gdb/gdbserver/ChangeLog: 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com> * target.c (mywait): Call target_wait instead of the_target->wait. (target_wait): New function. gdb/ChangeLog: 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com> * target.c (target_wait): Mention that the function's prototype can be found at target/target.h. * target.h (target_wait): Move prototype from here... * target/target.h (target_wait): ... to here.
This commit is contained in:
@ -211,7 +211,7 @@ mywait (ptid_t ptid, struct target_waitstatus *ourstatus, int options,
|
||||
if (connected_wait)
|
||||
server_waiting = 1;
|
||||
|
||||
ret = (*the_target->wait) (ptid, ourstatus, options);
|
||||
ret = target_wait (ptid, ourstatus, options);
|
||||
|
||||
/* We don't expose _LOADED events to gdbserver core. See the
|
||||
`dlls_changed' global. */
|
||||
@ -258,6 +258,14 @@ target_stop_and_wait (ptid_t ptid)
|
||||
|
||||
/* See target/target.h. */
|
||||
|
||||
ptid_t
|
||||
target_wait (ptid_t ptid, struct target_waitstatus *status, int options)
|
||||
{
|
||||
return (*the_target->wait) (ptid, status, options);
|
||||
}
|
||||
|
||||
/* See target/target.h. */
|
||||
|
||||
void
|
||||
target_continue_no_signal (ptid_t ptid)
|
||||
{
|
||||
|
Reference in New Issue
Block a user