mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
gdb/infrun: use switch_to_target_no_thread to switch the target
Use the available `switch_to_target_no_thread` function to switch the target. This is a refactoring. gdb/ChangeLog: 2020-09-07 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * infrun.c (fetch_inferior_event): Use `switch_to_target_no_thread` to switch the target.
This commit is contained in:
@@ -3903,13 +3903,8 @@ fetch_inferior_event ()
|
||||
gdb_assert (ecs->ws.kind != TARGET_WAITKIND_IGNORE);
|
||||
|
||||
/* Switch to the target that generated the event, so we can do
|
||||
target calls. Any inferior bound to the target will do, so we
|
||||
just switch to the first we find. */
|
||||
for (inferior *inf : all_inferiors (ecs->target))
|
||||
{
|
||||
switch_to_inferior_no_thread (inf);
|
||||
break;
|
||||
}
|
||||
target calls. */
|
||||
switch_to_target_no_thread (ecs->target);
|
||||
|
||||
if (debug_infrun)
|
||||
print_target_wait_results (minus_one_ptid, ecs->ptid, &ecs->ws);
|
||||
|
||||
Reference in New Issue
Block a user