From 43feece4b8fc598d255873b832d3f5a9dbd19807 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Mon, 8 Sep 2025 11:26:20 -0700 Subject: [PATCH 1/4] [llvm][docs] Add LLDB data formatters to DebuggingLLVM.rst Add LLDB data formatters to the document about debugging LLVM. --- llvm/docs/DebuggingLLVM.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/llvm/docs/DebuggingLLVM.rst b/llvm/docs/DebuggingLLVM.rst index 51d63b5937f56..90ae43c5cd6b9 100644 --- a/llvm/docs/DebuggingLLVM.rst +++ b/llvm/docs/DebuggingLLVM.rst @@ -96,6 +96,16 @@ and each instruction printed by LLVM is suffixed with the file and line number of the instruction according to the debug information. Note that this requires debug information to be enabled (e.g. pass ``-g`` to Clang). +LLDB Data Formatters +=================== + +A handful of `LLDB data formatters +`__ are +provided for some of the core LLVM libraries. To use them, execute the +following (or add it to your ``~/.lldbinit``):: + + command script import /path/to/lldbDataFormatters.py + GDB pretty printers =================== From 54208a900b992be520a64729399829ad340faf38 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Mon, 8 Sep 2025 13:31:17 -0700 Subject: [PATCH 2/4] Fix underline & path --- llvm/docs/DebuggingLLVM.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/docs/DebuggingLLVM.rst b/llvm/docs/DebuggingLLVM.rst index 90ae43c5cd6b9..c104fce2cb6dc 100644 --- a/llvm/docs/DebuggingLLVM.rst +++ b/llvm/docs/DebuggingLLVM.rst @@ -97,14 +97,14 @@ number of the instruction according to the debug information. Note that this requires debug information to be enabled (e.g. pass ``-g`` to Clang). LLDB Data Formatters -=================== +==================== A handful of `LLDB data formatters `__ are provided for some of the core LLVM libraries. To use them, execute the following (or add it to your ``~/.lldbinit``):: - command script import /path/to/lldbDataFormatters.py + command script import /path/to/llvm/src/utils/lldbDataFormatters.py GDB pretty printers =================== From cd54b113d90e74eabb47e8a96c5fd255eae68f76 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Mon, 8 Sep 2025 13:39:56 -0700 Subject: [PATCH 3/4] Use relative path from llvm-project root --- llvm/docs/DebuggingLLVM.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/docs/DebuggingLLVM.rst b/llvm/docs/DebuggingLLVM.rst index c104fce2cb6dc..165755f44be45 100644 --- a/llvm/docs/DebuggingLLVM.rst +++ b/llvm/docs/DebuggingLLVM.rst @@ -104,7 +104,7 @@ A handful of `LLDB data formatters provided for some of the core LLVM libraries. To use them, execute the following (or add it to your ``~/.lldbinit``):: - command script import /path/to/llvm/src/utils/lldbDataFormatters.py + command script import llvm/utils/lldbDataFormatters.py GDB pretty printers =================== @@ -114,7 +114,7 @@ A handful of `GDB pretty printers provided for some of the core LLVM libraries. To use them, execute the following (or add it to your ``~/.gdbinit``):: - source /path/to/llvm/src/utils/gdb-scripts/prettyprinters.py + source llvm/utils/gdb-scripts/prettyprinters.py It also might be handy to enable the `print pretty `__ From b25af87ba6fafd2a10947f940d619e6cf2c0d44a Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Mon, 8 Sep 2025 14:39:31 -0700 Subject: [PATCH 4/4] Use /path/to/llvm --- llvm/docs/DebuggingLLVM.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/docs/DebuggingLLVM.rst b/llvm/docs/DebuggingLLVM.rst index 165755f44be45..37ba2c06b2813 100644 --- a/llvm/docs/DebuggingLLVM.rst +++ b/llvm/docs/DebuggingLLVM.rst @@ -104,7 +104,7 @@ A handful of `LLDB data formatters provided for some of the core LLVM libraries. To use them, execute the following (or add it to your ``~/.lldbinit``):: - command script import llvm/utils/lldbDataFormatters.py + command script import /path/to/llvm/utils/lldbDataFormatters.py GDB pretty printers =================== @@ -114,7 +114,7 @@ A handful of `GDB pretty printers provided for some of the core LLVM libraries. To use them, execute the following (or add it to your ``~/.gdbinit``):: - source llvm/utils/gdb-scripts/prettyprinters.py + source /path/to/llvm/utils/gdb-scripts/prettyprinters.py It also might be handy to enable the `print pretty `__