Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / linux / mix-dwo-and-regular-objects / TestMixedDwarfBinary.py
blobbef43d9422f1d1a4312e566579826572b099a14f
1 """ Testing debugging of a binary with "mixed" dwarf (with/without fission). """
2 import lldb
3 from lldbsuite.test.decorators import *
4 from lldbsuite.test.lldbtest import *
5 from lldbsuite.test import lldbutil
8 class TestMixedDwarfBinary(TestBase):
9 @no_debug_info_test # Prevent the genaration of the dwarf version of this test
10 @add_test_categories(["dwo"])
11 @skipUnlessPlatform(["linux"])
12 def test_mixed_dwarf(self):
13 """Test that 'frame variable' works
14 for the executable built from two source files compiled
15 with/whithout -gsplit-dwarf correspondingly."""
17 self.build()
18 exe = self.getBuildArtifact("a.out")
20 self.target = self.dbg.CreateTarget(exe)
21 self.assertTrue(self.target, VALID_TARGET)
23 main_bp = self.target.BreakpointCreateByName("g", "a.out")
24 self.assertTrue(main_bp, VALID_BREAKPOINT)
26 self.process = self.target.LaunchSimple(
27 None, None, self.get_process_working_directory()
29 self.assertTrue(self.process, PROCESS_IS_VALID)
31 # The stop reason of the thread should be breakpoint.
32 self.assertState(
33 self.process.GetState(), lldb.eStateStopped, STOPPED_DUE_TO_BREAKPOINT
36 frame = self.process.GetThreadAtIndex(0).GetFrameAtIndex(0)
37 x = frame.FindVariable("x")
38 self.assertTrue(x.IsValid(), "x is not valid")
39 y = frame.FindVariable("y")
40 self.assertTrue(y.IsValid(), "y is not valid")