<rdar://problem/11562050>

"thread continue" uses zero based thread indexes, not the thread index ID.

Also fixed "thread until" if it uses the -t option.

llvm-svn: 157724
This commit is contained in:
Greg Clayton 2012-05-31 00:29:20 +00:00
parent ee48633937
commit 76927ee56d
1 changed files with 3 additions and 3 deletions

View File

@ -678,7 +678,7 @@ public:
result.AppendMessage ("Resuming thread "); result.AppendMessage ("Resuming thread ");
for (idx=0; idx<num_threads; ++idx) for (idx=0; idx<num_threads; ++idx)
{ {
Thread *thread = process->GetThreadList().GetThreadAtIndex(idx).get(); Thread *thread = process->GetThreadList().FindThreadByIndexID(idx).get();
if (find(resume_thread_indexes.begin(), resume_thread_indexes.end(), idx) != resume_thread_indexes.end()) if (find(resume_thread_indexes.begin(), resume_thread_indexes.end(), idx) != resume_thread_indexes.end())
{ {
result.AppendMessageWithFormat ("%u ", idx); result.AppendMessageWithFormat ("%u ", idx);
@ -704,7 +704,7 @@ public:
// Set the actions that the threads should each take when resuming // Set the actions that the threads should each take when resuming
for (idx=0; idx<num_threads; ++idx) for (idx=0; idx<num_threads; ++idx)
{ {
Thread *thread = process->GetThreadList().GetThreadAtIndex(idx).get(); Thread *thread = process->GetThreadList().FindThreadByIndexID(idx).get();
if (thread == current_thread) if (thread == current_thread)
{ {
result.AppendMessageWithFormat ("Resuming thread 0x%4.4llx in process %llu\n", thread->GetID(), process->GetID()); result.AppendMessageWithFormat ("Resuming thread 0x%4.4llx in process %llu\n", thread->GetID(), process->GetID());
@ -937,7 +937,7 @@ public:
} }
else else
{ {
thread = process->GetThreadList().GetThreadAtIndex(m_options.m_thread_idx).get(); thread = process->GetThreadList().FindThreadByIndexID(m_options.m_thread_idx).get();
} }
if (thread == NULL) if (thread == NULL)