Просмотр исходного кода

Merge branch 'docs/watchpoints_config_gdbinit' into 'master'

docs: Adds watchpoints limit configuration to example gdbinit

See merge request idf/esp-idf!3502
Ivan Grokhotkov 7 лет назад
Родитель
Сommit
e2fbee9f9f

BIN
docs/_static/hw-debugging-startup-tab.jpg


+ 1 - 0
docs/en/api-guides/jtag-debugging/tips-and-quirks.rst

@@ -99,6 +99,7 @@ What is the meaning of debugger's startup commands?
 
 
 On startup, debugger is issuing sequence of commands to reset the chip and halt it at specific line of code. This sequence (shown below) is user defined to pick up at most convenient / appropriate line and start debugging. 
 On startup, debugger is issuing sequence of commands to reset the chip and halt it at specific line of code. This sequence (shown below) is user defined to pick up at most convenient / appropriate line and start debugging. 
 
 
+* ``set remote hardware-watchpoint-limit 2`` — Restrict GDB to using two hardware watchpoints supported by ESP32. For more information see https://sourceware.org/gdb/onlinedocs/gdb/Remote-Configuration.html.
 * ``mon reset halt`` — reset the chip and keep the CPUs halted
 * ``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.
 * ``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.
 * ``thb app_main`` — insert a temporary hardware breakpoint at ``app_main``, put here another function name if required
 * ``thb app_main`` — insert a temporary hardware breakpoint at ``app_main``, put here another function name if required

+ 8 - 2
docs/en/api-guides/jtag-debugging/using-debugger.rst

@@ -48,7 +48,13 @@ Once installation is complete, configure debugging session following steps below
 
 
         Configuration of GDB Hardware Debugging - Debugger tab
         Configuration of GDB Hardware Debugging - Debugger tab
 
 
-8.  The last tab to that requires changing of default configuration is "Startup". Under "Initialization Commands" uncheck "Reset and Delay (seconds)" and "Halt"". Then, in entry field below, type ``mon reset halt`` and ``flushregs`` (in two separate lines).
+8.  The last tab to that requires changing of default configuration is "Startup". Under "Initialization Commands" uncheck "Reset and Delay (seconds)" and "Halt"". Then, in entry field below, enter the following lines:
+
+    ::
+
+        mon reset halt
+        flushregs
+        set remote hardware-watchpoint-limit 2
 
 
     .. note::
     .. note::
         If you want to update image in the flash automatically before starting new debug session add the following lines of commands at the beginning of "Initialization Commands" textbox::
         If you want to update image in the flash automatically before starting new debug session add the following lines of commands at the beginning of "Initialization Commands" textbox::
@@ -56,7 +62,6 @@ Once installation is complete, configure debugging session following steps below
             mon reset halt
             mon reset halt
             mon program_esp32 ${workspace_loc:blink/build/blink.bin} 0x10000 verify
             mon program_esp32 ${workspace_loc:blink/build/blink.bin} 0x10000 verify
 
 
-
     For description of ``program_esp32`` command see :ref:`jtag-upload-app-debug`.
     For description of ``program_esp32`` command see :ref:`jtag-upload-app-debug`.
 
 
 9.  Under "Load Image and Symbols" uncheck "Load image" option. 
 9.  Under "Load Image and Symbols" uncheck "Load image" option. 
@@ -112,6 +117,7 @@ Command Line
     ::
     ::
 
 
         target remote :3333
         target remote :3333
+        set remote hardware-watchpoint-limit 2
         mon reset halt
         mon reset halt
         flushregs
         flushregs
         thb app_main
         thb app_main