diff options
| author | Jim Ingham <jingham@apple.com> | 2022-03-14 14:37:38 -0700 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2022-03-14 15:25:40 -0700 |
| commit | 33f9fc77d1ffe7d6c86b6c7a692ff9f2b99cf82e (patch) | |
| tree | 140a9f1599024733fc1fbd339a566845242231d1 /lldb/test/API/python_api | |
| parent | 36fe3f13a997cc45cbffe8a4631db4b1dade6eb8 (diff) | |
| download | llvm-33f9fc77d1ffe7d6c86b6c7a692ff9f2b99cf82e.zip llvm-33f9fc77d1ffe7d6c86b6c7a692ff9f2b99cf82e.tar.gz llvm-33f9fc77d1ffe7d6c86b6c7a692ff9f2b99cf82e.tar.bz2 | |
Don't report memory return values on MacOS_arm64 of SysV_arm64 ABI's.
They don't require that the memory return address be restored prior to
function exit, so there's no guarantee the value is correct. It's better
to return nothing that something that's not accurate.
Differential Revision: https://reviews.llvm.org/D121348
Diffstat (limited to 'lldb/test/API/python_api')
| -rw-r--r-- | lldb/test/API/python_api/target/TestTargetAPI.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lldb/test/API/python_api/target/TestTargetAPI.py b/lldb/test/API/python_api/target/TestTargetAPI.py index 5b80081..c02a0a2 100644 --- a/lldb/test/API/python_api/target/TestTargetAPI.py +++ b/lldb/test/API/python_api/target/TestTargetAPI.py @@ -112,6 +112,29 @@ class TargetAPITestCase(TestBase): self.assertIsNotNone(data_section2) self.assertEqual(data_section.name, data_section2.name) + def test_get_ABIName(self): + d = {'EXE': 'b.out'} + self.build(dictionary=d) + self.setTearDownCleanup(dictionary=d) + target = self.create_simple_target('b.out') + + abi_pre_launch = target.GetABIName() + self.assertTrue(len(abi_pre_launch) != 0, "Got an ABI string") + + breakpoint = target.BreakpointCreateByLocation( + "main.c", self.line_main) + self.assertTrue(breakpoint, VALID_BREAKPOINT) + + # Put debugger into synchronous mode so when we target.LaunchSimple returns + # it will guaranteed to be at the breakpoint + self.dbg.SetAsync(False) + + # Launch the process, and do not stop at the entry point. + process = target.LaunchSimple( + None, None, self.get_process_working_directory()) + abi_after_launch = target.GetABIName() + self.assertEqual(abi_pre_launch, abi_after_launch, "ABI's match before and during run") + def test_read_memory(self): d = {'EXE': 'b.out'} self.build(dictionary=d) |
