[Lldb-commits] [lldb] [lldb][docs] Use project-local documentation links (PR #228623)
Reid Kleckner via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 2 17:04:02 PDT 2026
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/228623
Replace same-project absolute URLs with relative Markdown links and Sphinx
cross-references so local and archived documentation stays self-contained.
Update generated Python API docstrings at their header and SWIG inputs,
and repair stale Python and frame-recognizer destinations.
Validation: docs-lldb-html and docs-lldb-man, followed by fresh Sphinx
rebuilds (-E), on a merge of the three independent self-link fixes with
the checker enabled and warnings-as-errors disabled. No self-link warnings
or new warning messages compared with the audit baseline.
C/C++ formatting: git-clang-format --diff against main for the three
modified API headers reported no changes.
Part of #214861
Assisted-by: Codex
>From 7ba957fba126f3de07e804a4e867640670692405 Mon Sep 17 00:00:00 2001
From: Reid Kleckner <rkleckner at nvidia.com>
Date: Fri, 2 Oct 2026 23:36:50 +0000
Subject: [PATCH] [lldb][docs] Use project-local documentation links
Replace same-project absolute URLs with relative Markdown links and Sphinx
cross-references so local and archived documentation stays self-contained.
Update generated Python API docstrings at their header and SWIG inputs,
and repair stale Python and frame-recognizer destinations.
Validation: docs-lldb-html and docs-lldb-man, followed by fresh Sphinx
rebuilds (-E), on a merge of the three independent self-link fixes with
the checker enabled and warnings-as-errors disabled. No self-link warnings
or new warning messages compared with the audit baseline.
C/C++ formatting: git-clang-format --diff against main for the three
modified API headers reported no changes.
Part of #214861
Assisted-by: Codex
---
lldb/bindings/interface/SBFormatDocstrings.i | 2 +-
lldb/docs/index.md | 4 ++--
lldb/docs/man/lldb-server.rst | 2 +-
lldb/docs/man/lldb.rst | 6 +++---
lldb/docs/resources/lldbdap-contributing.md | 8 ++++----
lldb/docs/resources/qemu-testing.md | 2 +-
lldb/docs/use/lldbdap.md | 8 ++++----
lldb/docs/use/tutorials/automating-stepping-logic.md | 2 +-
lldb/include/lldb/API/SBFormat.h | 2 +-
lldb/include/lldb/API/SBFrame.h | 2 +-
lldb/include/lldb/API/SBThread.h | 2 +-
11 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/lldb/bindings/interface/SBFormatDocstrings.i b/lldb/bindings/interface/SBFormatDocstrings.i
index a7304f5f6a848..4dbafe4b8e6c1 100644
--- a/lldb/bindings/interface/SBFormatDocstrings.i
+++ b/lldb/bindings/interface/SBFormatDocstrings.i
@@ -1,5 +1,5 @@
%feature("docstring",
"Class that represents a format string that can be used to generate "
"descriptions of objects like frames and threads. See "
-"https://lldb.llvm.org/use/formatting.html for more information."
+":doc:`/use/formatting` for more information."
) lldb::SBFormat;
diff --git a/lldb/docs/index.md b/lldb/docs/index.md
index b117c4ab386f2..62fe1e4877c48 100644
--- a/lldb/docs/index.md
+++ b/lldb/docs/index.md
@@ -21,9 +21,9 @@ All of the code in the LLDB project is available under the
## Using LLDB
For an introduction into the LLDB command language, head over to the [LLDB
-Tutorial](https://lldb.llvm.org/use/tutorial.html). For users already familiar
+Tutorial](use/tutorial.md). For users already familiar
with GDB there is a cheat sheet listing common tasks and their LLDB equivalent
-in the [GDB to LLDB command map](https://lldb.llvm.org/use/map.html).
+in the [GDB to LLDB command map](use/map.md).
There are also multiple resources on how to script LLDB using Python: the
{doc}`use/python-reference` is a great starting point for that.
diff --git a/lldb/docs/man/lldb-server.rst b/lldb/docs/man/lldb-server.rst
index da6b2c7181842..cd1801eafa97e 100644
--- a/lldb/docs/man/lldb-server.rst
+++ b/lldb/docs/man/lldb-server.rst
@@ -192,5 +192,5 @@ can select the target after connecting to the server. Note that some commands
SEE ALSO
--------
-The LLDB project page https://lldb.llvm.org has many different resources
+The :doc:`LLDB project page </index>` has many different resources
for :program:`lldb-server` users.
diff --git a/lldb/docs/man/lldb.rst b/lldb/docs/man/lldb.rst
index 10b143cd0de8f..0a2a2093f8c6b 100644
--- a/lldb/docs/man/lldb.rst
+++ b/lldb/docs/man/lldb.rst
@@ -339,7 +339,7 @@ the warning, add the following command to ~/.lldbinit:
SEE ALSO
--------
-The LLDB project page https://lldb.llvm.org has many different resources
-for :program:`lldb` users ‐‐ the gdb/lldb command equivalence page
-https://lldb.llvm.org/use/map.html can be especially helpful for users
+The :doc:`LLDB project page </index>` has many different resources
+for :program:`lldb` users ‐‐ the :doc:`gdb/lldb command equivalence page
+</use/map>` can be especially helpful for users
coming from gdb.
diff --git a/lldb/docs/resources/lldbdap-contributing.md b/lldb/docs/resources/lldbdap-contributing.md
index 16b9f263f7f1c..02319f02930dc 100644
--- a/lldb/docs/resources/lldbdap-contributing.md
+++ b/lldb/docs/resources/lldbdap-contributing.md
@@ -20,7 +20,7 @@ requests](https://github.com/llvm/llvm-project/pulls).
## Building `lldb-dap` from source
-To build lldb-dap from source, first need to [setup a LLDB build](https://lldb.llvm.org/resources/build.html).
+To build lldb-dap from source, first need to [setup a LLDB build](build.md).
After doing so, run `ninja lldb-dap`. To use your freshly built `lldb-dap`
binary, install the VS Code extension and point it to lldb-dap by setting the
`lldb-dap.executable-path` setting.
@@ -44,9 +44,9 @@ components:
configuration files.
Since lldb-dap builds on top of LLDB, all of LLDB's extensibility mechanisms
-such as [Variable Pretty-Printing](https://lldb.llvm.org/use/variable.html),
-[Frame recognizers](https://lldb.llvm.org/use/python-reference.html#writing-lldb-frame-recognizers-in-python)
-and [Python Scripting](https://lldb.llvm.org/use/python.html) are available
+such as [Variable Pretty-Printing](../use/variable.md),
+[Frame recognizers](../use/tutorials/custom-frame-recognizers.md)
+and [Python Scripting](../use/python-reference.md) are available
also in lldb-dap.
When adding new functionality, you generally want to add it on the lowest
diff --git a/lldb/docs/resources/qemu-testing.md b/lldb/docs/resources/qemu-testing.md
index ff4d704ec3a21..386483fa572e7 100644
--- a/lldb/docs/resources/qemu-testing.md
+++ b/lldb/docs/resources/qemu-testing.md
@@ -117,7 +117,7 @@ $ sudo bash run-qemu.sh --arch arm64 --rootfs <path of rootfs image> \
$ sudo apt install python-dev libedit-dev libncurses5-dev libexpat1-dev
```
-- Cross compile LLDB server for AArch64 Linux: Please visit <https://lldb.llvm.org/resources/build.html> for instructions on how to cross compile LLDB server.
+- Cross compile LLDB server for AArch64 Linux: Please visit [the build instructions](build.md) for instructions on how to cross compile LLDB server.
- Transfer LLDB server executable to emulation environment
```
diff --git a/lldb/docs/use/lldbdap.md b/lldb/docs/use/lldbdap.md
index a4c151a2ff39c..38fb43dac8a6a 100644
--- a/lldb/docs/use/lldbdap.md
+++ b/lldb/docs/use/lldbdap.md
@@ -21,9 +21,9 @@ components:
implementations together for launching a binary.
Since `lldb-dap` builds on top of LLDB, all of LLDB's extensibility mechanisms
-such as [Variable Pretty-Printing](https://lldb.llvm.org/use/variable.html),
-[Frame recognizers](https://lldb.llvm.org/use/python-reference.html#writing-lldb-frame-recognizers-in-python)
-and [Python Scripting](https://lldb.llvm.org/use/python.html) are available
+such as [Variable Pretty-Printing](variable.md),
+[Frame recognizers](tutorials/custom-frame-recognizers.md)
+and [Python Scripting](python-reference.md) are available
also in `lldb-dap`.
#### Links to IDE Extensions
@@ -38,7 +38,7 @@ There are multiple ways to obtain this binary:
- Use the binary provided by your toolchain (for example `xcrun -f lldb-dap` on macOS) or contact your toolchain vendor to include it.
- Download one of the release packages from the [LLVM release page](https://github.com/llvm/llvm-project/releases/). The `LLVM-{version}-{operating_system}.tar.xz` packages contain a prebuilt `lldb-dap` binary or check your systems prefered package manager.
-- Build it from source (see [LLDB's build instructions](https://lldb.llvm.org/resources/build.html)).
+- Build it from source (see [LLDB's build instructions](../resources/build.md)).
In some cases, a language specific build of `lldb` / `lldb-dap` may also be
available as part of the languages toolchain. For example the
diff --git a/lldb/docs/use/tutorials/automating-stepping-logic.md b/lldb/docs/use/tutorials/automating-stepping-logic.md
index 15e16f3532efb..15502c92b548e 100644
--- a/lldb/docs/use/tutorials/automating-stepping-logic.md
+++ b/lldb/docs/use/tutorials/automating-stepping-logic.md
@@ -6,7 +6,7 @@ simple state machine that runs the plans. You can create a Python class that
works as a thread plan, and responds to the requests the state machine makes to
run its operations.
-The base class for the [ScriptedThreadPlan](https://lldb.llvm.org/python_api/lldb.plugins.scripted_thread_plan.ScriptedThreadPlan.html) is provided as part of the lldb python module, making it easy to derive a new class from it.
+The base class for the {py:class}`ScriptedThreadPlan <lldb.plugins.scripted_thread_plan.ScriptedThreadPlan>` is provided as part of the lldb python module, making it easy to derive a new class from it.
There is a longer discussion of scripted thread plans and the state machine,
and several interesting examples of their use in [scripted_step.py](https://github.com/llvm/llvm-project/blob/main/lldb/examples/python/scripted_step.py)
diff --git a/lldb/include/lldb/API/SBFormat.h b/lldb/include/lldb/API/SBFormat.h
index 757340ab2b5c2..55f9fa26064e6 100644
--- a/lldb/include/lldb/API/SBFormat.h
+++ b/lldb/include/lldb/API/SBFormat.h
@@ -24,7 +24,7 @@ namespace lldb {
/// Class that represents a format string that can be used to generate
/// descriptions of objects like frames and threads. See
-/// https://lldb.llvm.org/use/formatting.html for more information.
+/// :doc:`/use/formatting` for more information.
class LLDB_API SBFormat {
public:
SBFormat();
diff --git a/lldb/include/lldb/API/SBFrame.h b/lldb/include/lldb/API/SBFrame.h
index 4d67ac74eab12..1a2a3e6fddca2 100644
--- a/lldb/include/lldb/API/SBFrame.h
+++ b/lldb/include/lldb/API/SBFrame.h
@@ -213,7 +213,7 @@ class LLDB_API SBFrame {
/// Similar to \a GetDescription() but the format of the description can be
/// configured via the \p format parameter. See
- /// https://lldb.llvm.org/use/formatting.html for more information on format
+ /// :doc:`/use/formatting` for more information on format
/// strings.
///
/// \param[in] format
diff --git a/lldb/include/lldb/API/SBThread.h b/lldb/include/lldb/API/SBThread.h
index a5edb529c2c6a..1ded86fcd54c5 100644
--- a/lldb/include/lldb/API/SBThread.h
+++ b/lldb/include/lldb/API/SBThread.h
@@ -212,7 +212,7 @@ class LLDB_API SBThread {
/// Similar to \a GetDescription() but the format of the description can be
/// configured via the \p format parameter. See
- /// https://lldb.llvm.org/use/formatting.html for more information on format
+ /// :doc:`/use/formatting` for more information on format
/// strings.
///
/// \param[in] format
More information about the lldb-commits
mailing list