[X86] Use NSW/NUW flags on ISD::TRUNCATE nodes to improve X86 PACKSS/PACKUS lowering...
[llvm-project.git] / lldb / test / API / functionalities / unwind / ehframe / TestEhFrameUnwind.py
blob853e45f6f07060d434f0d9258a321dd17062543a
1 """
2 Test that we can backtrace correctly from Non ABI functions on the stack
3 """
6 import lldb
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"])
15 def test(self):
16 """Test that we can backtrace correctly from Non ABI functions on the stack"""
17 self.build()
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()
31 if not process:
32 self.fail("SBTarget.Launch() failed")
34 if process.GetState() != lldb.eStateStopped:
35 self.fail(
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"])