|
12 | 12 | class TestCortexMExceptionUnwind(TestBase): |
13 | 13 | NO_DEBUG_INFO_TESTCASE = True |
14 | 14 |
|
| 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 |
15 | 33 | def test_no_fpu(self): |
16 | 34 | """Test that we can backtrace correctly through an ARM Cortex-M Exception return stack""" |
17 | 35 |
|
| 36 | + target = self.dbg.CreateTarget("") |
18 | 37 | exe = "binary.json" |
19 | 38 | with open(exe) as f: |
20 | 39 | exe_json = json.load(f) |
21 | 40 | exe_uuid = exe_json["uuid"] |
22 | | - triple = exe_json["triple"] |
23 | 41 |
|
24 | | - target = self.dbg.CreateTargetWithFileAndTargetTriple(exe, triple) |
| 42 | + target.AddModule(exe, "", exe_uuid) |
25 | 43 | self.assertTrue(target.IsValid()) |
26 | 44 |
|
27 | 45 | core = self.getBuildArtifact("core") |
|
0 commit comments