mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-04 13:57:12 +08:00
convert to_mourn_inferior
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (default_mourn_inferior): New function. (target_mourn_inferior): Unconditionally delegate. * target.h (struct target_ops) <to_mourn_inferior>: Use TARGET_DEFAULT_FUNC.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2014-02-19 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* target-delegates.c: Rebuild.
|
||||||
|
* target.c (default_mourn_inferior): New function.
|
||||||
|
(target_mourn_inferior): Unconditionally delegate.
|
||||||
|
* target.h (struct target_ops) <to_mourn_inferior>: Use
|
||||||
|
TARGET_DEFAULT_FUNC.
|
||||||
|
|
||||||
2014-02-19 Tom Tromey <tromey@redhat.com>
|
2014-02-19 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* target-delegates.c: Rebuild.
|
* target-delegates.c: Rebuild.
|
||||||
|
@ -510,6 +510,13 @@ tdefault_has_exited (struct target_ops *self, int arg1, int arg2, int *arg3)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
delegate_mourn_inferior (struct target_ops *self)
|
||||||
|
{
|
||||||
|
self = self->beneath;
|
||||||
|
self->to_mourn_inferior (self);
|
||||||
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
delegate_extra_thread_info (struct target_ops *self, struct thread_info *arg1)
|
delegate_extra_thread_info (struct target_ops *self, struct thread_info *arg1)
|
||||||
{
|
{
|
||||||
@ -1247,6 +1254,8 @@ install_delegators (struct target_ops *ops)
|
|||||||
ops->to_set_syscall_catchpoint = delegate_set_syscall_catchpoint;
|
ops->to_set_syscall_catchpoint = delegate_set_syscall_catchpoint;
|
||||||
if (ops->to_has_exited == NULL)
|
if (ops->to_has_exited == NULL)
|
||||||
ops->to_has_exited = delegate_has_exited;
|
ops->to_has_exited = delegate_has_exited;
|
||||||
|
if (ops->to_mourn_inferior == NULL)
|
||||||
|
ops->to_mourn_inferior = delegate_mourn_inferior;
|
||||||
if (ops->to_extra_thread_info == NULL)
|
if (ops->to_extra_thread_info == NULL)
|
||||||
ops->to_extra_thread_info = delegate_extra_thread_info;
|
ops->to_extra_thread_info = delegate_extra_thread_info;
|
||||||
if (ops->to_thread_name == NULL)
|
if (ops->to_thread_name == NULL)
|
||||||
@ -1403,6 +1412,7 @@ install_dummy_methods (struct target_ops *ops)
|
|||||||
ops->to_remove_exec_catchpoint = tdefault_remove_exec_catchpoint;
|
ops->to_remove_exec_catchpoint = tdefault_remove_exec_catchpoint;
|
||||||
ops->to_set_syscall_catchpoint = tdefault_set_syscall_catchpoint;
|
ops->to_set_syscall_catchpoint = tdefault_set_syscall_catchpoint;
|
||||||
ops->to_has_exited = tdefault_has_exited;
|
ops->to_has_exited = tdefault_has_exited;
|
||||||
|
ops->to_mourn_inferior = default_mourn_inferior;
|
||||||
ops->to_extra_thread_info = tdefault_extra_thread_info;
|
ops->to_extra_thread_info = tdefault_extra_thread_info;
|
||||||
ops->to_thread_name = tdefault_thread_name;
|
ops->to_thread_name = tdefault_thread_name;
|
||||||
ops->to_stop = tdefault_stop;
|
ops->to_stop = tdefault_stop;
|
||||||
|
24
gdb/target.c
24
gdb/target.c
@ -63,6 +63,8 @@ static ptid_t default_get_ada_task_ptid (struct target_ops *self,
|
|||||||
static int default_follow_fork (struct target_ops *self, int follow_child,
|
static int default_follow_fork (struct target_ops *self, int follow_child,
|
||||||
int detach_fork);
|
int detach_fork);
|
||||||
|
|
||||||
|
static void default_mourn_inferior (struct target_ops *self);
|
||||||
|
|
||||||
static void tcomplain (void) ATTRIBUTE_NORETURN;
|
static void tcomplain (void) ATTRIBUTE_NORETURN;
|
||||||
|
|
||||||
static int nomemory (CORE_ADDR, char *, int, int, struct target_ops *);
|
static int nomemory (CORE_ADDR, char *, int, int, struct target_ops *);
|
||||||
@ -2660,16 +2662,17 @@ target_follow_fork (int follow_child, int detach_fork)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
default_mourn_inferior (struct target_ops *self)
|
||||||
|
{
|
||||||
|
internal_error (__FILE__, __LINE__,
|
||||||
|
_("could not find a target to follow mourn inferior"));
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
target_mourn_inferior (void)
|
target_mourn_inferior (void)
|
||||||
{
|
{
|
||||||
struct target_ops *t;
|
current_target.to_mourn_inferior (¤t_target);
|
||||||
|
|
||||||
for (t = current_target.beneath; t != NULL; t = t->beneath)
|
|
||||||
{
|
|
||||||
if (t->to_mourn_inferior != NULL)
|
|
||||||
{
|
|
||||||
t->to_mourn_inferior (t);
|
|
||||||
if (targetdebug)
|
if (targetdebug)
|
||||||
fprintf_unfiltered (gdb_stdlog, "target_mourn_inferior ()\n");
|
fprintf_unfiltered (gdb_stdlog, "target_mourn_inferior ()\n");
|
||||||
|
|
||||||
@ -2677,13 +2680,6 @@ target_mourn_inferior (void)
|
|||||||
Make sure to release them to avoid unnecessarily locking any
|
Make sure to release them to avoid unnecessarily locking any
|
||||||
of them while we're not actually debugging. */
|
of them while we're not actually debugging. */
|
||||||
bfd_cache_close_all ();
|
bfd_cache_close_all ();
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal_error (__FILE__, __LINE__,
|
|
||||||
_("could not find a target to follow mourn inferior"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Look for a target which can describe architectural features, starting
|
/* Look for a target which can describe architectural features, starting
|
||||||
|
@ -544,7 +544,8 @@ struct target_ops
|
|||||||
TARGET_DEFAULT_RETURN (1);
|
TARGET_DEFAULT_RETURN (1);
|
||||||
int (*to_has_exited) (struct target_ops *, int, int, int *)
|
int (*to_has_exited) (struct target_ops *, int, int, int *)
|
||||||
TARGET_DEFAULT_RETURN (0);
|
TARGET_DEFAULT_RETURN (0);
|
||||||
void (*to_mourn_inferior) (struct target_ops *);
|
void (*to_mourn_inferior) (struct target_ops *)
|
||||||
|
TARGET_DEFAULT_FUNC (default_mourn_inferior);
|
||||||
int (*to_can_run) (struct target_ops *);
|
int (*to_can_run) (struct target_ops *);
|
||||||
|
|
||||||
/* Documentation of this routine is provided with the corresponding
|
/* Documentation of this routine is provided with the corresponding
|
||||||
|
Reference in New Issue
Block a user