gdb: use inferior::threads instead of all_threads and a PID filter
I noticed a few places where we iterated over `all_threads ()` but
then immediately filtered by PID. It would be better to instead
iterate over `inferior::threads ()` and remove the PID filtering.
These should be equivalent as a single inferior should contain every
thread with a given PID, and should only contain threads with that
given PID.
While editing the `for (...)` loops I have replaced 'auto' with
'thread_info' for additional type clarity.
There should be no user visible changes after this commit.
Approved-By: Tom de Vries <tdevries@suse.de>
1 file changed