[Lldb-commits] [lldb] r120851 - in /lldb/trunk: lldb.xcodeproj/project.pbxproj source/Commands/CommandObjectBreakpoint.cpp source/Commands/CommandObjectBreakpoint.h
Jim Ingham
jingham at apple.com
Fri Dec 3 15:04:19 PST 2010
Author: jingham
Date: Fri Dec 3 17:04:19 2010
New Revision: 120851
URL: http://llvm.org/viewvc/llvm-project?rev=120851&view=rev
Log:
Documentation fix - explain how to unset conditions. Also fix unsetting -x and -t so they work.
Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
lldb/trunk/source/Commands/CommandObjectBreakpoint.h
Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=120851&r1=120850&r2=120851&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Dec 3 17:04:19 2010
@@ -2459,7 +2459,6 @@
isa = PBXProject;
buildConfigurationList = 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "lldb" */;
compatibilityVersion = "Xcode 3.1";
- developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
en,
Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=120851&r1=120850&r2=120851&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Fri Dec 3 17:04:19 2010
@@ -1358,7 +1358,9 @@
Options (),
m_ignore_count (0),
m_thread_id(LLDB_INVALID_THREAD_ID),
+ m_thread_id_passed(false),
m_thread_index (UINT32_MAX),
+ m_thread_index_passed(false),
m_thread_name(),
m_queue_name(),
m_condition (),
@@ -1426,9 +1428,19 @@
break;
case 't' :
{
- m_thread_id = Args::StringToUInt64(optarg, LLDB_INVALID_THREAD_ID, 0);
- if (m_thread_id == LLDB_INVALID_THREAD_ID)
- error.SetErrorStringWithFormat ("Invalid thread id string '%s'.\n", optarg);
+ if (optarg[0] == '\0')
+ {
+ m_thread_id = LLDB_INVALID_THREAD_ID;
+ m_thread_id_passed = true;
+ }
+ else
+ {
+ m_thread_id = Args::StringToUInt64(optarg, LLDB_INVALID_THREAD_ID, 0);
+ if (m_thread_id == LLDB_INVALID_THREAD_ID)
+ error.SetErrorStringWithFormat ("Invalid thread id string '%s'.\n", optarg);
+ else
+ m_thread_id_passed = true;
+ }
}
break;
case 'T':
@@ -1447,10 +1459,19 @@
break;
case 'x':
{
- m_thread_index = Args::StringToUInt32 (optarg, UINT32_MAX, 0);
- if (m_thread_id == UINT32_MAX)
- error.SetErrorStringWithFormat ("Invalid thread index string '%s'.\n", optarg);
-
+ if (optarg[0] == '\n')
+ {
+ m_thread_index = UINT32_MAX;
+ m_thread_index_passed = true;
+ }
+ else
+ {
+ m_thread_index = Args::StringToUInt32 (optarg, UINT32_MAX, 0);
+ if (m_thread_id == UINT32_MAX)
+ error.SetErrorStringWithFormat ("Invalid thread index string '%s'.\n", optarg);
+ else
+ m_thread_index_passed = true;
+ }
}
break;
default:
@@ -1468,7 +1489,9 @@
m_ignore_count = 0;
m_thread_id = LLDB_INVALID_THREAD_ID;
+ m_thread_id_passed = false;
m_thread_index = UINT32_MAX;
+ m_thread_index_passed = false;
m_thread_name.clear();
m_queue_name.clear();
m_condition.clear();
@@ -1487,7 +1510,8 @@
CommandObject (interpreter,
"breakpoint modify",
"Modify the options on a breakpoint or set of breakpoints in the executable. "
- "If no breakpoint is specified, acts on the last created breakpoint.",
+ "If no breakpoint is specified, acts on the last created breakpoint. "
+ "With the exception of -e, -d and -i, passing an empty argument clears the modification.",
NULL)
{
CommandArgumentEntry arg;
@@ -1558,10 +1582,10 @@
BreakpointLocation *location = bp->FindLocationByID (cur_bp_id.GetLocationID()).get();
if (location)
{
- if (m_options.m_thread_id != LLDB_INVALID_THREAD_ID)
+ if (m_options.m_thread_id_passed)
location->SetThreadID (m_options.m_thread_id);
- if (m_options.m_thread_index != UINT32_MAX)
+ if (m_options.m_thread_index_passed)
location->GetLocationOptions()->GetThreadSpec()->SetIndex(m_options.m_thread_index);
if (m_options.m_name_passed)
@@ -1582,10 +1606,10 @@
}
else
{
- if (m_options.m_thread_id != LLDB_INVALID_THREAD_ID)
+ if (m_options.m_thread_id_passed)
bp->SetThreadID (m_options.m_thread_id);
- if (m_options.m_thread_index != UINT32_MAX)
+ if (m_options.m_thread_index_passed)
bp->GetOptions()->GetThreadSpec()->SetIndex(m_options.m_thread_index);
if (m_options.m_name_passed)
Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.h?rev=120851&r1=120850&r2=120851&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.h (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.h Fri Dec 3 17:04:19 2010
@@ -164,7 +164,9 @@
uint32_t m_ignore_count;
lldb::tid_t m_thread_id;
+ bool m_thread_id_passed;
uint32_t m_thread_index;
+ bool m_thread_index_passed;
std::string m_thread_name;
std::string m_queue_name;
std::string m_condition;
More information about the lldb-commits
mailing list