void
thread_db_target::detach (inferior *inf, int from_tty)
{
- struct target_ops *target_beneath = find_target_beneath (this);
-
delete_thread_db_info (inf->pid);
- target_beneath->detach (inf, from_tty);
+ beneath ()->detach (inf, from_tty);
/* NOTE: From this point on, inferior_ptid is null_ptid. */
int options)
{
struct thread_db_info *info;
- struct target_ops *beneath = find_target_beneath (this);
- ptid = beneath->wait (ptid, ourstatus, options);
+ ptid = beneath ()->wait (ptid, ourstatus, options);
switch (ourstatus->kind)
{
void
thread_db_target::mourn_inferior ()
{
- struct target_ops *target_beneath = find_target_beneath (this);
-
delete_thread_db_info (ptid_get_pid (inferior_ptid));
- target_beneath->mourn_inferior ();
+ beneath ()->mourn_inferior ();
/* Detach thread_db target ops. */
if (!thread_db_list)
thread_db_target::pid_to_str (ptid_t ptid)
{
struct thread_info *thread_info = find_thread_ptid (ptid);
- struct target_ops *beneath;
if (thread_info != NULL && thread_info->priv != NULL)
{
return buf;
}
- beneath = find_target_beneath (this);
- return beneath->pid_to_str (ptid);
+ return beneath ()->pid_to_str (ptid);
}
/* Return a string describing the state of the thread specified by
CORE_ADDR offset)
{
struct thread_info *thread_info;
- struct target_ops *beneath;
/* Find the matching thread. */
thread_info = find_thread_ptid (ptid);
: (CORE_ADDR) (uintptr_t) address);
}
- beneath = find_target_beneath (this);
- return beneath->get_thread_local_address (ptid, lm, offset);
+ return beneath ()->get_thread_local_address (ptid, lm, offset);
}
/* Implement the to_get_ada_task_ptid target method for this target. */
void
thread_db_target::resume (ptid_t ptid, int step, enum gdb_signal signo)
{
- struct target_ops *beneath = find_target_beneath (this);
struct thread_db_info *info;
if (ptid_equal (ptid, minus_one_ptid))
if (info)
info->need_stale_parent_threads_check = 0;
- beneath->resume (ptid, step, signo);
+ beneath ()->resume (ptid, step, signo);
}
/* std::sort helper function for info_auto_load_libthread_db, sort the