Merge branch 'docs/coredump_standalone' into 'master'

docs(tools/coredump): add information about standalone tool for advanced users

Closes IDFGH-12407 and IDFGH-12462

See merge request espressif/esp-idf!30039
pull/13557/merge
Roland Dobai 2024-04-18 21:20:08 +08:00
commit 9b8e2c72ba
3 zmienionych plików z 31 dodań i 2 usunięć

Wyświetl plik

@ -156,6 +156,7 @@
/docs/ @esp-idf-codeowners/docs
/docs/**/api-guides/tools/ @esp-idf-codeowners/tools
/docs/en/api-guides/core_dump.rst @esp-idf-codeowners/debugging
/docs/en/api-guides/jtag-debugging/ @esp-idf-codeowners/debugging
/docs/**/api-reference/bluetooth/ @esp-idf-codeowners/bluetooth
/docs/**/api-reference/network/ @esp-idf-codeowners/network @esp-idf-codeowners/wifi

Wyświetl plik

@ -77,7 +77,8 @@ The core dump partition is automatically declared when using the default partiti
.. important::
If :doc:`../security/flash-encryption` is enabled on the device, please add an ``encrypted`` flag to the core dump partition declaration.
If :doc:`../security/flash-encryption` is enabled on the device, please add an ``encrypted`` flag to the core dump partition declaration. Please note that the core dump cannot be read from encrypted partitions using ``idf.py coredump-info`` or ``idf.py coredump-debug`` commands.
It is recommended to read the core dump from ESP which will automatically decrypt the partition and send it for analysis, which can be done by running e.g. ``idf.py coredump-info -c <path-to-core-dump>``.
.. code-block:: none
@ -98,6 +99,11 @@ or
idf.py coredump-debug
.. note::
The ``idf.py coredump-info`` and ``idf.py coredump-debug`` commands are wrappers around the `esp-coredump` tool for easier use in the ESP-IDF environment. For more information see :ref:`core_dump_commands` section.
Core Dump to UART
-----------------
@ -184,6 +190,8 @@ or
idf.py coredump-debug -c </path/to/saved/base64/text>
.. _core_dump_commands:
Core Dump Commands
------------------
@ -192,6 +200,12 @@ ESP-IDF provides special commands to help to retrieve and analyze core dumps:
* ``idf.py coredump-info`` - prints crashed task's registers, call stack, list of available tasks in the system, memory regions, and contents of memory stored in core dump (TCBs and stacks).
* ``idf.py coredump-debug`` - creates core dump ELF file and runs GDB debug session with this file. You can examine memory, variables, and task states manually. Note that since not all memory is saved in the core dump, only the values of variables allocated on the stack are meaningful.
For advanced users who want to pass additional arguments or use custom ELF files, it is possible to use the `esp-coredump <https://github.com/espressif/esp-coredump>`_ tool directly. For more information, use in ESP-IDF environment:
.. code-block:: bash
esp-coredump --help
ROM Functions in Backtraces
---------------------------

Wyświetl plik

@ -77,7 +77,8 @@ ELF 格式具备扩展特性,支持在发生崩溃时保存更多关于错误
.. important::
如果设备启用了 :doc:`../security/flash-encryption`,请在核心转储分区中添加 ``encrypted`` 标志。
如果设备启用了 :doc:`../security/flash-encryption`,请在核心转储分区中添加 ``encrypted`` 标志。请注意,使用 ``idf.py coredump-info````idf.py coredump-debug`` 命令无法从加密分区读取核心转储。
建议使用 ``idf.py coredump-info -c <path-to-core-dump>`` 命令从 ESP 设备侧读取核心转储ESP 设备会自动解密分区并发送到相应位置用于分析。
.. code-block:: none
@ -98,6 +99,11 @@ ELF 格式具备扩展特性,支持在发生崩溃时保存更多关于错误
idf.py coredump-debug
.. note::
``idf.py coredump-info`` 命令和 ``idf.py coredump-debug`` 命令对 `esp-coredump` 工具进行了封装,可以在 ESP-IDF 环境中轻松使用。更多信息,请参考 :ref:`core_dump_commands`
将核心转储保存到 UART
-----------------------
@ -184,6 +190,8 @@ ELF 格式具备扩展特性,支持在发生崩溃时保存更多关于错误
idf.py coredump-debug -c </path/to/saved/base64/text>
.. _core_dump_commands:
核心转储命令
------------------
@ -192,6 +200,12 @@ ESP-IDF 提供了一些特殊命令,有助于检索和分析核心转储:
* ``idf.py coredump-info`` - 打印崩溃任务的寄存器、调用栈、系统可用任务列表、内存区域以及核心转储中存储的内存内容(包括 TCB 和栈)。
* ``idf.py coredump-debug`` - 创建核心转储 ELF 文件,并使用该文件运行 GDB 调试会话。你可以手动检查内存、变量和任务状态。请注意,由于并未将所有内存保存在核心转储中,因此只有在栈上分配的变量的值才有意义。
高阶用户如果需要传递额外参数或使用自定义 ELF 文件,可直接使用 `esp-coredump <https://github.com/espressif/esp-coredump>`_ 工具。如果在 ESP-IDF 环境中使用该工具,可运行如下命令查询更多信息:
.. code-block:: bash
esp-coredump --help
回溯中的 ROM 函数
---------------------------