[Lldb-commits] [lldb] [lldb-dap] Reuse source object logics (PR #141426)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu May 29 22:35:42 PDT 2025


================
@@ -139,15 +141,16 @@ static DisassembledInstruction ConvertSBInstructionToDisassembledInstruction(
 
   disassembled_inst.instruction = std::move(instruction);
 
-  auto line_entry = addr.GetLineEntry();
+  auto source = CreateSource(addr, target);
+  auto line_entry = GetLineEntryForAddress(target, addr);
----------------
JDevlieghere wrote:

Don't use `auto` if the type is not obvious from the RHS.
```suggestion
  protocol::Source source = CreateSource(addr, target);
  SBLineEntry line_entry = GetLineEntryForAddress(target, addr);
```

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


More information about the lldb-commits mailing list