Skip to content

Commit 6a71938

Browse files
committed
Revert "[lldb][NFC] Force some logging on to TestCortexMExceptionUnwind.py"
This reverts commit 336503c.
1 parent 336503c commit 6a71938

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

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

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +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)
25-
self.runCmd("target list")
26-
self.runCmd("ima li -A -t -b")
42+
target.AddModule(exe, "", exe_uuid)
2743
self.assertTrue(target.IsValid())
2844

2945
core = self.getBuildArtifact("core")
@@ -32,8 +48,12 @@ def test_no_fpu(self):
3248
process = target.LoadCore(core)
3349
self.assertTrue(process.IsValid())
3450

35-
self.runCmd("target list")
36-
self.runCmd("ima li -A -t -b")
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")
3757

3858
thread = process.GetThreadAtIndex(0)
3959
self.assertTrue(thread.IsValid())

0 commit comments

Comments
 (0)