Fix TestCommandScript.py for Arm/Windows
authorMuhammad Omair Javaid <omair.javaid@linaro.org>
Wed, 29 Jun 2022 09:34:36 +0000 (13:34 +0400)
committerMuhammad Omair Javaid <omair.javaid@linaro.org>
Thu, 30 Jun 2022 13:48:28 +0000 (17:48 +0400)
TestCommandScript.py fails on Arm/Windows due following issues:
https://llvm.org/pr56288
https://llvm.org/pr56292

LLDB fails to skip prologue and also step over library function or
nodebug functions fails due to PDB/DWARF mismatch.

This patch replace function breakpoint with line breakpoint so that we
can expect LLDB to stop on desired line. Also replace dwarf with PDB
debug info for this test only.

lldb/test/API/commands/command/script/Makefile
lldb/test/API/commands/command/script/TestCommandScript.py

index 99998b2..c9a35c8 100644 (file)
@@ -1,3 +1,5 @@
 CXX_SOURCES := main.cpp
 
+DEBUG_INFO_FLAG := -g
+
 include Makefile.rules
index 6f36947..756cb4a 100644 (file)
@@ -113,7 +113,7 @@ class CmdPythonTestCase(TestBase):
         self.expect("longwait",
                     substrs=['Done; if you saw the delays I am doing OK'])
 
-        self.runCmd("b main")
+        self.runCmd("break set -f main.cpp -l 48")
         self.runCmd("run")
         self.runCmd("mysto 3")
         self.expect("frame variable array",