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

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue May 20 08:10:49 PDT 2025


================
@@ -19,19 +19,46 @@ namespace lldb_dap {
 llvm::Expected<protocol::BreakpointLocationsResponseBody>
 BreakpointLocationsRequestHandler::Run(
     const protocol::BreakpointLocationsArguments &args) const {
-  std::string path = args.source.path.value_or("");
   uint32_t start_line = args.line;
   uint32_t start_column = args.column.value_or(LLDB_INVALID_COLUMN_NUMBER);
   uint32_t end_line = args.endLine.value_or(start_line);
   uint32_t end_column =
       args.endColumn.value_or(std::numeric_limits<uint32_t>::max());
 
+  // Find all relevant lines & columns.
+  std::vector<std::pair<uint32_t, uint32_t>> locations;
+  if (args.source.sourceReference)
+    locations = GetAssemblyBreakpointLocations(*args.source.sourceReference,
+                                               start_line, end_line);
+  else {
----------------
JDevlieghere wrote:

```suggestion
  if (args.source.sourceReference) {
    locations = GetAssemblyBreakpointLocations(*args.source.sourceReference,
                                               start_line, end_line);
  } else {
```

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


More information about the lldb-commits mailing list