On Tue, Nov 24, 2009 at 10:11 PM, Andreas Fritiofson
<andreas.fritiof...@gmail.com> wrote:
> On Tue, Nov 24, 2009 at 1:21 AM, Thomas Kindler <mail+...@t-kindler.de> wrote:
>> Hi!
>>
>> When single stepping on a STM32, I'm constantly caught in interrupt
>> handler code.  This makes debugging almost impossible for non-trivial
>> programs with timer and other peripheral interrupts.
>>
>> I have seen that there's an "cortex_m3 maskisr on/off" command, but it's
>> awkward to use from eclipse.  There seems to be no way to issue monitor
>> commands to OpenOCD during a debug session, or even bind commands to a
>> GUI button (perhaps a nice feature for Zylin-CDT?).
>>
>> Is there a good way to tell OpenOCD to mask ISRs after hitting a
>> breakpoint/single-stepping, but re-enable interrupts on run?
>>
>
> Yes. Use "User-defined Command Hooks":
> http://sourceware.org/gdb/current/onlinedocs/gdb/Hooks.html#Hooks
>
> Set up your hooks such that "mon cortex_m3 maskisr on" is executed
> before any step command, and "mon cortex_m3 maskisr off" is executed
> after.
>
> define hook-step
> mon cortex_m3 maskisr on
> end
>
> define hookpost-step
> mon cortex_m3 maskisr off
> end
>
> Same for the next command and maybe others too (stepi, nexti). Only
> problem is that openocd is spamming quite a lot at every step.

So does this mean that we should probably remove some hooks in OpenOCD
and add a tip?


-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to