scripts/lldb/pointer_print/README.md
This helper teaches LLDB how to display DuckDB smart pointers as their pointee instead of as wrapper internals.
It targets:
duckdb::unique_ptr<T>duckdb::shared_ptr<T>duckdb::optional_ptr<T>duckdb::buffer_ptr<T>duckdb::arena_ptr<T>duckdb::unsafe_unique_ptr<T>duckdb::unsafe_shared_ptr<T>duckdb::unsafe_optional_ptr<T>duckdb::unsafe_arena_ptr<T>Import the script into LLDB:
command script import <duckdb repository root>/scripts/lldb/pointer_print/pointer_print.py
After import, the script:
duckdb LLDB type categoryduckdb-pp to duckdb-pduckdb-pduckdb-p evaluates an expression like LLDB's expression command, but keeps
the DuckDB smart-pointer formatter active at the root of the printed value.
Examples:
duckdb-p my_unique_ptr
duckdb-p some_state.shared_buffer
duckdb-p /x my_optional_ptr
p my_shared_ptr
The /x-style prefix is forwarded to LLDB as expression -f <format>.
nullptr<pointee type> @ <address>This avoids depending on operator*() or .get() template symbols being
emitted in the binary.
The script derives its LLDB callback module name at import time, so the callback registration stays aligned if the file is renamed later.