Reputation: 191
I am debugging a remote target and it seems like the software breakpoints are not working, however hardware breakpoints do work.
I want to be able to use the stepi command - but gdb seems to insist on using software breakpoints.
Is there a way to force gdb to use hardware breakpoints for stepi?
The target is an ARM STM32 chip debugged through a blackmagic probe.
Upvotes: 5
Views: 1131
Reputation: 191
One solution is to mark the memory region as read only which forces gdb to use hw breakpoints
I.e if my code is running on the addresses 0x8000000-0x8010000 i run
mem 0x8000000 0x8010000 ro
Upvotes: 4