OpenOCD tips and tricks?

Chris Johns chrisj at rtems.org
Mon Aug 17 02:37:58 UTC 2015


On 15/08/2015 4:05 am, Jiri Gaisler wrote:
> 
> 
> On 14/08/15 18:21, Ric Claus wrote:
> 
>> Unfortunately, now I’ve run into openocd’s software breakpoints being ignored.  Hardware breakpoints, however, do work.  Curiously, gdb’s breakpoints do kind of work, and these seem to translate to software openocd breakpoints.  I say “kind of” because gdb’s step, next and
>> continue commands after having stopped at a breakpoint don’t work.  The PC just remains fixed at the breakpoint address.  I’ve been digging through the mailing lists, looking at the gdbserver transactions and openocd’s diagnostics trying to find a clue, but so far have not
>> come up with anything.  Do you have any ideas?
> 
> 
> Sounds like the software breakpoint instruction is stuck in the instruction cache.
> After hitting a software breakpoint, the gdb back-end (openocd) must synchronize
> the icache, typically by flushing the current L1 icache line. I don't think the
> ARM processor in Zynq has full cache coherence between L1 i- and d-caches in hardware.
> Note that line flushing might also be necessary when the breakpoint is inserted,
> for the case when the breakpoint address is already cached when inserted.
> 

I agree this is what is happening but I suspect it is the L2 cache. I
have not had time to take a look. The L1 cache has support in OpenOCD
and I have not seen any L2 support.

Chris



More information about the users mailing list