summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectBreakpoint.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2015-03-16 22:47:38 +0000
committerJim Ingham <jingham@apple.com>2015-03-16 22:47:38 +0000
commit6312991cdb8b1e9cfe393f4fda4f661a649b0af6 (patch)
tree72a103462540fcee9b13947a6a186963f4bb7e97 /lldb/source/Commands/CommandObjectBreakpoint.cpp
parent588ec02f19ab726141b8202a443a75e668a802da (diff)
downloadbcm5719-llvm-6312991cdb8b1e9cfe393f4fda4f661a649b0af6.tar.gz
bcm5719-llvm-6312991cdb8b1e9cfe393f4fda4f661a649b0af6.zip
Report an error for line number values that don't convert to integers during argument
parsing so that we can give a more accurate error message. <rdar://problem/20145563> llvm-svn: 232433
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpoint.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectBreakpoint.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index df27fe7129e..0741cd17fec 100644
--- a/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -148,9 +148,13 @@ public:
break;
case 'C':
- m_column = StringConvert::ToUInt32 (option_arg, 0);
+ {
+ bool success;
+ m_column = StringConvert::ToUInt32 (option_arg, 0, 0, &success);
+ if (!success)
+ error.SetErrorStringWithFormat("invalid column number: %s", option_arg);
break;
-
+ }
case 'c':
m_condition.assign(option_arg);
break;
@@ -238,9 +242,13 @@ public:
break;
case 'l':
- m_line_num = StringConvert::ToUInt32 (option_arg, 0);
+ {
+ bool success;
+ m_line_num = StringConvert::ToUInt32 (option_arg, 0, 0, &success);
+ if (!success)
+ error.SetErrorStringWithFormat ("invalid line number: %s.", option_arg);
break;
-
+ }
case 'M':
m_func_names.push_back (option_arg);
m_func_name_type_mask |= eFunctionNameTypeMethod;
OpenPOWER on IntegriCloud