[Lldb-commits] [lldb] [lldb-dap] DisassembleRequestHandler: use a better invalid instruction (PR #141463)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue May 27 10:19:21 PDT 2025


================
@@ -847,8 +847,15 @@ bool fromJSON(const llvm::json::Value &Params, DisassembledInstruction &DI,
 }
 
 llvm::json::Value toJSON(const DisassembledInstruction &DI) {
-  llvm::json::Object result{{"address", "0x" + llvm::utohexstr(DI.address)},
-                            {"instruction", DI.instruction}};
+  llvm::json::Object result{{"instruction", DI.instruction}};
+  if (DI.address == LLDB_INVALID_ADDRESS) {
+    // VSCode has explicit comparisons to the string "-1" in order to check for
----------------
JDevlieghere wrote:

Nit: `VS Code` not `VSCode`. 
```suggestion
    // VS Code has explicit comparisons to the string "-1" in order to check for
```

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


More information about the lldb-commits mailing list