[Lldb-commits] [lldb] [lldb-dap] Migrate disassemble request to structured handler (PR #140482)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon May 19 09:06:11 PDT 2025
================
@@ -726,6 +726,41 @@ struct SetDataBreakpointsResponseBody {
};
llvm::json::Value toJSON(const SetDataBreakpointsResponseBody &);
+/// Arguments to `disassemble` request.
+struct DisassembleArguments {
+ /// Memory reference to the base location containing the instructions to
+ /// disassemble.
+ std::string memoryReference;
+
+ /// Offset (in bytes) to be applied to the reference location before
+ /// disassembling. Can be negative.
+ std::optional<int64_t> offset;
+
+ /// Offset (in instructions) to be applied after the byte offset (if any)
+ /// before disassembling. Can be negative.
+ std::optional<int64_t> instructionOffset;
+
+ /// Number of instructions to disassemble starting at the specified location
+ /// and offset.
+ /// An adapter must return exactly this number of instructions - any
+ /// unavailable instructions should be replaced with an implementation-defined
+ /// 'invalid instruction' value.
+ uint32_t instructionCount;
+
+ /// If true, the adapter should attempt to resolve memory addresses and other
+ /// values to symbolic names.
+ std::optional<bool> resolveSymbols;
+};
+bool fromJSON(const llvm::json::Value &, DisassembleArguments &,
+ llvm::json::Path);
+
+/// Response to `disassemble` request.
+struct DisassembleResponseBody {
+ /// The list of disassembled instructions.
+ std::vector<DisassembledInstruction> instructions;
+};
+llvm::json::Value toJSON(const DisassembleResponseBody &);
----------------
JDevlieghere wrote:
Add the fromJSON forward declaration.
https://github.com/llvm/llvm-project/pull/140482
More information about the lldb-commits
mailing list