aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-tasks.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2023-03-27 12:53:54 -0400
committerSimon Marchi <simon.marchi@efficios.com>2023-04-04 21:05:30 -0400
commit3c8af02fa0b140edcde2a65d016f565aad1a699b (patch)
tree7d738cf49a90ef27a9b700b5e914f6d91b765e73 /gdb/ada-tasks.c
parent91385d13a8820bf3e6274ec51d4da613bae67554 (diff)
downloadgdb-3c8af02fa0b140edcde2a65d016f565aad1a699b.zip
gdb-3c8af02fa0b140edcde2a65d016f565aad1a699b.tar.gz
gdb-3c8af02fa0b140edcde2a65d016f565aad1a699b.tar.bz2
gdb: make find_thread_ptid an inferior method
Make find_thread_ptid (the overload that takes an inferior) a method of struct inferior. Change-Id: Ie5b9fa623ff35aa7ddb45e2805254fc8e83c9cd4 Reviewed-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/ada-tasks.c')
-rw-r--r--gdb/ada-tasks.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
index b14d159..f107d4e 100644
--- a/gdb/ada-tasks.c
+++ b/gdb/ada-tasks.c
@@ -1177,7 +1177,7 @@ print_ada_task_info (struct ui_out *uiout,
if (uiout->is_mi_like_p ())
{
thread_info *thread = (ada_task_is_alive (task_info)
- ? find_thread_ptid (inf, task_info->ptid)
+ ? inf->find_thread (task_info->ptid)
: nullptr);
if (thread != NULL)
@@ -1393,7 +1393,7 @@ task_command_1 (const char *taskno_str, int from_tty, struct inferior *inf)
computed if target_get_ada_task_ptid has not been implemented for
our target (yet). Rather than cause an assertion error in that case,
it's nicer for the user to just refuse to perform the task switch. */
- thread_info *tp = find_thread_ptid (inf, task_info->ptid);
+ thread_info *tp = inf->find_thread (task_info->ptid);
if (tp == NULL)
error (_("Unable to compute thread ID for task %s.\n"
"Cannot switch to this task."),
@@ -1577,7 +1577,7 @@ task_apply_all_command (const char *cmd, int from_tty)
if (!ada_task_is_alive (&task))
continue;
- thread_info *tp = find_thread_ptid (inf, task.ptid);
+ thread_info *tp = inf->find_thread (task.ptid);
if (tp == nullptr)
warning (_("Unable to compute thread ID for task %s.\n"
"Cannot switch to this task."),
@@ -1627,7 +1627,7 @@ task_apply_command (const char *tidlist, int from_tty)
if (!ada_task_is_alive (&task))
continue;
- thread_info *tp = find_thread_ptid (inf, task.ptid);
+ thread_info *tp = inf->find_thread (task.ptid);
if (tp == nullptr)
warning (_("Unable to compute thread ID for task %s.\n"
"Cannot switch to this task."),