[Lldb-commits] [PATCH] D12184: [MIPS] Avoid breakpoint in delay slot
Bhushan Attarde via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 19 22:46:09 PDT 2015
bhushan created this revision.
bhushan added a reviewer: clayborg.
bhushan added subscribers: lldb-commits, jaydeep, sagar, nitesh.jain, mohit.bhakkad.
bhushan set the repository for this revision to rL LLVM.
In MIPS, when a breakpoint is hit in a delay slot then the PC points to the previous branch/jump instruction. In this case, CAUSE.BD bit is set and we can correct the PC accordingly.
However doing a single step at this point will continue execution from the current PC and not from the target of previous branch/jump instruction.
Solution to this is to not allow breakpoint in a delay slot and move it to previous branch/jump instruction (which will have same effect).
When user tries to set breakpoint by address then this patch checks if the instruction at that address is a delay slot instruction and if it is then the breakpoint is moved to its previous instruction.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 14130 bytes
Desc: not available
More information about the lldb-commits