summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Commands/CommandObjectBreakpoint.cpp2
-rw-r--r--lldb/test/Shell/Breakpoint/Inputs/dummy-target.c1
-rw-r--r--lldb/test/Shell/Breakpoint/dummy-target.test23
3 files changed, 25 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index 5d0cc3d9dce..380f753ea33 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 00000000000..76e8197013a
--- /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 00000000000..873a4d3adc0
--- /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]}}
OpenPOWER on IntegriCloud