Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2244,6 +2244,7 @@ def generate_run_configs(self):
configs.append({
"name": f"Boost.{lib.title()} Documentation",
"target": "mrdocs",
"folder": "Boost Documentation",
"program": os.path.join(self.options.mrdocs_build_dir, "mrdocs"),
"args": [
'../CMakeLists.txt',
Expand Down Expand Up @@ -2507,6 +2508,7 @@ def generate_pretty_printer_configs(self):
lldbinit_content += f"# echo 'settings set target.load-cwd-lldbinit true' >> ~/.lldbinit\n"
lldbinit_content += f"# \n"
lldbinit_content += f"command script import {os.path.join(self.options.llvm_src_dir, 'llvm', 'utils', 'lldbDataFormatters.py').replace(os.sep, '/')}\n"
lldbinit_content += f"command script import {os.path.join(self.options.mrdocs_src_dir, 'share', 'lldb', 'mrdocs_formatters.py').replace(os.sep, '/')}\n"
with open(lldbinit_path, "w") as f:
f.write(lldbinit_content)
print(f"Generated LLDB pretty printer configuration at '{lldbinit_path}'")
Expand Down
24 changes: 24 additions & 0 deletions share/lldb/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
= LLDB data formatters

Create or modify your `.lldbinit` file to contain the following:

[source,lldb]
----
command script import /path/share/lldb/mrdocs_formatters.py <1>
type category enable MrDocs <2>
----

<1> Import the LLDB formatter module. LLDB will call `__lldb_init_module` inside `mrdocs_formatters.py` to register summaries and synthetic children.
<2> Ensure the `MrDocs` type category is enabled. (The module already enables it; this line is harmless redundancy.)

This pattern registers the formatters as soon as LLDB imports the module.

== Hot-reload during a session (useful while editing the file)

[source,lldb]
----
script import importlib, mrdocs_formatters; importlib.reload(mrdocs_formatters) <1>
----

<1> Reloads the module without restarting LLDB.

Loading
Loading