diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index 5d0cc3d9dceae2bdd95e2a69bd8f80614cd5c9a7..380f753ea33965db17fd5d4991977c995952fcd9 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -180,7 +180,7 @@ public: 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 index 0000000000000000000000000000000000000000..76e8197013aabca95639bb3d9e5de847b0c0a5fd --- /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 index 0000000000000000000000000000000000000000..873a4d3adc00ceeb9f04fffe66e25fecdebbf323 --- /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]}}