Dave Lee abbba22f45
[lldb] Add synthetic support to formatter_bytecode.py (#183804)
Updates formatter_bytecode.py to support compilation and disassembly for
synthetic formatters, in other words support for multiple functions
(signatures).

This includes a number of other changes:
* String parsing and encoding have bugs fixed
* CLI args are updated, primarily to support an output file
* Added uleb encoding/decoding support

This work is a prelude the ongoing work of a Python to formatter
bytecode compiler. The python compiler to emit assembly, and this module
(formatter_bytecode) will compile it into binary bytecode.
2026-02-27 14:20:19 -08:00

13 lines
639 B
Plaintext

# RUN: %python %S/../../../../examples/python/formatter_bytecode.py --test
# RUN: %clang_host -std=c++17 -g %S/Inputs/FormatterBytecode/MyOptional.cpp -o %t.exe
# RUN: %lldb %t.exe -o "command script import %S/../../../../examples/python/formatter_bytecode.py" -o "command script import %S/Inputs/FormatterBytecode/formatter.py" -o "b -p here" -o "r" -o "v x" -o "v y" -o q | FileCheck %s --check-prefix=OPTIONAL
# OPTIONAL: (lldb) v x
# OPTIONAL: (MyOptional<int>) x = {
# OPTIONAL: hasVal = false
# OPTIONAL: }
# OPTIONAL: (lldb) v y
# OPTIONAL: (MyOptional<int>) y = {
# OPTIONAL: Storage = (value = 42, hasVal = true)
# OPTIONAL: }