[Lldb-commits] [lldb] [lldb] Fix "in function" detection in "thread until" (PR #123622)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 30 05:34:19 PST 2025


================
@@ -1007,29 +1009,29 @@ class CommandObjectThreadUntil : public CommandObjectParsed {
             addr_t address =
                 line_entry.range.GetBaseAddress().GetLoadAddress(target);
             if (address != LLDB_INVALID_ADDRESS) {
-              if (fun_addr_range.ContainsLoadAddress(address, target))
+              AddressRange unused;
+              if (sc.function->GetRangeContainingLoadAddress(address, *target,
+                                                             unused))
                 address_list.push_back(address);
-              else
-                all_in_function = false;
             }
             start_idx_ptr++;
           }
         }
 
         for (lldb::addr_t address : m_options.m_until_addrs) {
-          if (fun_addr_range.ContainsLoadAddress(address, target))
+          AddressRange unused;
+          if (sc.function->GetRangeContainingLoadAddress(address, *target,
+                                                         unused))
             address_list.push_back(address);
-          else
-            all_in_function = false;
         }
 
         if (address_list.empty()) {
----------------
labath wrote:

I don't think so. address_list being empty is the "error" case. In case of success, the full list of addressed is used for stepping (line 1040)

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


More information about the lldb-commits mailing list