Files
Dave Lee 8fa4b3d601 [lldb] Simplify some tests to run_to_source_breakpoint (NFC) (#190082)
Many tests have ad hoc forms of the launch & break steps done by
`lldbutil.run_to_source_breakpoint`. This changes some of those tests to
use `run_to_source_breakpoint` instead.

Assisted-by: claude
2026-04-02 15:20:49 -07:00

24 lines
670 B
Python

"""
Test the ptr_refs tool on Darwin
"""
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class TestPtrRefs(TestBase):
@skipIfAsan # The output looks different under ASAN.
@skipIfMTE # Heap scanning reads tagged memory with untagged pointers.
@skipUnlessDarwin
def test_ptr_refs(self):
"""Test format string functionality."""
self.build()
lldbutil.run_to_source_breakpoint(self, "break", lldb.SBFileSpec("main.c"))
self.runCmd("command script import lldb.macosx.heap")
self.expect("ptr_refs my_ptr", substrs=["malloc", "stack"])