Skip to content

Commit 336503c

Browse files
committed
[lldb][NFC] Force some logging on to TestCortexMExceptionUnwind.py
to possibly debug why this test fails on the lldb-remote-linux-ubuntu CI bot. I'm sure the Target ArchSpec is somehow ending up _not_ armv7m-apple-* like it should be, but I'd like to gather a little more info before I just give up on running this test on linux systems.
1 parent 1278ac7 commit 336503c

File tree

1 file changed

+6
-26
lines changed

1 file changed

+6
-26
lines changed

lldb/test/API/functionalities/unwind/cortex-m-exception/TestCortexMExceptionUnwind.py

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,18 @@
1212
class TestCortexMExceptionUnwind(TestBase):
1313
NO_DEBUG_INFO_TESTCASE = True
1414

15-
# on the lldb-remote-linux-ubuntu CI, the binary.json's triple of
16-
# armv7m-apple is not being set in the Target triple, and we're
17-
# picking the wrong ABI plugin, ABISysV_arm.
18-
# ABISysV_arm::CreateDefaultUnwindPlan() doesn't have a way to detect
19-
# arm/thumb for a stack frame, or even the Target's triple for a
20-
# Cortex-M part that is always thumb. It hardcodes r11 as the frame
21-
# pointer register, which is correct for arm code but not thumb.
22-
# It is never correct # on a Cortex-M target.
23-
# The Darwin ABIMacOSX_arm diverges from AAPCS and always uses r7 for
24-
# the frame pointer -- the thumb convention -- whether executing arm or
25-
# thumb. So its CreateDefaultUnwindPlan picks the correct register for
26-
# the frame pointer, and we can walk the stack.
27-
# ABISysV_arm::CreateDefaultUnwindPlan will only get one frame and
28-
# not be able to continue.
29-
#
30-
# This may only be occuring on a 32-bit Ubuntu bot; need to test
31-
# 64-bit Ubuntu and confirm.
32-
@skipUnlessDarwin
3315
def test_no_fpu(self):
3416
"""Test that we can backtrace correctly through an ARM Cortex-M Exception return stack"""
3517

36-
target = self.dbg.CreateTarget("")
3718
exe = "binary.json"
3819
with open(exe) as f:
3920
exe_json = json.load(f)
4021
exe_uuid = exe_json["uuid"]
22+
triple = exe_json["triple"]
4123

42-
target.AddModule(exe, "", exe_uuid)
24+
target = self.dbg.CreateTargetWithFileAndTargetTriple(exe, triple)
25+
self.runCmd("target list")
26+
self.runCmd("ima li -A -t -b")
4327
self.assertTrue(target.IsValid())
4428

4529
core = self.getBuildArtifact("core")
@@ -48,12 +32,8 @@ def test_no_fpu(self):
4832
process = target.LoadCore(core)
4933
self.assertTrue(process.IsValid())
5034

51-
if self.TraceOn():
52-
self.runCmd("target list")
53-
self.runCmd("image list")
54-
self.runCmd("target modules dump sections")
55-
self.runCmd("target modules dump symtab")
56-
self.runCmd("bt")
35+
self.runCmd("target list")
36+
self.runCmd("ima li -A -t -b")
5737

5838
thread = process.GetThreadAtIndex(0)
5939
self.assertTrue(thread.IsValid())

0 commit comments

Comments
 (0)