diff options
author | Jim Ingham <jingham@apple.com> | 2010-06-19 04:35:20 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2010-06-19 04:35:20 +0000 |
commit | b2a38a7286d20a4c6cf20820a0cfe9a1d30df93e (patch) | |
tree | e1b7ad7bc2ebf8664980ab1210d0bbf7d3df5802 /lldb/source | |
parent | 60a234f07954e6a0794db4db9d988054fbc88158 (diff) | |
download | bcm5719-llvm-b2a38a7286d20a4c6cf20820a0cfe9a1d30df93e.tar.gz bcm5719-llvm-b2a38a7286d20a4c6cf20820a0cfe9a1d30df93e.zip |
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
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Commands/CommandObjectBreakpoint.cpp | 22 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectBreakpoint.h | 2 |
2 files changed, 18 insertions, 6 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index bbefb2c5a7f..044ff40c74b 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -1095,10 +1095,18 @@ CommandObjectBreakpointModify::CommandOptions::SetOptionValue (int option_idx, c } break; case 'T': - m_thread_name = option_arg; + if (option_arg != NULL) + m_thread_name = option_arg; + else + m_thread_name.clear(); + m_name_passed = true; break; case 'q': - m_queue_name = option_arg; + if (option_arg != NULL) + m_queue_name = option_arg; + else + m_queue_name.clear(); + m_queue_passed = true; break; case 'x': { @@ -1127,6 +1135,8 @@ CommandObjectBreakpointModify::CommandOptions::ResetOptionValues () m_thread_name.clear(); m_queue_name.clear(); 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) 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()); - if (!m_options.m_queue_name.empty()) + if (m_options.m_queue_passed) location->GetLocationOptions()->GetThreadSpec()->SetQueueName(m_options.m_queue_name.c_str()); if (m_options.m_ignore_count != -1) @@ -1222,10 +1232,10 @@ CommandObjectBreakpointModify::Execute if (m_options.m_thread_index != -1) 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()); - if (!m_options.m_queue_name.empty()) + if (m_options.m_queue_passed) bp->GetOptions()->GetThreadSpec()->SetQueueName(m_options.m_queue_name.c_str()); if (m_options.m_ignore_count != -1) diff --git a/lldb/source/Commands/CommandObjectBreakpoint.h b/lldb/source/Commands/CommandObjectBreakpoint.h index 5374146ff47..053e036c0c8 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.h +++ b/lldb/source/Commands/CommandObjectBreakpoint.h @@ -172,6 +172,8 @@ public: std::string m_queue_name; bool m_enable_passed; bool m_enable_value; + bool m_name_passed; + bool m_queue_passed; }; |