OpenOCD tips and tricks?

Jiri Gaisler jiri at gaisler.se
Fri Aug 14 18:05:55 UTC 2015



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.

Jiri.

> 
>> 
>>> You point out the gdb-scripts page, which unfortunately provides 2 broken links to your FTP area.  Do you know where the scripts might have moved to?  I found this: https://git.rtems.org/chrisj/rtems-tools.git/tree/tools/gdb.  Is it the same or does it replace or
>>> supplement it?
>> 
>> It replaces the files. The scripts are built and installed when the tools are built by the RSB.
>> 
>> There is page as well ...
>> 
>> https://devel.rtems.org/wiki/Developer/Tools/RTEMS_GDB_Python
>> 
>> Maybe this page moves to the other spot.
>> 
>> This is a work in progress so fixes are welcome.
> 
> The only issue here so far is that ‘python import rtems’ dies with not finding rbtrees.py.  I saw that the wscript in that directory was missing this and some other .py files, but fixing that and trying to get it applied didn’t succeed.  I haven’t had a chance to dig deeper
> yet.
> 
> Ric _______________________________________________ users mailing list users at rtems.org http://lists.rtems.org/mailman/listinfo/users
> 



More information about the users mailing list