[Lldb-commits] [lldb] [lldb-dap] assembly breakpoints (PR #139969)

Ely Ronnen via lldb-commits lldb-commits at lists.llvm.org
Mon May 19 12:28:32 PDT 2025


================
@@ -72,21 +99,29 @@ BreakpointLocationsRequestHandler::Run(
     }
   }
 
-  // The line entries are sorted by addresses, but we must return the list
-  // ordered by line / column position.
-  std::sort(locations.begin(), locations.end());
-  locations.erase(llvm::unique(locations), locations.end());
+  return locations;
+}
 
-  std::vector<protocol::BreakpointLocation> breakpoint_locations;
-  for (auto &l : locations) {
-    protocol::BreakpointLocation lc;
-    lc.line = l.first;
-    lc.column = l.second;
-    breakpoint_locations.push_back(std::move(lc));
+std::vector<std::pair<uint32_t, uint32_t>>
+BreakpointLocationsRequestHandler::GetAssemblyBreakpointLocations(
+    int64_t sourceReference, uint32_t start_line, uint32_t end_line) const {
+  std::vector<std::pair<uint32_t, uint32_t>> locations;
+  lldb::SBAddress address(sourceReference, dap.target);
+  if (!address.IsValid())
+    return locations;
+
+  lldb::SBSymbol symbol = address.GetSymbol();
----------------
eronnen wrote:

@da-viper not sure I understand, why is `GetFunction` needed before getting the symbol?

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


More information about the lldb-commits mailing list