cortex-debug: How to insert hardware breakpoints?
I use the following configuration,But the gui can still only set software breakpoints。Unless I use the gdb command hbreak, launch.json
"hardwareBreakpoints": {
"require": true,
"limit": 2
}
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 28 (1 by maintainers)
Hi, haneef:
I understand your difficulties. From my perspective, I don’t think you need to do so complicated management. Why do you do so complicated management, only to provide more breakpoints? In the case of problems (such as my cache consistency problem), being able to use is what I am concerned about.
We can make things simple and provide an option for all gdb breakpoints to become hardware breakpoints. Others may share the same opinion.
In addition, adding breakpoints through gdb is a way to solve the problem, but I think it is not very convenient, even through scripts.
I use openocd as gdb server and find the gdb_breakpoint_override command of openocd. Openocd can convert all gdb breakpoints into hardware breakpoints. I add this command to the openocd.cfg, and my project runs very well even cache enabled. However, I am not sure whether jlink and pyocd can do the same. I think it is better to do it on gdb.
@haneefdm