llvm-project
f0d7d833 - [lldb-dap] Allow empty memory reference in disassemble arguments (#162517)

Commit
131 days ago
[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?
Author
Parents
Loading