diff --git a/docs/en/api-guides/jtag-debugging/tips-and-quirks.rst b/docs/en/api-guides/jtag-debugging/tips-and-quirks.rst index b0f216fea7..7a4e945932 100644 --- a/docs/en/api-guides/jtag-debugging/tips-and-quirks.rst +++ b/docs/en/api-guides/jtag-debugging/tips-and-quirks.rst @@ -112,7 +112,7 @@ On startup, debugger is issuing sequence of commands to reset the chip and halt * ``set remote hardware-watchpoint-limit 2`` — Restrict GDB to using two hardware watchpoints supported by the chip, 2 for {IDF_TARGET_NAME}. For more information see https://sourceware.org/gdb/onlinedocs/gdb/Remote-Configuration.html. * ``mon reset halt`` — reset the chip and keep the CPUs halted -* ``flushregs`` — monitor (``mon``) command can not inform GDB that the target state has changed. GDB will assume that whatever stack the target had before ``mon reset halt`` will still be valid. In fact, after reset the target state will change, and executing ``flushregs`` is a way to force GDB to get new state from the target. +* ``maintenance flush register-cache`` — monitor (``mon``) command can not inform GDB that the target state has changed. GDB will assume that whatever stack the target had before ``mon reset halt`` will still be valid. In fact, after reset the target state will change, and executing ``maintenance flush register-cache`` is a way to force GDB to get new state from the target. * ``thb app_main`` — insert a temporary hardware breakpoint at ``app_main``, put here another function name if required * ``c`` — resume the program. It will then stop at breakpoint inserted at ``app_main``. diff --git a/docs/en/api-guides/jtag-debugging/using-debugger.rst b/docs/en/api-guides/jtag-debugging/using-debugger.rst index c3c8d3b49b..c2c895ba95 100644 --- a/docs/en/api-guides/jtag-debugging/using-debugger.rst +++ b/docs/en/api-guides/jtag-debugging/using-debugger.rst @@ -77,7 +77,7 @@ After installation is complete, follow these steps to configure the debugging se :: mon reset halt - flushregs + maintenance flush register-cache set remote hardware-watchpoint-limit 2 .. note:: @@ -143,7 +143,7 @@ Command Line target remote :3333 set remote hardware-watchpoint-limit 2 mon reset halt - flushregs + maintenance flush register-cache thb app_main c diff --git a/docs/en/api-reference/system/heap_debug.rst b/docs/en/api-reference/system/heap_debug.rst index ebb168678b..7004db90e9 100644 --- a/docs/en/api-reference/system/heap_debug.rst +++ b/docs/en/api-reference/system/heap_debug.rst @@ -362,7 +362,7 @@ To gather and analyze heap trace, do the following on the host: target remote :3333 mon reset halt - flushregs + maintenance flush register-cache tb heap_trace_start commands diff --git a/docs/zh_CN/api-guides/jtag-debugging/tips-and-quirks.rst b/docs/zh_CN/api-guides/jtag-debugging/tips-and-quirks.rst index 014e84c591..db263d9ea5 100644 --- a/docs/zh_CN/api-guides/jtag-debugging/tips-and-quirks.rst +++ b/docs/zh_CN/api-guides/jtag-debugging/tips-and-quirks.rst @@ -112,7 +112,7 @@ GDB 具有 FreeRTOS 支持的 Python 扩展模块。在系统要求满足的情 * ``set remote hardware-watchpoint-limit 2`` — 限制 GDB 仅使用 {IDF_TARGET_NAME} 支持的两个硬件观察点。更多详细信息,请查阅 `GDB 配置远程目标 `_ 。 * ``mon reset halt`` — 复位芯片并使 CPU 停止运行。 -* ``flushregs`` — monitor (``mon``) 命令无法通知 GDB 目标状态已经更改,GDB 会假设在 ``mon reset halt`` 之前所有的任务堆栈仍然有效。实际上,复位后目标状态将发生变化。执行 ``flushregs`` 是一种强制 GDB 从目标获取最新状态的方法。 +* ``maintenance flush register-cache`` — monitor (``mon``) 命令无法通知 GDB 目标状态已经更改,GDB 会假设在 ``mon reset halt`` 之前所有的任务堆栈仍然有效。实际上,复位后目标状态将发生变化。执行 ``maintenance flush register-cache`` 是一种强制 GDB 从目标获取最新状态的方法。 * ``thb app_main`` — 在 ``app_main`` 处插入一个临时的硬件断点,如果有需要,可以将其替换为其他函数名。 * ``c`` — 恢复程序运行,它将会在 ``app_main`` 的断点处停止运行。 diff --git a/docs/zh_CN/api-guides/jtag-debugging/using-debugger.rst b/docs/zh_CN/api-guides/jtag-debugging/using-debugger.rst index dd04456792..ae27a4eaa5 100644 --- a/docs/zh_CN/api-guides/jtag-debugging/using-debugger.rst +++ b/docs/zh_CN/api-guides/jtag-debugging/using-debugger.rst @@ -77,7 +77,7 @@ :: mon reset halt - flushregs + maintenance flush register-cache set remote hardware-watchpoint-limit 2 .. note:: @@ -143,7 +143,7 @@ target remote :3333 set remote hardware-watchpoint-limit 2 mon reset halt - flushregs + maintenance flush register-cache thb app_main c diff --git a/docs/zh_CN/api-reference/system/heap_debug.rst b/docs/zh_CN/api-reference/system/heap_debug.rst index fb4e488561..3dff4189b8 100644 --- a/docs/zh_CN/api-reference/system/heap_debug.rst +++ b/docs/zh_CN/api-reference/system/heap_debug.rst @@ -362,7 +362,7 @@ ESP-IDF 集成了用于请求 :ref:`堆内存信息 `、:ref:` target remote :3333 mon reset halt - flushregs + maintenance flush register-cache tb heap_trace_start commands diff --git a/examples/system/sysview_tracing/gdbinit b/examples/system/sysview_tracing/gdbinit index e3ef51a769..114bcb23c4 100644 --- a/examples/system/sysview_tracing/gdbinit +++ b/examples/system/sysview_tracing/gdbinit @@ -2,7 +2,7 @@ set pagination off target remote :3333 mon reset halt -flushregs +maintenance flush register-cache b app_main commands diff --git a/examples/system/sysview_tracing/pytest_sysview_tracing.py b/examples/system/sysview_tracing/pytest_sysview_tracing.py index 92e561b992..a970480d3f 100644 --- a/examples/system/sysview_tracing/pytest_sysview_tracing.py +++ b/examples/system/sysview_tracing/pytest_sysview_tracing.py @@ -22,7 +22,7 @@ def test_examples_sysview_tracing(dut: IdfDut) -> None: dut.expect(re.compile(rb'example: Task\[0x3[0-9A-Fa-f]+\]: received event \d+'), timeout=30) dut.gdb.write('mon reset halt') - dut.gdb.write('flushregs') + dut.gdb.write('maintenance flush register-cache') dut.gdb.write('b app_main') dut.gdb.write('commands', non_blocking=True) diff --git a/examples/system/sysview_tracing_heap_log/gdbinit b/examples/system/sysview_tracing_heap_log/gdbinit index 94251ae39f..e65c35f147 100644 --- a/examples/system/sysview_tracing_heap_log/gdbinit +++ b/examples/system/sysview_tracing_heap_log/gdbinit @@ -2,7 +2,7 @@ set pagination off target remote :3333 mon reset halt -flushregs +maintenance flush register-cache tb heap_trace_start commands diff --git a/examples/system/sysview_tracing_heap_log/pytest_sysview_tracing_heap_log.py b/examples/system/sysview_tracing_heap_log/pytest_sysview_tracing_heap_log.py index bbc4bd281b..1681c5a18c 100644 --- a/examples/system/sysview_tracing_heap_log/pytest_sysview_tracing_heap_log.py +++ b/examples/system/sysview_tracing_heap_log/pytest_sysview_tracing_heap_log.py @@ -16,7 +16,7 @@ def test_examples_sysview_tracing_heap_log(idf_path: str, dut: IdfDut) -> None: trace_log = os.path.join(os.path.dirname(dut.gdb._logfile), 'heap_log.svdat') # pylint: disable=protected-access dut.gdb.write('mon reset halt') - dut.gdb.write('flushregs') + dut.gdb.write('maintenance flush register-cache') dut.gdb.write('tb heap_trace_start') dut.gdb.write('commands', non_blocking=True) diff --git a/tools/esp_app_trace/test/sysview/gdbinit b/tools/esp_app_trace/test/sysview/gdbinit index 137182c221..50dffef2d8 100644 --- a/tools/esp_app_trace/test/sysview/gdbinit +++ b/tools/esp_app_trace/test/sysview/gdbinit @@ -1,7 +1,7 @@ target remote :3333 mon reset halt -flushregs +maintenance flush register-cache b heap_trace_start commands diff --git a/tools/idf_py_actions/debug_ext.py b/tools/idf_py_actions/debug_ext.py index 3b3dc98554..673496030a 100644 --- a/tools/idf_py_actions/debug_ext.py +++ b/tools/idf_py_actions/debug_ext.py @@ -54,7 +54,7 @@ GDBINIT_CONNECT = ''' # Connect to the default openocd-esp port and break on app_main() target remote :3333 monitor reset halt -flushregs +maintenance flush register-cache thbreak app_main continue '''