c - How to ignore interrupts with arm gdb -


i trying debug program using arm-none-eabi-gdb , step through it. there interrupt, usb0_handler, not want step while stepping program. achieve this, tried use skip, didn't work, if try skip function or skip entire file (containing interrupt). using openocd achieve remote debugging on tm4c123gh6pm.

i have reached point don't know if should define myself gdb function or missing point. here output of terminal :

(gdb) info skip num     type           enb 1       function       y   usb0_handler (gdb) c continuing.  breakpoint 2, relaytask () @ ./relay.c:191 191         nexttime = rtcgettimein(default_refresh_rate); (gdb) n usb0_handler () @ ./usbconfig.c:326 326 { (gdb) n 332     ui32status = map_usbintstatuscontrol(usb0_base); (gdb) n 337     usbdeviceinthandlerinternal(0, ui32status); (gdb) n 338 } (gdb) n  #returning @ top of usb0_handler 326 { 

when interrupt triggered while stepping, gdb stops because step ended in place didn't expect.

interrupt handlers hard deal debugger point of view because executed in new context: stack frames changed , unless gdb recognizes particular pattern in frame won't able compute complete stack trace (i.e. interrupt handler frames + regular program stack trace before interrupt.)

the simplest way out of interrupt handler plant breakpoint on last line of function, resume , continue stepping. suggested use finish command may fail depending on again quality of stack trace.

thanks gdb scriptability (in python instance) may possible automate checking pc , if pc on isr address in irq vector, fetch return address, plant temporary breakpoint , resume.