Skip to content

Commit 7a56757

Browse files
authored
Merge pull request #647 from JDevlieghere/🍒/20200108/6672a4f5b64f6b5a17cba63b421fcf313003b5b8
🍒/20200108/6672a4f5b64f6b5a17cba63b421fcf313003b5b8
2 parents d00c050 + 6137894 commit 7a56757

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

lldb/include/lldb/lldb-enumerations.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ enum CommandArgumentType {
590590
eArgTypeWatchType,
591591
eArgRawInput,
592592
eArgTypeCommand,
593+
eArgTypeColumnNum,
593594
eArgTypeLastArg // Always keep this entry as the last entry in this
594595
// enumeration!!
595596
};

lldb/source/Commands/CommandObjectBreakpoint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
274274
m_func_name_type_mask |= eFunctionNameTypeBase;
275275
break;
276276

277-
case 'C':
277+
case 'u':
278278
if (option_arg.getAsInteger(0, m_column))
279279
error.SetErrorStringWithFormat("invalid column number: %s",
280280
option_arg.str().c_str());

lldb/source/Commands/Options.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ let Command = "breakpoint set" in {
115115
def breakpoint_set_line : Option<"line", "l">, Group<1>, Arg<"LineNum">,
116116
Required,
117117
Desc<"Specifies the line number on which to set this breakpoint.">;
118+
def breakpoint_set_column : Option<"column", "u">, Group<1>, Arg<"ColumnNum">,
119+
Desc<"Specifies the column number on which to set this breakpoint.">;
118120
def breakpoint_set_address : Option<"address", "a">, Group<2>,
119121
Arg<"AddressOrExpression">, Required,
120122
Desc<"Set the breakpoint at the specified address. If the address maps "

lldb/source/Interpreter/CommandObject.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,8 @@ CommandObject::ArgumentTableEntry CommandObject::g_arguments_data[] = {
11051105
{ eArgTypeWatchpointIDRange, "watchpt-id-list", CommandCompletions::eNoCompletion, { nullptr, false }, "For example, '1-3' or '1 to 3'." },
11061106
{ eArgTypeWatchType, "watch-type", CommandCompletions::eNoCompletion, { nullptr, false }, "Specify the type for a watchpoint." },
11071107
{ eArgRawInput, "raw-input", CommandCompletions::eNoCompletion, { nullptr, false }, "Free-form text passed to a command without prior interpretation, allowing spaces without requiring quotes. To pass arguments and free form text put two dashes ' -- ' between the last argument and any raw input." },
1108-
{ eArgTypeCommand, "command", CommandCompletions::eNoCompletion, { nullptr, false }, "An LLDB Command line command." }
1108+
{ eArgTypeCommand, "command", CommandCompletions::eNoCompletion, { nullptr, false }, "An LLDB Command line command." },
1109+
{ eArgTypeColumnNum, "column", CommandCompletions::eNoCompletion, { nullptr, false }, "Column number in a source file." }
11091110
// clang-format on
11101111
};
11111112

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# UNSUPPORTED: system-windows
2+
#
3+
# RUN: %clang_host -g -O0 %S/Inputs/main.c -o %t.out
4+
# RUN: %lldb -b -o 'help breakpoint set' -o 'breakpoint set -f main.c -l 2 -u 21' %t.out | FileCheck %s
5+
# CHECK: -u <column> ( --column <column> )
6+
# CHECK: Specifies the column number on which to set this breakpoint.
7+
# CHECK: at main.c:2:21

0 commit comments

Comments
 (0)