[lldb] Avoid per-thread searches when setting stop info (#236818)
At a stop, `ProcessGDBRemote::SetThreadStopInfo` runs for every thread.
Each call searched the thread list for the thread, and `m_thread_ids`
for the position of the thread's PC in the stop reply's thread-pcs, so a
stop took time quadratic in the number of threads.
Callers that have the thread now pass it in, and `WillPublicStop` finds
the threads in a map. `m_thread_ids` is assigned in several places, so
rather than rely on each of them to clear the map, it checks the
position it finds against `m_thread_ids` and rebuilds the map when the
position is missing or different.
GitOrigin-RevId: b77604e40a41976f60fff9ac2025330bfd230157
6 files changed