On Fri, Mar 23, 2012 at 10:59 AM, Justin Drake <drakefjus...@gmail.com> wrote:
> Thanks Andreas, that was helpful. But I do not understand how this is
> harmless. If GDB does not perform exception return then I cannot
> follow the execution of my program by doing the command ni (next
> instruction) continuously.

GDB never performs exception return, the core does it. GDB is just not
aware beforehand where the PC will end up after stepping the 'bx lr'
instruction in an exception handler. The core happily executes the
instruction though, performs exception unstacking and so on, and
afterwards GDB finds out what really happened.

The only limitation I'm aware of is that GDB can't show the stack
trace properly, it doesn't show the stack frames below an exception
frame. Which also means GDB can't step out of an exception handler
(finish) because it doesn't know where to put the breakpoint. Single
stepping works fine though. These limitations are in GDB, not OpenOCD,
which is why I said that OpenOCD's "error" message really is harmless.

Of course, we could probably fake the reply to GDB when we detect it's
tracing the stack and fixup the values so GDB can make sense of it,
but that would be outright lying.

/Andreas

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to