The very first run I did with lldb-dap (linux) caused a core dump. Is this usable yet? It was also awkward getting this to run. I’m writing an IDE and I’d like to support native code on windows and mac. I have gdb running on linux just fine but gdb doesn’t run on windows (with clang compiled binaries) or mac.
I have lldb version 20.1.7 installed. Here’s how I crashed lldb-dap, I did this on linux and haven’t tried on mac
First in the folder /tmp/test (you’ll need the correct path) I compiled the below using clang++ a.cpp -g
int main() {
int a=0;
a++;
a++;
a++;
a++;
a++;
a++;
a++;
a++;
a++;
a++;
a++;
a++;
a++;
a++;
a++;
a++;
a++;
}
Put the following in a file such as dapIn
Content-Length: 543
{"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"lldb-dap","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true,"supportsANSIStyling":true},"type":"request","seq":1}Content-Length: 255
{"command":"launch","arguments":{"type":"lldb-dap","request":"launch","name":"Debug","program":"/tmp/test/a.out","args":[],"env":[],"cwd":"/tmp/test","__configurationTarget":6,"__sessionId":"9a277144-44e6-4368-b6a8-ae1cea30191d"},"type":"request","seq":2}Content-Length: 206
{"command":"setBreakpoints","arguments":{"source":{"name":"a.cpp","path":"/tmp/test/a.cpp"},"lines":[4,21],"breakpoints":[{"line":4},{"line":21,"column":1}],"sourceModified":false},"type":"request","seq":3}Content-Length: 92
{"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":4}Content-Length: 95
{"command":"setInstructionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":5}Content-Length: 89
{"command":"setExceptionBreakpoints","arguments":{"filters":[]},"type":"request","seq":6}Content-Length: 88
{"command":"setDataBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":7}Content-Length: 56
{"command":"configurationDone","type":"request","seq":8}
Then run cat dapIn | lldb-dap, I got a 214mb core dump after running that