[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #99736)

Robert O'Callahan via lldb-commits lldb-commits at lists.llvm.org
Sat Jul 20 05:58:50 PDT 2024


================
@@ -1881,18 +1970,24 @@ ThreadSP ProcessGDBRemote::SetThreadStopInfo(
           handled = true;
         }
       } else if (!signo) {
-        addr_t pc = thread_sp->GetRegisterContext()->GetPC();
-        lldb::BreakpointSiteSP bp_site_sp =
-            thread_sp->GetProcess()->GetBreakpointSiteList().FindByAddress(pc);
-
-        // If a thread is stopped at a breakpoint site, set that as the stop
-        // reason even if it hasn't executed the breakpoint instruction yet.
-        // We will silently step over the breakpoint when we resume execution
-        // and miss the fact that this thread hit the breakpoint.
-        if (bp_site_sp && bp_site_sp->ValidForThisThread(*thread_sp)) {
-          thread_sp->SetStopInfo(StopInfo::CreateStopReasonWithBreakpointSiteID(
-              *thread_sp, bp_site_sp->GetID()));
+        if (m_last_run_direction == eRunReverse) {
----------------
rocallahan wrote:

Actually we don't need this code so I've taken it out.

(The latest version of rr reports the history boundary stop using `replaylog`  --- more or less standard, gdb has supported it for 16 years --- so this "signal 0 when reverse continuing" case would only be hit when using LLDB with non-latest rr, which I don't think we need to care about.)

https://github.com/llvm/llvm-project/pull/99736


More information about the lldb-commits mailing list