Skip to content

Commit 969ea94

Browse files
committed
Merge branch 'docs/minor_coredump_docs_fixes' into 'master'
docs(coredump): Add minor documentation improvements for coredump Closes DOC-10116 See merge request espressif/esp-idf!36517
2 parents 706b5e4 + c640466 commit 969ea94

File tree

3 files changed

+16
-27
lines changed

3 files changed

+16
-27
lines changed

docs/en/api-guides/core_dump.rst

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ Automatic Decoding
138138

139139
If :ref:`CONFIG_ESP_COREDUMP_DECODE` is set to automatically decode the UART core dump, ESP-IDF monitor will automatically decode the data, translate any function addresses to source code lines, and display it in the monitor. The output to ESP-IDF monitor would resemble the following output:
140140

141-
The :ref:`CONFIG_ESP_COREDUMP_UART_DELAY` allows for an optional delay to be added before the core dump file is output to UART.
142-
143141
.. code-block:: none
144142
145143
===============================================================
@@ -188,6 +186,7 @@ The :ref:`CONFIG_ESP_COREDUMP_UART_DELAY` allows for an optional delay to be add
188186
===================== ESP32 CORE DUMP END =====================
189187
===============================================================
190188
189+
The :ref:`CONFIG_ESP_COREDUMP_UART_DELAY` allows for an optional delay to be added before the core dump file is output to UART.
191190

192191
Manual Decoding
193192
^^^^^^^^^^^^^^^
@@ -218,10 +217,12 @@ or
218217
Core Dump Commands
219218
------------------
220219

221-
ESP-IDF provides special commands to help to retrieve and analyze core dumps:
220+
ESP-IDF provides special commands to retrieve and analyze core dumps:
221+
222+
* ``idf.py coredump-info`` - reads coredump from flash and 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).
223+
* ``idf.py coredump-debug`` - reads coredump from flash, saves it as ELF file and runs a 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.
222224

223-
* ``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).
224-
* ``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.
225+
``idf.py coredump-info --help`` and ``idf.py coredump-debug --help`` commands can be used to get more details on usage. For example, they can save the coredump into a file and avoid the need to read it from flash every time these commands are run.
225226

226227
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:
227228

@@ -288,13 +289,6 @@ Example
288289
(gdb) p global_var
289290
$1 = 25 '\031'
290291
291-
292-
Running ``idf.py coredump-info`` and ``idf.py coredump-debug``
293-
--------------------------------------------------------------
294-
295-
``idf.py coredump-info --help`` and ``idf.py coredump-debug --help`` commands can be used to get more details on usage.
296-
297-
298292
Related Documents
299293
^^^^^^^^^^^^^^^^^
300294

docs/zh_CN/api-guides/core_dump.rst

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ ELF 格式具备扩展特性,支持在发生崩溃时保存更多关于错误
138138

139139
如果设置 :ref:`CONFIG_ESP_COREDUMP_DECODE`,使其自动解码 UART 核心转储文件,ESP-IDF 监视器会自动解码数据,将所有函数地址转换为源代码行,并在监视器中显示相应信息。ESP-IDF 监视器会输出类似以下内容:
140140

141-
此外,选项 :ref:`CONFIG_ESP_COREDUMP_UART_DELAY` 支持在将核心转储文件输出到 UART 前添加延迟。
142-
143141
.. code-block:: none
144142
145143
===============================================================
@@ -188,6 +186,7 @@ ELF 格式具备扩展特性,支持在发生崩溃时保存更多关于错误
188186
===================== ESP32 CORE DUMP END =====================
189187
===============================================================
190188
189+
此外,选项 :ref:`CONFIG_ESP_COREDUMP_UART_DELAY` 支持在将核心转储文件输出到 UART 前添加延迟。
191190

192191
手动解码
193192
^^^^^^^^^^^^^^^
@@ -218,10 +217,12 @@ ELF 格式具备扩展特性,支持在发生崩溃时保存更多关于错误
218217
核心转储命令
219218
------------------
220219

221-
ESP-IDF 提供了一些特殊命令,有助于检索和分析核心转储:
220+
ESP-IDF 提供了一些特殊命令,用于检索和分析核心转储:
221+
222+
* ``idf.py coredump-info`` - 从 flash 中读取核心转储,打印崩溃任务的寄存器、调用栈、系统可用任务列表、内存区域以及核心转储中存储的内存内容(包括 TCB 和栈)。
223+
* ``idf.py coredump-debug`` - 从 flash 中读取核心转储,将其保存为 ELF 文件,并使用该文件运行 GDB 调试会话。你可以手动检查内存、变量和任务状态。请注意,由于并未将所有内存保存在核心转储中,因此只有在栈上分配的变量的值才有意义。
222224

223-
* ``idf.py coredump-info`` - 打印崩溃任务的寄存器、调用栈、系统可用任务列表、内存区域以及核心转储中存储的内存内容(包括 TCB 和栈)。
224-
* ``idf.py coredump-debug`` - 创建核心转储 ELF 文件,并使用该文件运行 GDB 调试会话。你可以手动检查内存、变量和任务状态。请注意,由于并未将所有内存保存在核心转储中,因此只有在栈上分配的变量的值才有意义。
225+
运行 ``idf.py coredump-info --help`` 和 ``idf.py coredump-debug --help`` 命令可以查看更详细的使用说明。例如,它们可以将核心转储保存到文件中,避免每次执行命令时都需要从 flash 中读取。
225226

226227
高阶用户如果需要传递额外参数或使用自定义 ELF 文件,可直接使用 `esp-coredump <https://github.com/espressif/esp-coredump>`_ 工具。如果在 ESP-IDF 环境中使用该工具,可运行如下命令查询更多信息:
227228

@@ -288,13 +289,6 @@ ESP-IDF 提供了一些特殊命令,有助于检索和分析核心转储:
288289
(gdb) p global_var
289290
$1 = 25 '\031'
290291
291-
292-
运行 ``idf.py coredump-info`` 和 ``idf.py coredump-debug``
293-
--------------------------------------------------------------
294-
295-
要获取更多有关使用方法的详情,请运行 ``idf.py coredump-info --help`` 和 ``idf.py coredump-debug --help`` 命令。
296-
297-
298292
相关文档
299293
^^^^^^^^^^^^^^^^^
300294

tools/idf_py_actions/debug_ext.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
1+
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
22
# SPDX-License-Identifier: Apache-2.0
33
import json
44
import os
@@ -464,8 +464,9 @@ def coredump_debug(action: str,
464464
{
465465
'names': ['--chip-rev'],
466466
'help': 'Specify the chip revision (e.g., 0.1). If provided, the corresponding ROM ELF file will be used '
467-
'for decoding the core dump, improving stack traces. This is only needed for core dumps from IDF '
468-
'<v5.1. Newer versions already contain chip revision information.',
467+
'for decoding the core dump, improving stack traces. This is only needed for core dumps from '
468+
'ESP-IDF older than v5.2. Newer versions already contain chip revision information.',
469+
'hidden': True,
469470
},
470471
{
471472
'names': ['--save-core', '-s'],

0 commit comments

Comments
 (0)