[all-commits] [llvm/llvm-project] f0d7d8: [lldb-dap] Allow empty memory reference in disasse...

Sergei Druzhkov via All-commits all-commits at lists.llvm.org
Fri Dec 12 01:33:29 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f0d7d833f53b5b22ada5ba8db325f6c0f7bd7b87
      https://github.com/llvm/llvm-project/commit/f0d7d833f53b5b22ada5ba8db325f6c0f7bd7b87
  Author: Sergei Druzhkov <serzhdruzhok at gmail.com>
  Date:   2025-12-12 (Fri, 12 Dec 2025)

  Changed paths:
    M lldb/test/API/tools/lldb-dap/disassemble/TestDAP_disassemble.py
    M lldb/tools/lldb-dap/Handler/DisassembleRequestHandler.cpp
    M lldb/tools/lldb-dap/JSONUtils.cpp
    M lldb/tools/lldb-dap/JSONUtils.h
    M lldb/tools/lldb-dap/Protocol/ProtocolRequests.cpp

  Log Message:
  -----------
  [lldb-dap] Allow empty memory reference in disassemble arguments (#162517)

This patch implements a workaround for a VSCode bug that causes it to
send disassemble requests with empty memory reference. You can find more
detailed description
[here](https://github.com/microsoft/vscode/pull/270361). I propose to
allow empty memory reference and return invalid instructions when this
occurs.

Error log example:
```
1759923554.517830610 (stdio) --> {"command":"disassemble","arguments":{"memoryReference":"","offset":0,"instructionOffset":-50,"instructionCount":50,"resolveSymbols":true},"type":"request","seq":3}
1759923554.518007517 (stdio) queued (command=disassemble seq=3)
1759923554.518254757 (stdio) <-- {"body":{"error":{"format":"invalid arguments for request 'disassemble': malformed memory reference at arguments.memoryReference\n{\n  \"instructionCount\": 50,\n  \"instructionOffset\": -50,\n  \"memoryReference\": /* error: malformed memory reference */ \"\",\n  \"offset\": 0,\n  \"resolveSymbols\": true\n}","id":3,"showUser":true}},"command":"disassemble","request_seq":3,"seq":0,"success":false,"type":"response"}
```

I am not sure that we should add workaround here when bug on VSCode
side, but I think this bug affects our users. WDYT?



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list