Skip to content

Commit 21857ae

Browse files
committed
Revert "[lldb][NFC] Try to adapt Cortex-M API test for an Unbuntu bot"
This reverts commit 4eadb45.
1 parent 0dbea52 commit 21857ae

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

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

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,34 @@
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
1533
def test_no_fpu(self):
1634
"""Test that we can backtrace correctly through an ARM Cortex-M Exception return stack"""
1735

36+
target = self.dbg.CreateTarget("")
1837
exe = "binary.json"
1938
with open(exe) as f:
2039
exe_json = json.load(f)
2140
exe_uuid = exe_json["uuid"]
22-
triple = exe_json["triple"]
2341

24-
target = self.dbg.CreateTargetWithFileAndTargetTriple(exe, triple)
42+
target.AddModule(exe, "", exe_uuid)
2543
self.assertTrue(target.IsValid())
2644

2745
core = self.getBuildArtifact("core")

0 commit comments

Comments
 (0)