summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDawn Perchik <dawn@burble.org>2015-06-17 22:56:03 +0000
committerDawn Perchik <dawn@burble.org>2015-06-17 22:56:03 +0000
commit546cfe8f93e67e95017b15f43f2906bc99a9b7be (patch)
tree435a2693d7fdf27f014bc39ba804d85a441491e9
parent60e85f8c9e226435545a65dc858076bb78506492 (diff)
downloadbcm5719-llvm-546cfe8f93e67e95017b15f43f2906bc99a9b7be.tar.gz
bcm5719-llvm-546cfe8f93e67e95017b15f43f2906bc99a9b7be.zip
Add negative test for target.move-to-nearest-code=off using source location
Test Plan: ./dotest.py --executable lldb -f MiBreakTestCase.test_lldbmi_break_insert_settings Reviewed By: clayborg, abidh Differential Revision: http://reviews.llvm.org/D10486 llvm-svn: 239968
-rw-r--r--lldb/test/tools/lldb-mi/breakpoint/TestMiBreak.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/lldb/test/tools/lldb-mi/breakpoint/TestMiBreak.py b/lldb/test/tools/lldb-mi/breakpoint/TestMiBreak.py
index 41065aa56fe..498c499b177 100644
--- a/lldb/test/tools/lldb-mi/breakpoint/TestMiBreak.py
+++ b/lldb/test/tools/lldb-mi/breakpoint/TestMiBreak.py
@@ -178,28 +178,36 @@ class MiBreakTestCase(lldbmi_testcase.MiTestCaseBase):
self.runCmd("-break-insert -f main.cpp:%d" % line)
self.expect("\^done,bkpt={number=\"1\"")
+ # Test that non-pending BP will not be set on non-existing line if target.move-to-nearest-code=off
+ self.runCmd("-break-insert main.cpp:%d" % line)
+ self.expect("\^error,msg=\"Command 'break-insert'. Breakpoint location 'main.cpp:%d' not found\"" % line)
+
# Set target.move-to-nearest-code=on and target.skip-prologue=on and set BP #2
self.runCmd("-interpreter-exec console \"settings set target.move-to-nearest-code on\"")
self.runCmd("-interpreter-exec console \"settings set target.skip-prologue on\"")
self.expect("\^done")
+ # FIXME BP was increased by 1 after setting non-pending BP on unknown location (number should be 2)
self.runCmd("-break-insert main.cpp:%d" % line)
- self.expect("\^done,bkpt={number=\"2\"")
+ self.expect("\^done,bkpt={number=\"3\"")
# Set target.skip-prologue=off and set BP #3
self.runCmd("-interpreter-exec console \"settings set target.skip-prologue off\"")
self.expect("\^done")
+ # FIXME BP was increased by 1 after setting non-pending BP on unknown location (number should be 3)
self.runCmd("-break-insert main.cpp:%d" % line)
- self.expect("\^done,bkpt={number=\"3\"")
+ self.expect("\^done,bkpt={number=\"4\"")
# Test that BP #3 is located before BP #2
self.runCmd("-exec-run")
self.expect("\^running")
- self.expect("\*stopped,reason=\"breakpoint-hit\",disp=\"del\",bkptno=\"3\"")
+ # FIXME BP was increased by 1 after setting non-pending BP on unknown location (bkptno should be 3)
+ self.expect("\*stopped,reason=\"breakpoint-hit\",disp=\"del\",bkptno=\"4\"")
# Test that BP #2 is hit
self.runCmd("-exec-continue")
self.expect("\^running")
- self.expect("\*stopped,reason=\"breakpoint-hit\",disp=\"del\",bkptno=\"2\"")
+ # FIXME BP was increased by 1 after setting non-pending BP on unknown location (bkptno should be 2)
+ self.expect("\*stopped,reason=\"breakpoint-hit\",disp=\"del\",bkptno=\"3\"")
# Test that BP #1 wasn't set
self.runCmd("-exec-continue")
OpenPOWER on IntegriCloud