Files
llvm-project/lldb/test/API/functionalities/data-formatter/bytecode-synthetic/TestBytecodeSynthetic.py
Dave Lee 52bcdc6ad1 [lldb] Implement bytecode based SyntheticChildren (#179832)
Initial implementation of a [bytecode][1] synthetic provider. This is a follow up to
https://github.com/llvm/llvm-project/pull/114333 which implemented the bytecode
interpreter, support for summary formatters, and more.

rdar://169727764

[1]: https://lldb.llvm.org/resources/formatterbytecode.html
2026-02-11 09:43:59 -08:00

24 lines
685 B
Python

import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class TestCase(TestBase):
@skipUnlessDarwin
def test(self):
self.build()
if self.TraceOn():
self.expect("log enable -v lldb formatters")
_, _, thread, _ = lldbutil.run_to_source_breakpoint(
self, "break here", lldb.SBFileSpec("main.cpp")
)
frame = thread.selected_frame
account = frame.var("acc")
self.assertEqual(account.num_children, 1)
self.assertEqual(account.child[0].name, "username")
self.expect("v acc", matching=False, substrs=["password"])