gdb cannot finish from cortex-m exception (interrupt) handler
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
New
|
Undecided
|
Unassigned |
Bug Description
Assuming I have a following stack frame, I expect finish command would execute until return to 0x3098, but gdb will try to set hardware breakpoint at 0xfffffffc and it fails.
0x000030fa in ?? ()
(gdb) bt
#0 0x000030fa in ?? ()
#1 <signal handler called>
#2 0x00003098 in ?? ()
#3 0x00123c4a in main ()
(gdb) up
#1 <signal handler called>
(gdb) info frame
Stack level 1, frame at 0x16fff8:
pc = 0xfffffffd; saved pc = 0x3098
called by frame at 0x16fff8, caller of frame at 0x16ffd8
Arglist at unknown address.
Locals at unknown address, Previous frame's sp is 0x16fff8
Saved registers:
r0 at 0x16ffd8, r1 at 0x16ffdc, r2 at 0x16ffe0, r3 at 0x16ffe4, r12 at 0x16ffe8, lr at 0x16ffec, pc at 0x16fff0, xpsr at 0x16fff4
(gdb) down
#0 0x000030fa in ?? ()
(gdb) set debug remote 1
(gdb) finish
Run till exit from #0 0x000030fa in ?? ()
Sending packet: $Z1,fffffffc,
Packet Z1 (hardware-
Warning:
Cannot insert hardware breakpoint 0.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/
This needs more information to reproduce this behaviour. Can you please share a small test case and also mention which version of gdb you're using and how the binary image was built?