Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / functionalities / show_location / TestShowLocationDwarf5.py
blobc206b6e5000e4539a37159c11f7483de8f6e402e
1 import lldb
2 from lldbsuite.test.lldbtest import *
3 from lldbsuite.test.decorators import *
5 # This test checks that source code location is shown correctly
6 # when DWARF5 debug information is used.
9 class TestTargetSourceMap(TestBase):
10 def test_source_map(self):
11 # Set the target soure map to map "./" to the current test directory.
12 yaml_path = os.path.join(self.getSourceDir(), "a.yaml")
13 obj_path = self.getBuildArtifact("a.out")
14 self.yaml2obj(yaml_path, obj_path)
16 # Create a target with the object file we just created from YAML
17 target = self.dbg.CreateTarget(obj_path)
19 # Check we are able to show the locations properly.
20 self.expect(
21 "b main",
22 VALID_BREAKPOINT_LOCATION,
23 substrs=["main + 13 at test.cpp:2:3, address = 0x000000000040052d"],
26 self.expect(
27 "b foo",
28 VALID_BREAKPOINT_LOCATION,
29 substrs=["foo() + 4 at test.cpp:6:1, address = 0x0000000000400534"],