Skip to contentSkip to conversation

Documentation: Provide hints on how to debug Python GDB scripts

PATCH Applied Florian Fainelli 3 participants 3 messages Mar 26 – Mar 30

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Documentation: Provide hints on how to debug Python GDB scripts

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.

---
 Documentation/process/debugging/gdb-kernel-debugging.rst | 9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/process/debugging/gdb-kernel-debugging.rst +9 -0
index 9475c759c722..53e225760a4d 100644
@@ -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
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 18 lines · Florian Fainelli

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.

---
 Documentation/process/debugging/gdb-kernel-debugging.rst | 9 +++++++++

 1 file changed, 9 insertions(+)
Documentation/process/debugging/gdb-kernel-debugging.rst +0 -0
index 9475c759c722..53e225760a4d 100644
@@ -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.

Documentation/process/debugging/gdb-kernel-debugging.rst this is just a snapshot of the initial version:: · line 184

Quoted 9 lines
Documentation/process/debugging/gdb-kernel-debugging.rst +9 -0
+
+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
maintainer Applied
#2 lore raw
In reply to Florian Fainelli
Quoted 17 lines · Florian Fainelli

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.

---
 Documentation/process/debugging/gdb-kernel-debugging.rst | 9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/process/debugging/gdb-kernel-debugging.rst +0 -0
index 9475c759c722..53e225760a4d 100644
@@ -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

Documentation/process/debugging/gdb-kernel-debugging.rst this is just a snapshot of the initial version:: · line 184

Quoted 10 lines
Documentation/process/debugging/gdb-kernel-debugging.rst +9 -0
 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

Applied, thanks.

jon