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
96 lines
3.1 KiB
Python
96 lines
3.1 KiB
Python
"""Test that the expedited thread pc values are not re-fetched by lldb."""
|
|
|
|
import subprocess
|
|
import lldb
|
|
from lldbsuite.test.decorators import *
|
|
from lldbsuite.test.lldbtest import *
|
|
from lldbsuite.test import lldbutil
|
|
|
|
file_index = 0
|
|
|
|
|
|
class TestExpeditedThreadPCs(TestBase):
|
|
NO_DEBUG_INFO_TESTCASE = True
|
|
|
|
@skipUnlessDarwin
|
|
def test_expedited_thread_pcs(self):
|
|
TestBase.setUp(self)
|
|
|
|
global file_index
|
|
++file_index
|
|
logfile = os.path.join(
|
|
self.getBuildDir(),
|
|
"packet-log-" + self.getArchitecture() + "-" + str(file_index) + ".txt",
|
|
)
|
|
self.runCmd("log enable -f %s gdb-remote packets" % (logfile))
|
|
|
|
def cleanup():
|
|
self.runCmd("log disable gdb-remote packets")
|
|
if os.path.exists(logfile):
|
|
os.unlink(logfile)
|
|
|
|
self.addTearDownHook(cleanup)
|
|
|
|
self.source = "main.cpp"
|
|
self.build()
|
|
(target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
|
|
self,
|
|
"break here",
|
|
lldb.SBFileSpec(self.source, False),
|
|
extra_images=["foo"],
|
|
)
|
|
|
|
# verify that libfoo.dylib hasn't loaded yet
|
|
for m in target.modules:
|
|
self.assertNotEqual(m.GetFileSpec().GetFilename(), "libfoo.dylib")
|
|
|
|
thread.StepInto()
|
|
thread.StepInto()
|
|
|
|
thread.StepInto()
|
|
thread.StepInto()
|
|
thread.StepInto()
|
|
|
|
# verify that libfoo.dylib has loaded
|
|
found_libfoo = False
|
|
for m in target.modules:
|
|
if m.GetFileSpec().GetFilename() == "libfoo.dylib":
|
|
found_libfoo = True
|
|
self.assertTrue(found_libfoo)
|
|
|
|
thread.StepInto()
|
|
thread.StepInto()
|
|
thread.StepOver()
|
|
thread.StepOver()
|
|
thread.StepOver()
|
|
thread.StepOver()
|
|
thread.StepOver()
|
|
thread.StepOver()
|
|
thread.StepOver()
|
|
thread.StepOver()
|
|
thread.StepOver()
|
|
thread.StepOver()
|
|
|
|
process.Kill()
|
|
|
|
# Confirm that we never fetched the pc for any threads during
|
|
# this debug session.
|
|
if os.path.exists(logfile):
|
|
f = open(logfile)
|
|
lines = f.readlines()
|
|
num_errors = 0
|
|
for line in lines:
|
|
arch = self.getArchitecture()
|
|
if arch == "arm64" or arch == "arm64_32":
|
|
# <reg name="pc" regnum="32" offset="256" bitsize="64" group="general" group_id="1" ehframe_regnum="32" dwarf_regnum="32" generic="pc"/>
|
|
# A fetch of $pc on arm64 looks like
|
|
# < 22> send packet: $p20;thread:91698e;#70
|
|
self.assertNotIn("$p20;thread", line)
|
|
else:
|
|
# <reg name="rip" regnum="16" offset="128" bitsize="64" group="general" altname="pc" group_id="1" ehframe_regnum="16" dwarf_regnum="16" generic="pc"/>
|
|
# A fetch of $pc on x86_64 looks like
|
|
# < 22> send packet: $p10;thread:91889c;#6f
|
|
self.assertNotIn("$p10;thread", line)
|
|
|
|
f.close()
|