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
51 lines
1.8 KiB
Python
51 lines
1.8 KiB
Python
"""Test stepping through ObjC method dispatch in various forms."""
|
|
|
|
import lldb
|
|
from lldbsuite.test.decorators import *
|
|
from lldbsuite.test.lldbtest import *
|
|
from lldbsuite.test import lldbutil
|
|
|
|
|
|
class TestObjCDirectDispatchStepping(TestBase):
|
|
SHARED_BUILD_TESTCASE = False
|
|
NO_DEBUG_INFO_TESTCASE = True
|
|
|
|
def setUp(self):
|
|
# Call super's setUp().
|
|
TestBase.setUp(self)
|
|
# Find the line numbers that we will step to in main:
|
|
self.main_source = lldb.SBFileSpec("stepping-tests.m")
|
|
|
|
@add_test_categories(["pyapi", "basic_process"])
|
|
def test_with_python_api(self):
|
|
"""Test stepping through the 'direct dispatch' optimized method calls."""
|
|
self.build()
|
|
|
|
(target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
|
|
self, "Stop here to start stepping", self.main_source
|
|
)
|
|
stop_bkpt = target.BreakpointCreateBySourceRegex(
|
|
"// Stop Location [0-9]+", self.main_source
|
|
)
|
|
self.assertEqual(stop_bkpt.GetNumLocations(), 15)
|
|
|
|
# Here we step through all the overridden methods of OverridesALot
|
|
# The last continue will get us to the call ot OverridesInit.
|
|
for idx in range(2, 16):
|
|
thread.StepInto()
|
|
func_name = thread.GetFrameAtIndex(0).GetFunctionName()
|
|
self.assertIn(
|
|
"OverridesALot",
|
|
func_name,
|
|
"%d'th step did not match name: %s" % (idx, func_name),
|
|
)
|
|
stop_threads = lldbutil.continue_to_breakpoint(process, stop_bkpt)
|
|
self.assertEqual(len(stop_threads), 1)
|
|
self.assertEqual(stop_threads[0], thread)
|
|
|
|
thread.StepInto()
|
|
func_name = thread.GetFrameAtIndex(0).GetFunctionName()
|
|
self.assertEqual(
|
|
func_name, "-[OverridesInit init]", "Stopped in [OverridesInit init]"
|
|
)
|