Skip to content

Commit

Permalink
Expand the esp8266 hardware debugging limitations section (esp8266#8879)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
larsks authored and hasenradball committed Nov 18, 2024
1 parent 01a26d0 commit 512dbda
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions doc/gdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -380,4 +380,33 @@ breakpoint) command in GDB while debugging instead of the more common
``break`` command, since ``thb`` will remove the breakpoint once it is
reached automatically and save you some trouble.
Because of the single hardware breakpoint limitation, you must pay careful
attention to the output from ``gdb`` when you set a breakpoint. If your
breakpoint expression matches multiple locations, as in this example:
.. code:: bash
(gdb) break loop
Breakpoint 1 at 0x40202c84: loop. (2 locations)
Then you will be unable to ``continue``:
.. code:: bash
(gdb) cont
Continuing.
Note: automatically using hardware breakpoints for read-only addresses.
Warning:
Cannot insert hardware breakpoint 1.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.
You can resolve this situation by deleting the previous breakpoint and
using a more specific breakpoint expression:
.. code:: bash
(gdb) delete
Delete all breakpoints? (y or n) y
(gdb) break mysketch.ino:loop
Breakpoint 2 at 0x40202c84: file .../mysketch.ino, line 113.

0 comments on commit 512dbda

Please sign in to comment.