Skip to content

Commit 6ad9bf3

Browse files
authored
Expand the esp8266 hardware debugging limitations section (#8879)
It's trivial to run into a problem caused by the single hardware breakpoint limitation, but the existing documentation doesn't explicitly address this situation (and search results for the error message aren't particularly helpful). This commit updates the documentation with an explicit example of what happens when a breakpoint expression matches multiple locations, along with a possible workaround.
1 parent 503502f commit 6ad9bf3

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Diff for: doc/gdb.rst

+29
Original file line numberDiff line numberDiff line change
@@ -380,4 +380,33 @@ breakpoint) command in GDB while debugging instead of the more common
380380
``break`` command, since ``thb`` will remove the breakpoint once it is
381381
reached automatically and save you some trouble.
382382
383+
Because of the single hardware breakpoint limitation, you must pay careful
384+
attention to the output from ``gdb`` when you set a breakpoint. If your
385+
breakpoint expression matches multiple locations, as in this example:
383386
387+
.. code:: bash
388+
389+
(gdb) break loop
390+
Breakpoint 1 at 0x40202c84: loop. (2 locations)
391+
392+
Then you will be unable to ``continue``:
393+
394+
.. code:: bash
395+
396+
(gdb) cont
397+
Continuing.
398+
Note: automatically using hardware breakpoints for read-only addresses.
399+
Warning:
400+
Cannot insert hardware breakpoint 1.
401+
Could not insert hardware breakpoints:
402+
You may have requested too many hardware breakpoints/watchpoints.
403+
404+
You can resolve this situation by deleting the previous breakpoint and
405+
using a more specific breakpoint expression:
406+
407+
.. code:: bash
408+
409+
(gdb) delete
410+
Delete all breakpoints? (y or n) y
411+
(gdb) break mysketch.ino:loop
412+
Breakpoint 2 at 0x40202c84: file .../mysketch.ino, line 113.

0 commit comments

Comments
 (0)