Skip to content

Commit 2d0b2fb

Browse files
authored
Revert "[lldb][Windows] Remember server's primary stop thread on gdb-remote stops" (#205220)
Reverts llvm/llvm-project#203525 because it breaks TestRealDefinition.py
1 parent a7263be commit 2d0b2fb

2 files changed

Lines changed: 1 addition & 13 deletions

File tree

lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2636,8 +2636,6 @@ StateType ProcessGDBRemote::SetThreadStopInfo(StringExtractor &stop_packet) {
26362636

26372637
SetAddressableBitMasks(addressable_bits);
26382638

2639-
m_last_stop_primary_tid = tid;
2640-
26412639
ThreadSP thread_sp = SetThreadStopInfo(
26422640
tid, expedited_register_map, signo, thread_name, reason, description,
26432641
exc_type, exc_data, thread_dispatch_qaddr, queue_vars_valid,
@@ -2686,14 +2684,7 @@ void ProcessGDBRemote::RefreshStateAfterStop() {
26862684
if (m_initial_tid != LLDB_INVALID_THREAD_ID) {
26872685
m_thread_list.SetSelectedThreadByID(m_initial_tid);
26882686
m_initial_tid = LLDB_INVALID_THREAD_ID;
2689-
} else if (m_last_stop_primary_tid != LLDB_INVALID_THREAD_ID &&
2690-
StateIsRunningState(m_last_broadcast_state)) {
2691-
if (ThreadSP primary_thread_sp =
2692-
m_thread_list.FindThreadByProtocolID(m_last_stop_primary_tid,
2693-
/*can_update=*/false))
2694-
m_thread_list.SetSelectedThreadByID(primary_thread_sp->GetID());
2695-
}
2696-
m_last_stop_primary_tid = LLDB_INVALID_THREAD_ID;
2687+
}
26972688

26982689
// Let all threads recover from stopping and do any clean up based on the
26992690
// previous thread state (if any).

lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,6 @@ class ProcessGDBRemote : public Process,
322322
lldb::CommandObjectSP m_command_sp;
323323
int64_t m_breakpoint_pc_offset;
324324
lldb::tid_t m_initial_tid; // The initial thread ID, given by stub on attach
325-
lldb::tid_t m_last_stop_primary_tid =
326-
LLDB_INVALID_THREAD_ID; // Thread ID extracted from the most recent
327-
// T-packet's "thread:<tid>" key.
328325
bool m_use_g_packet_for_reading;
329326

330327
bool m_allow_flash_writes;

0 commit comments

Comments
 (0)