[Lldb-commits] [lldb] [lldb-dap] Migrate disassemble request to structured handler (PR #140482)

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


================
@@ -132,19 +56,14 @@ void DisassembleRequestHandler::operator()(
     }
   }
 
-  lldb::SBInstructionList insts =
-      dap.target.ReadInstructions(addr, inst_count, flavor_string.c_str());
+  lldb::SBInstructionList insts = dap.target.ReadInstructions(
+      addr, args.instructionCount, flavor_string.c_str());
 
-  if (!insts.IsValid()) {
-    response["success"] = false;
-    response["message"] = "Failed to find instructions for memory address.";
-    dap.SendJSON(llvm::json::Value(std::move(response)));
-    return;
-  }
+  if (!insts.IsValid())
+    return llvm::make_error<DAPError>(
+        "Failed to find instructions for memory address.");
 
-  const bool resolveSymbols =
-      GetBoolean(arguments, "resolveSymbols").value_or(false);
-  llvm::json::Array instructions;
+  const bool resolveSymbols = args.resolveSymbols.value_or(false);
----------------
eronnen wrote:

:100: 

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


More information about the lldb-commits mailing list