forked from OSchip/llvm-project
Remember whether a queue or thread name were passed into "breakpoint modify" so we can recognize an empty argument as unsetting the option.
llvm-svn: 106377
This commit is contained in:
parent
60a234f079
commit
b2a38a7286
|
@ -1095,10 +1095,18 @@ CommandObjectBreakpointModify::CommandOptions::SetOptionValue (int option_idx, c
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'T':
|
case 'T':
|
||||||
|
if (option_arg != NULL)
|
||||||
m_thread_name = option_arg;
|
m_thread_name = option_arg;
|
||||||
|
else
|
||||||
|
m_thread_name.clear();
|
||||||
|
m_name_passed = true;
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
|
if (option_arg != NULL)
|
||||||
m_queue_name = option_arg;
|
m_queue_name = option_arg;
|
||||||
|
else
|
||||||
|
m_queue_name.clear();
|
||||||
|
m_queue_passed = true;
|
||||||
break;
|
break;
|
||||||
case 'x':
|
case 'x':
|
||||||
{
|
{
|
||||||
|
@ -1127,6 +1135,8 @@ CommandObjectBreakpointModify::CommandOptions::ResetOptionValues ()
|
||||||
m_thread_name.clear();
|
m_thread_name.clear();
|
||||||
m_queue_name.clear();
|
m_queue_name.clear();
|
||||||
m_enable_passed = false;
|
m_enable_passed = false;
|
||||||
|
m_queue_passed = false;
|
||||||
|
m_name_passed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
@ -1201,10 +1211,10 @@ CommandObjectBreakpointModify::Execute
|
||||||
if (m_options.m_thread_index != -1)
|
if (m_options.m_thread_index != -1)
|
||||||
location->GetLocationOptions()->GetThreadSpec()->SetIndex(m_options.m_thread_index);
|
location->GetLocationOptions()->GetThreadSpec()->SetIndex(m_options.m_thread_index);
|
||||||
|
|
||||||
if (!m_options.m_thread_name.empty())
|
if (m_options.m_name_passed)
|
||||||
location->GetLocationOptions()->GetThreadSpec()->SetName(m_options.m_thread_name.c_str());
|
location->GetLocationOptions()->GetThreadSpec()->SetName(m_options.m_thread_name.c_str());
|
||||||
|
|
||||||
if (!m_options.m_queue_name.empty())
|
if (m_options.m_queue_passed)
|
||||||
location->GetLocationOptions()->GetThreadSpec()->SetQueueName(m_options.m_queue_name.c_str());
|
location->GetLocationOptions()->GetThreadSpec()->SetQueueName(m_options.m_queue_name.c_str());
|
||||||
|
|
||||||
if (m_options.m_ignore_count != -1)
|
if (m_options.m_ignore_count != -1)
|
||||||
|
@ -1222,10 +1232,10 @@ CommandObjectBreakpointModify::Execute
|
||||||
if (m_options.m_thread_index != -1)
|
if (m_options.m_thread_index != -1)
|
||||||
bp->GetOptions()->GetThreadSpec()->SetIndex(m_options.m_thread_index);
|
bp->GetOptions()->GetThreadSpec()->SetIndex(m_options.m_thread_index);
|
||||||
|
|
||||||
if (!m_options.m_thread_name.empty())
|
if (m_options.m_name_passed)
|
||||||
bp->GetOptions()->GetThreadSpec()->SetName(m_options.m_thread_name.c_str());
|
bp->GetOptions()->GetThreadSpec()->SetName(m_options.m_thread_name.c_str());
|
||||||
|
|
||||||
if (!m_options.m_queue_name.empty())
|
if (m_options.m_queue_passed)
|
||||||
bp->GetOptions()->GetThreadSpec()->SetQueueName(m_options.m_queue_name.c_str());
|
bp->GetOptions()->GetThreadSpec()->SetQueueName(m_options.m_queue_name.c_str());
|
||||||
|
|
||||||
if (m_options.m_ignore_count != -1)
|
if (m_options.m_ignore_count != -1)
|
||||||
|
|
|
@ -172,6 +172,8 @@ public:
|
||||||
std::string m_queue_name;
|
std::string m_queue_name;
|
||||||
bool m_enable_passed;
|
bool m_enable_passed;
|
||||||
bool m_enable_value;
|
bool m_enable_value;
|
||||||
|
bool m_name_passed;
|
||||||
|
bool m_queue_passed;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue