Re: [PATCH RFC v2 2/3] docs: Add guides section for debugging
From: Bagas Sanjaya
Date: Wed Sep 25 2024 - 04:02:14 EST
On Tue, Sep 24, 2024 at 10:45:58AM +0200, Sebastian Fricke wrote:
> +This document serves as a general starting point and lookup for debugging device
> +drivers.
> +While this guide focuses on debugging that requires re-compiling the
> +module/kernel, the `userspace-debugging-guide <userspace_debugging_guide.html>`__
> +will guide you through tools like dynamic debug, ftrace and other tools useful
> +for debugging issues and behavior.
> +For general debugging advice, see `general-debugging-guide <index.html>`__.
You can use :doc: syntax for linking to other docs with custom anchor text,
like:
```
:doc:`userspace debugging guide <userspace_debugging_guide>`
```
(note the file suffix omission).
Better yet, specify the full doc path (e.g.
`Documentation/debugging/userspace_debugging_guide.rst`) and Sphinx will
generate the anchor text with target doc's title.
> +====================================================
> +General debugging advice for Linux Kernel developers
> +====================================================
> +
> +.. toctree::
> + :maxdepth: 1
> +
> + driver_development_debugging_guide
> + userspace_debugging_guide
> +
> +.. only:: subproject and html
> +
> + Indices
> + =======
> +
> + * :ref:`genindex`
> +
> +General debugging advice
> +========================
Please split general debugging advice into its own doc (e.g. at
general-advice.rst). Most other docs have index.rst only for toctree
listing.
> +**When should you use this over** `Ftrace`_ **?**
> +
> +- When the code contains one of the :ref:`valid print statements <valid_dyndbg_prints_>`_ or when you have added multiple pr_debug() statements during development
Sphinx complains about stray underscores:
Documentation/debugging/userspace_debugging_guide.rst:54: WARNING: Mismatch: both interpreted text role prefix and reference suffix.
I have to trim them:
---- >8 ----
diff --git a/Documentation/debugging/userspace_debugging_guide.rst b/Documentation/debugging/userspace_debugging_guide.rst
index 4d269a9ef9..eac459e30f 100644
--- a/Documentation/debugging/userspace_debugging_guide.rst
+++ b/Documentation/debugging/userspace_debugging_guide.rst
@@ -51,7 +51,7 @@ Here is one example, that enables all available `pr_debug()`'s within the file:
**When should you use this over** `Ftrace`_ **?**
-- When the code contains one of the :ref:`valid print statements <valid_dyndbg_prints_>`_ or when you have added multiple pr_debug() statements during development
+- When the code contains one of the :ref:`valid print statements <valid_dyndbg_prints>` or when you have added multiple pr_debug() statements during development
- When timing is not an issue, meaning if multiple `pr_debug()` statements in the code won't cause delays
- When you care more about receiving specific log messages than tracing the pattern of how a function is called
Thanks.
--
An old man doll... just what I always wanted! - Clara
Attachment:
signature.asc
Description: PGP signature