]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Documentation: Provide hints on how to debug Python GDB scripts
authorFlorian Fainelli <florian.fainelli@broadcom.com>
Thu, 26 Mar 2026 23:32:24 +0000 (16:32 -0700)
committerJonathan Corbet <corbet@lwn.net>
Mon, 30 Mar 2026 16:04:13 +0000 (10:04 -0600)
By default GDB does not print a full stack of its integrated Python
interpreter, thus making the debugging of GDB scripts more painful than
it has to be.

Suggested-by: Radu Rendec <radu@rendec.net>
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Radu Rendec <radu@rendec.net>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260326233226.2248817-1-florian.fainelli@broadcom.com>

Documentation/process/debugging/gdb-kernel-debugging.rst

index 9475c759c722c10b8c8c02261bca8aa521e02871..53e225760a4d892746e4c702e09a408d92aa4120 100644 (file)
@@ -173,3 +173,12 @@ this is just a snapshot of the initial version::
 
 Detailed help can be obtained via "help <command-name>" for commands and "help
 function <function-name>" for convenience functions.
+
+Debugging GDB scripts
+---------------------
+
+GDB does not enable a full Python backtrace which can make debugging GDB
+scripts more difficult than necessary. The following will allow for printing a
+full backtrace of the python environment::
+
+ (gdb) set python print-stack full