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

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Sun May 18 17:06:26 PDT 2025


================
@@ -627,6 +627,60 @@ struct InstructionBreakpoint {
 bool fromJSON(const llvm::json::Value &, InstructionBreakpoint &,
               llvm::json::Path);
 
+/// Properties of a single disassembled instruction, returned by `disassemble`
+/// request.
+struct DisassembledInstruction {
+  enum PresentationHint : unsigned {
+    eSourcePresentationHintNormal,
+    eSourcePresentationHintInvalid,
+  };
+
+  /// The address of the instruction. Treated as a hex value if prefixed with
+  /// `0x`, or as a decimal value otherwise.
+  std::string address;
----------------
ashgti wrote:

I wonder, should we use an `lldb::addr_t` for the type here and encode it to a hex string in the `toJSON()`?

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


More information about the lldb-commits mailing list