diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-03-27 12:53:55 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-04-04 21:05:31 -0400 |
commit | 9213a6d79a64446de3c176773f123d1f8b9311b4 (patch) | |
tree | 6d7374a516e68130713eccfaf3ba60611809c104 /gdb/infrun.c | |
parent | 3c8af02fa0b140edcde2a65d016f565aad1a699b (diff) | |
download | gdb-9213a6d79a64446de3c176773f123d1f8b9311b4.zip gdb-9213a6d79a64446de3c176773f123d1f8b9311b4.tar.gz gdb-9213a6d79a64446de3c176773f123d1f8b9311b4.tar.bz2 |
gdb: make find_thread_ptid a process_stratum_target method
Make find_thread_ptid (the overload that takes a process_stratum_target)
a method of process_stratum_target.
Change-Id: Ib190a925a83c6b93e9c585dc7c6ab65efbdd8629
Reviewed-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 461855b..ba56fe3 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -876,7 +876,7 @@ follow_fork () /* If we followed the child, switch to it... */ if (follow_child) { - tp = find_thread_ptid (parent_targ, child); + tp = parent_targ->find_thread (child); switch_to_thread (tp); /* ... and preserve the stepping state, in case the @@ -5116,7 +5116,7 @@ handle_one (const wait_one_event &event) } else { - t = find_thread_ptid (event.target, event.ptid); + t = event.target->find_thread (event.ptid); /* Check if this is the first time we see this thread. Don't bother adding if it individually exited. */ if (t == nullptr @@ -5137,7 +5137,7 @@ handle_one (const wait_one_event &event) } else { - thread_info *t = find_thread_ptid (event.target, event.ptid); + thread_info *t = event.target->find_thread (event.ptid); if (t == nullptr) t = add_thread (event.target, event.ptid); @@ -5538,7 +5538,7 @@ handle_inferior_event (struct execution_control_state *ecs) if (ecs->ws.kind () != TARGET_WAITKIND_EXITED && ecs->ws.kind () != TARGET_WAITKIND_SIGNALLED) { - ecs->event_thread = find_thread_ptid (ecs->target, ecs->ptid); + ecs->event_thread = ecs->target->find_thread (ecs->ptid); /* If it's a new thread, add it to the thread database. */ if (ecs->event_thread == nullptr) ecs->event_thread = add_thread (ecs->target, ecs->ptid); @@ -5687,7 +5687,7 @@ handle_inferior_event (struct execution_control_state *ecs) need to have access to the just-exited thread. That is the case of GNU/Linux's "checkpoint" support, for example. Call the switch_to_xxx routine as appropriate. */ - thread_info *thr = find_thread_ptid (ecs->target, ecs->ptid); + thread_info *thr = ecs->target->find_thread (ecs->ptid); if (thr != nullptr) switch_to_thread (thr); else @@ -5874,7 +5874,7 @@ handle_inferior_event (struct execution_control_state *ecs) /* Note that one of these may be an invalid pointer, depending on detach_fork. */ thread_info *parent = ecs->event_thread; - thread_info *child = find_thread_ptid (targ, ecs->ws.child_ptid ()); + thread_info *child = targ->find_thread (ecs->ws.child_ptid ()); /* At this point, the parent is marked running, and the child is marked stopped. */ |