mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 17:18:24 +08:00
convert to_detach
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (target_detach): Unconditionally delegate. (init_dummy_target): Don't initialize to_detach. * target.h (struct target_ops) <to_detach>: Use TARGET_DEFAULT_IGNORE.
This commit is contained in:
@ -3,6 +3,18 @@
|
||||
|
||||
/* To regenerate this file, run:*/
|
||||
/* make-target-delegates target.h > target-delegates.c */
|
||||
static void
|
||||
delegate_detach (struct target_ops *self, const char *arg1, int arg2)
|
||||
{
|
||||
self = self->beneath;
|
||||
self->to_detach (self, arg1, arg2);
|
||||
}
|
||||
|
||||
static void
|
||||
tdefault_detach (struct target_ops *self, const char *arg1, int arg2)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
delegate_resume (struct target_ops *self, ptid_t arg1, int arg2, enum gdb_signal arg3)
|
||||
{
|
||||
@ -138,6 +150,8 @@ tdefault_supports_btrace (struct target_ops *self)
|
||||
static void
|
||||
install_delegators (struct target_ops *ops)
|
||||
{
|
||||
if (ops->to_detach == NULL)
|
||||
ops->to_detach = delegate_detach;
|
||||
if (ops->to_resume == NULL)
|
||||
ops->to_resume = delegate_resume;
|
||||
if (ops->to_wait == NULL)
|
||||
@ -167,6 +181,7 @@ install_delegators (struct target_ops *ops)
|
||||
static void
|
||||
install_dummy_methods (struct target_ops *ops)
|
||||
{
|
||||
ops->to_detach = tdefault_detach;
|
||||
ops->to_resume = tdefault_resume;
|
||||
ops->to_wait = tdefault_wait;
|
||||
ops->to_store_registers = tdefault_store_registers;
|
||||
|
Reference in New Issue
Block a user