Content originally posted in LPCWare by miccio on Wed May 25 04:21:24 MST 2016
Hello dear LPC users,
I would like to put breakpoints inside some templated C++ functions.
However, when I attempt to do so, I get the following error:
Quote:
15: Target error from Set break/watch
15: Target error from Set break/watch
Unable to set an execution break - no resource available.
Quote:
Error in final launch sequence
Failed to execute MI command:
-exec-continue
Error message from debugger back end:
Warning:\nCannot insert hardware breakpoint 2.\n
Cannot insert hardware breakpoint 2.\n
Cannot insert hardware breakpoint 2.\n
Cannot insert hardware breakpoint 2.\n
Cannot insert hardware breakpoint 2.\n
Cannot insert hardware breakpoint 1.\n
Cannot insert hardware breakpoint 3.\n
Could not insert hardware breakpoints:\nYou may have requested too many hardware breakpoints/watchpoints.\n
Warning:\nCannot insert hardware breakpoint 2.\n
Cannot insert hardware breakpoint 2.\n
Cannot insert hardware breakpoint 2.\n
Cannot insert hardware breakpoint 2.\n
Cannot insert hardware breakpoint 2.\n
Cannot insert hardware breakpoint 1.\n
Cannot insert hardware breakpoint 3.\n
Could not insert hardware breakpoints:\nYou may have requested too many hardware breakpoints/watchpoints.\n
I suspect that this is either because the incriminating function is defined in a header file or because dbg is forced to put a breakpoint in each specialisation of the templated function (I indeed declare several instances with different typenames).
Is there a way to limit the breakpoint insertion to a specific instance of the templated function, perhaps using the mangled names?
Thanks in advance!