[Lldb-commits] [lldb] [lldb] Change lldb's breakpoint handling behavior (PR #96260)

via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 12 11:18:30 PDT 2024


================
@@ -377,6 +380,26 @@ class Thread : public std::enable_shared_from_this<Thread>,
 
   virtual void SetQueueLibdispatchQueueAddress(lldb::addr_t dispatch_queue_t) {}
 
+  /// When a thread stops at an enabled BreakpointSite that has not exectued,
+  /// the Process plugin should call SetThreadStoppedAtUnexecutedBP(pc).
+  /// If that BreakpointSite was actually triggered (the instruction was
+  /// executed, for a software breakpoint), regardless of wheether the
+  /// breakpoint is valid for this thread, SetThreadHitBreakpointSite()
+  /// should be called to clear that state.
----------------
jimingham wrote:

"to clear that state" is confusing.  A thread could stop because it executed the breakpoint trap without ever having stopped "with the PC at the unexecuted trap".  That's actually the more common case.  So you won't be clearing that state usually.  Maybe "to clear that state" -> "to record that fact".

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


More information about the lldb-commits mailing list