Files
TheRock/compiler/amd-llvm/lldb/test/API/functionalities/dwo/TestZeroDwoId.py
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

50 lines
2.0 KiB
Python

"""
Test things related to the fission debug information style where the main object
file contains a skeleton compile unit and the main debug info is in .dwo files.
"""
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import os
class ExecTestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
def test_zero_dwo_id(self):
"""
Test that we can load a .o file that has a skeleton compile unit
with a DWO ID of zero. We do this by hacking up the yaml to emit
zero as a DWO ID is both the .o file and .dwo file. Then we make
sure we can resolve something in the debug information to verify
that we were able to load the .dwo file corrrectly since that is
the only place that has this information.
"""
src_dir = self.getSourceDir()
dwo_yaml_path = os.path.join(src_dir, "main.dwo.yaml")
obj_yaml_path = os.path.join(src_dir, "main.o.yaml")
dwo_path = self.getBuildArtifact("main.dwo")
obj_path = self.getBuildArtifact("main.o")
self.yaml2obj(dwo_yaml_path, dwo_path)
self.yaml2obj(obj_yaml_path, obj_path)
# We need the current working directory to be set to the build directory
os.chdir(self.getBuildDir())
# Create a target with the object file we just created from YAML
target = self.dbg.CreateTarget(obj_path)
self.assertTrue(target, VALID_TARGET)
# Set a breakpoint by file and line, this doesn't require anything from
# the .dwo file.
bp = target.BreakpointCreateByLocation("main.cpp", 6)
self.assertEqual(bp.GetNumLocations(), 1)
bp_loc = bp.GetLocationAtIndex(0)
self.assertTrue(bp_loc.IsValid())
# We will use the address of the location to resolve the function "main"
# to make sure we were able to open the .dwo file since this is the only
# place that contains debug info for the function.
self.assertTrue(bp_loc.GetAddress().GetFunction().IsValid())