[Lldb-commits] [lldb] Handle accelerated ObjC Class method dispatchs. (PR #188392)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 24 21:55:41 PDT 2026


================
@@ -813,24 +813,37 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(Thread &thread,
   Target &target = thread.GetProcess()->GetTarget();
   llvm::StringRef sym_name;
   const DispatchFunction *this_dispatch = nullptr;
-
+  bool in_sel_stub = false;
+  bool in_class_sel_stub = false;
+  
   if (target.ResolveLoadAddress(curr_pc, func_addr)) {
     const Symbol *curr_sym = func_addr.CalculateSymbolContextSymbol();
     if (curr_sym)
       sym_name = curr_sym->GetName().GetStringRef();
 
-    if (!sym_name.empty() && !sym_name.consume_front("objc_msgSend$"))
-      sym_name = {};
-    else
-      this_dispatch = &sel_stub_dispatch;
+    if (!sym_name.empty())
+      if (sym_name.consume_front("objc_msgSend$")) {
----------------
jasonmolenda wrote:

"Returns true if this [StringRef](https://llvm.org/doxygen/classllvm_1_1StringRef.html) has the given prefix and removes that prefix."

won't this make the second `sym_name` test never succeed.

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


More information about the lldb-commits mailing list