On Tue, Sep 14, 2010 at 11:42 PM, Nived <nive...@gmail.com> wrote:
> Hi,
> I was just about to try the patch in sparkfun.

Try it, maybe it will work for you. And might throw some light on the issue.

> Btw, in one of the mails in
> the thread you mention that you used set $pc = $pc + 4 and it worked. Where
> did you use it and why isn't that a work around ?

Well, when you receive SIGINT on a break point, and keep receiving it
with every next step, you can try to force your $pc over the
"breakpoint" which replaced your instruction in the memory. I picked a
number of 4 bytes, supposing that the replacing instruction will take
a 4 bytes. But it can take 2 bytes (for example of ARM thumb mode).
You can not know, so you might be forcing your $pc over some important
instruction and so never executing them, probably leading to a crash
or wrong behavior.

I would not call this a "workaround". I just tried it to prove if
there is a trailing bkpt instruction that rests in the I$, because I
have no means to inspect cache contents at this point. I observed
memory by dumping it and I can clearly see that original instruction
is replaced correctly by GDB on deleting breakpoint.

However, it is still a misery to me. You do not have to delete
breakpoint to step over it. Most of the time you would like to leave
it there, so it can be hit in the next pass. Why does it keep
receiving SIGINT over and over I have no idea, and I am seriously
suspecting wrong interrupt handling, but I still did not get any
confirmation on this from OpenOCD experts, nor did anyone pointed me
to the SW breakpoint handling routines in OpenOCD, so I can
investigate further.

Just to make it clear, for me HW breakpoints work OK, as they do not
use same mechanism as SW breakpoints do. Do you confirm tat it is the
same for you ?

Best regards,
Drasko
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to