In case some one looks at it. I've made below change ~~~ --- a/src/target/breakpoints.c +++ b/src/target/breakpoints.c @@ -300,6 +300,7 @@ static int breakpoint_remove_internal(struct target *target, target_addr_t addre
while (breakpoint) { if ((breakpoint->address == address) || + (breakpoint->address == address + 1) || (breakpoint->address == 0 && breakpoint->asid == address)) break; breakpoint = breakpoint->next; ~~~ and can step after the breakpoint is hit and don't see the issue anymore. In my case breakpoint->length is 0x5. I suspect there is an issue with micromips breakpoints since LSB is 1. --- ** [tickets:#371] Can't step after hitting a breakpoint. micromips ISA.** **Status:** new **Milestone:** 0.10.0 **Created:** Tue Nov 29, 2022 04:36 PM UTC by Nima **Last Updated:** Tue Nov 29, 2022 04:36 PM UTC **Owner:** nobody **Attachments:** - [debug.cfg](https://sourceforge.net/p/openocd/tickets/371/attachment/debug.cfg) (1.1 kB; application/octet-stream) - [image.dump](https://sourceforge.net/p/openocd/tickets/371/attachment/image.dump) (3.1 kB; application/octet-stream) - [openocd_log_d3.txt](https://sourceforge.net/p/openocd/tickets/371/attachment/openocd_log_d3.txt) (32.8 kB; text/plain) Hi, have issues with stepping to next instruction (or continue) when hitting a break point on micromips architecture with openOCD. It keeps hitting the same break point and does not go to next instruction. Here is my setup: * processor: microaptive mips core pic32mm0256gpm064. * compiler: mips-mti-elf-gcc * debugger: mips-gdb * openOCD version 0.11.0 * dongle: bus blaster v3 I am compiling with -mmicromips option. Only the 4-wire JTAG pins: TDO, TDI, TMS, TCK are connected and SRST and TRST are not connected. So far I am able to bring up openOCD server and connect to it through GDB and step through the code. However, when adding a hw break point (the only option I have) I face this issue. It hits the breakpoint as expected but cannot continue out of it. Have attached . cfg config file I use for openOCD and verbose openOCD log as well as my image dump file. openOCD log ~~~ openocd -f debugger.cfg Open On-Chip Debugger 0.11.0 Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : clock speed 1500 kHz Info : JTAG tap: pic32mm0256gpm064.cpu tap/device found: 0x4771e053 (mfg: 0x029 (MicrochipTechnology), part: 0x771e, ver: 0x4) Info : starting gdb server for pic32mm0256gpm064.cpu on 3333 Info : Listening on port 3333 for gdb connections MICRO MIPS32 only implemented target halted in MICRO MIPS32 mode due to debug-request, pc: 0xbfc00087 Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : accepting 'gdb' connection on tcp/3333 ~~~ gdb commands: ~~~ Reading symbols from image.hex... 0xbfc00087 in main () at main.c:17 17 timer++; (gdb) hbreak toggleLed Hardware assisted breakpoint 1 at **0xbfc000eb**: file main.c, line 43. (gdb) c Continuing. Breakpoint 1, toggleLed () at main.c:43 43 reg_p = (uint32_t*) 0xBF802EE0; (gdb) n Breakpoint 1, toggleLed () at main.c:43 43 reg_p = (uint32_t*) 0xBF802EE0; (gdb) n Breakpoint 1, toggleLed () at main.c:43 43 reg_p = (uint32_t*) 0xBF802EE0; (gdb) n Breakpoint 1, toggleLed () at main.c:43 43 reg_p = (uint32_t*) 0xBF802EE0; (gdb) ~~~ It does not come out of break point unless I delete the break point with: ~~~ monitor rbp all ~~~ Also I notice this error when hitting break point ~~~ Error: no breakpoint at address 0xbfc000ea found ~~~ One thing to note is that breakpoint address is **0xbfc000eb** not **0xbfc000ea** (in the log), I guess LSB should be 1 because of micromips ISA. --- Sent from sourceforge.net because openocd-devel@lists.sourceforge.net is subscribed to https://sourceforge.net/p/openocd/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/openocd/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.