mirror of
https://github.com/apache/nuttx.git
synced 2026-08-24 15:08:47 +00:00
Documentation:Add documentation related to gdb python script debugging
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
adc5c8b5ac
commit
1dfcb1f12d
2 changed files with 28 additions and 0 deletions
27
Documentation/guides/gdbwithpython.rst
Normal file
27
Documentation/guides/gdbwithpython.rst
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
====================
|
||||
GDB with Python
|
||||
====================
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
We can better debug the nuttx kernel through GDB's python extension.
|
||||
Some of the most common class usages are implemented under the nuttx/tools/gdb directory.
|
||||
Users can write their own python scripts to debug the nuttx kernel according to their needs
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
1. Compile nuttx with CONFIG_DEBUG_SYMBOLS=y
|
||||
2. Use gdb to debug nuttx elf.(real device, or sim, or coredump)
|
||||
3. add args to gdb command line: -ix="nuttx/tools/gdb/__init__.py"
|
||||
4. Then gdb will load the python script automatically.you can use the custom commands.
|
||||
|
||||
How to write a GDB python script
|
||||
================================
|
||||
|
||||
Here is an article to introduce, read it to understand the most basic principles of python,
|
||||
`Automate Debugging with GDB Python API <https://interrupt.memfault.com/blog/automate-debugging-with-gdb-python-api>`_.
|
||||
|
||||
For more documentation on gdb pyhton, please refer to the official documentation of gdb
|
||||
`GDB with pyhton <https://interrupt.memfault.com/blog/automate-debugging-with-gdb-python-api>`_.
|
||||
|
|
@ -20,3 +20,4 @@ Guides
|
|||
nestedinterrupts.rst
|
||||
cortexmhardfaults.rst
|
||||
coredump.rst
|
||||
gdbwithpython.rst
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue