diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -180,7 +180,7 @@ ExecutionContext *execution_context) override { Status error; const int short_option = - g_breakpoint_modify_options[option_idx].short_option; + g_breakpoint_dummy_options[option_idx].short_option; switch (short_option) { case 'D': diff --git a/lldb/test/Shell/Breakpoint/Inputs/dummy-target.c b/lldb/test/Shell/Breakpoint/Inputs/dummy-target.c new file mode 100644 --- /dev/null +++ b/lldb/test/Shell/Breakpoint/Inputs/dummy-target.c @@ -0,0 +1 @@ +int main() { return 0; } diff --git a/lldb/test/Shell/Breakpoint/dummy-target.test b/lldb/test/Shell/Breakpoint/dummy-target.test new file mode 100644 --- /dev/null +++ b/lldb/test/Shell/Breakpoint/dummy-target.test @@ -0,0 +1,23 @@ +# RUN: mkdir -p %t +# RUN: cd %t +# RUN: %build %p/Inputs/dummy-target.c -o dummy.out +# RUN: %lldb -b -s %s dummy.out | FileCheck %s + +breakpoint set -D -n main +# CHECK: Breakpoint {{[0-9]}}: no locations (pending). +# CHECK: Breakpoint set in dummy target + +breakpoint list +# CHECK: No breakpoints currently set + +breakpoint list -D +# CHECK: name = 'main', locations = 0 (pending) + +target delete +# CHECK: 1 targets deleted + +target create dummy.out +# CHECK: Current executable set to {{.*}}dummy.out + +breakpoint list +# CHECK: name = 'main', locations = {{[1-9]}}