[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.

Repository:
  rL LLVM

http://reviews.llvm.org/D12184

Files:
  include/lldb/Core/Disassembler.h
  include/lldb/Target/Target.h
  source/Core/Disassembler.cpp
  source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
  source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
  source/Target/Target.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12184.32661.patch
Type: text/x-patch
Size: 14130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150820/97fa96b3/attachment.bin>


More information about the lldb-commits mailing list