gdb: introduce 'all_non_exited_process_targets' and 'switch_to_target_no_thread'
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Thu, 14 May 2020 11:59:54 +0000 (13:59 +0200)
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Thu, 14 May 2020 11:59:54 +0000 (13:59 +0200)
commitd890404b63b8a0b6c28212388f21421d029f6ad2
treec9190f12e69c9911b1225f279e918288f2fb352f
parent293b3ebcba93960b4e39b27eeddaa4a01f024d0c
gdb: introduce 'all_non_exited_process_targets' and 'switch_to_target_no_thread'

Introduce two new convenience functions:

1. all_non_exited_process_targets: returns a collection of all process
stratum targets that have non-exited inferiors on them.  Useful for
iterating targets.

2. switch_to_target_no_thread: switch the context to the first
inferior of the given target, and to no selected thread.

gdb/ChangeLog:
2020-05-14  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

* process-stratum-target.h: Include <set>.
(all_non_exited_process_targets, switch_to_target_no_thread): New
function declarations.
* process-stratum-target.c (all_non_exited_process_targets)
(switch_to_target_no_thread): New function implementations.
gdb/ChangeLog
gdb/process-stratum-target.c
gdb/process-stratum-target.h