2 Test that we can backtrace correctly from Non ABI functions on the stack
7 from lldbsuite
.test
.decorators
import *
8 from lldbsuite
.test
.lldbtest
import *
9 from lldbsuite
.test
import lldbutil
12 class EHFrameBasedUnwind(TestBase
):
13 @skipUnlessPlatform(["linux"])
14 @skipIf(archs
=["aarch64", "arm", "i386", "i686"])
16 """Test that we can backtrace correctly from Non ABI functions on the stack"""
18 self
.setTearDownCleanup()
20 exe
= self
.getBuildArtifact("a.out")
21 target
= self
.dbg
.CreateTarget(exe
)
23 self
.assertTrue(target
, VALID_TARGET
)
25 lldbutil
.run_break_set_by_symbol(self
, "func")
27 process
= target
.LaunchSimple(
28 ["abc", "xyz"], None, self
.get_process_working_directory()
32 self
.fail("SBTarget.Launch() failed")
34 if process
.GetState() != lldb
.eStateStopped
:
36 "Process should be in the 'stopped' state, "
37 "instead the actual state is: '%s'"
38 % lldbutil
.state_type_to_str(process
.GetState())
41 stacktraces
= lldbutil
.print_stacktraces(process
, string_buffer
=True)
42 self
.expect(stacktraces
, exe
=False, substrs
=["(int)argc=3"])
44 self
.runCmd("thread step-inst")
46 stacktraces
= lldbutil
.print_stacktraces(process
, string_buffer
=True)
47 self
.expect(stacktraces
, exe
=False, substrs
=["(int)argc=3"])