[Lldb-commits] [lldb] [lldb] Change lldb's breakpoint handling behavior (PR #96260)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 19 11:47:54 PDT 2024
================
@@ -577,15 +577,18 @@ StopInfoSP StopInfoMachException::CreateStopReasonWithMachException(
ProcessSP process_sp(thread.GetProcess());
RegisterContextSP reg_ctx_sp(thread.GetRegisterContext());
- BreakpointSiteSP bp_site_sp;
- addr_t pc = LLDB_INVALID_ADDRESS;
- if (reg_ctx_sp) {
- pc = reg_ctx_sp->GetPC();
- BreakpointSiteSP bp_site_sp =
- process_sp->GetBreakpointSiteList().FindByAddress(pc);
- if (bp_site_sp && bp_site_sp->IsEnabled())
- thread.SetThreadStoppedAtUnexecutedBP(pc);
- }
+ // Caveat: with x86 KDP if we've hit a breakpoint, the pc we
+ // receive is past the breakpoint instruction.
+ // If we have a breakpoint at 0x100 (on a 1-byte original instruction)
+ // and at 0x101, we hit the 0x100 breakpoint and the pc is
----------------
jimingham wrote:
and at 0x101 -> and are stopped at 0x101
https://github.com/llvm/llvm-project/pull/96260
More information about the lldb-commits
mailing list