mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
doc: update GDB python plugin path
The NuttX GDB python plugin has been moved to tools/pynuttx/nxgdb. Update all documentation including this path. Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
@@ -14,7 +14,7 @@ Usage
|
|||||||
|
|
||||||
1. Compile NuttX with CONFIG_DEBUG_SYMBOLS=y enabled and change `CONFIG_DEBUG_SYMBOLS_LEVEL` to -g3.
|
1. Compile NuttX with CONFIG_DEBUG_SYMBOLS=y enabled and change `CONFIG_DEBUG_SYMBOLS_LEVEL` to -g3.
|
||||||
2. Use GDB to debug the NuttX ELF binary (on a real device, a simulator, or with a coredump).
|
2. Use GDB to debug the NuttX ELF binary (on a real device, a simulator, or with a coredump).
|
||||||
3. Add the following argument to the GDB command line: `-ix="nuttx/tools/gdb/gdbinit.py"`
|
3. Add the following argument to the GDB command line: `-ix="nuttx/tools/pynuttx/gdbinit.py"`
|
||||||
4. GDB will automatically load the Python script, enabling the use of custom commands.
|
4. GDB will automatically load the Python script, enabling the use of custom commands.
|
||||||
|
|
||||||
How to write a GDB python script
|
How to write a GDB python script
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ Start GDB to connect to QEMU
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ gdb-multiarch nuttx -ex "source tools/gdb/gdbinit.py" -ex "target remote 127.0.0.1:1234"
|
$ gdb-multiarch nuttx -ex "source tools/pynuttx/gdbinit.py" -ex "target remote 127.0.0.1:1234"
|
||||||
Reading symbols from nuttx...
|
Reading symbols from nuttx...
|
||||||
Registering NuttX GDB commands from ~/nuttx/nuttx/tools/gdb/nuttxgdb
|
Registering NuttX GDB commands from ~/nuttx/nuttx/tools/gdb/nuttxgdb
|
||||||
set pagination off
|
set pagination off
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ After building the kernel (and the applications, in kernel mode), use the toolch
|
|||||||
to debug RISC-V applications. For instance, if you are using the xPack's prebuilt toolchain,
|
to debug RISC-V applications. For instance, if you are using the xPack's prebuilt toolchain,
|
||||||
you can use the following command to start GDB::
|
you can use the following command to start GDB::
|
||||||
|
|
||||||
$ riscv-none-elf-gdb-py3 -ix tools/gdb/gdbinit.py --tui nuttx
|
$ riscv-none-elf-gdb-py3 -ix tools/pynuttx/gdbinit.py --tui nuttx
|
||||||
|
|
||||||
To use QEMU for debugging, one should add the parameters ``-s -S`` to the QEMU command line.
|
To use QEMU for debugging, one should add the parameters ``-s -S`` to the QEMU command line.
|
||||||
|
|
||||||
|
|||||||
@@ -244,12 +244,12 @@ The benefit is that it works also for the sim build where ``openocd`` is
|
|||||||
not applicable. For this to work, you will need to enable PROC filesystem support
|
not applicable. For this to work, you will need to enable PROC filesystem support
|
||||||
which will expose required task information (``CONFIG_FS_PROCFS=y``).
|
which will expose required task information (``CONFIG_FS_PROCFS=y``).
|
||||||
|
|
||||||
To use this approach, you can load the ``nuttx/tools/gdb/gdbinit.py`` file. An
|
To use this approach, you can load the ``nuttx/tools/pynuttx/gdbinit.py`` file. An
|
||||||
easy way to do this is to add an extra command:
|
easy way to do this is to add an extra command:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ gdb nuttx -ix=tools/gdb/gdbinit.py
|
$ gdb nuttx -ix=tools/pynuttx/gdbinit.py
|
||||||
|
|
||||||
gdb can need to set the current elf support architecture, for example,
|
gdb can need to set the current elf support architecture, for example,
|
||||||
the prefix is arm-ebai-none-.
|
the prefix is arm-ebai-none-.
|
||||||
|
|||||||
Reference in New Issue
Block a user