| Issue |
56691
|
| Summary |
Windows LLVM v14.0.614 DAP adapter lldb-vscode.exe does not process the launch command corrently
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
acotty
|
On Windows 10 when using the LLVM v14.0.614 DAP adapter lldb-vscode.exe the launch command response indicates that the launch command failed, but using the MSYS2 Mingw64 14.04 lldb-vscode.exe the launch command does not fail. I suspect it has to do with the Windows path used in the launch request, but I could be wrong.
The app is a simple hello world type app consisting of three files for testing breakpoints in multiple files.
The application used is a version of Code::Blocks where I have been working to add a DAP plugin. The C::B build log is:
~~~
g++.exe -std=c++17 -Og -gdwarf-4 -I.\ -IC:\msys64\mingw64\include -c D:\Andrew_Development\Z_Testing_Apps\Clang_Multi_File_Test\main.cpp -o obj\main.o
g++.exe -std=c++17 -Og -gdwarf-4 -I.\ -IC:\msys64\mingw64\include -c D:\Andrew_Development\Z_Testing_Apps\Clang_Multi_File_Test\second.cpp -o obj\second.o
g++.exe -std=c++17 -Og -gdwarf-4 -I.\ -IC:\msys64\mingw64\include -c D:\Andrew_Development\Z_Testing_Apps\Clang_Multi_File_Test\Sub_3\second.cpp -o obj\Sub_3\second.o
g++.exe -std=c++17 -Og -gdwarf-4 -I.\ -IC:\msys64\mingw64\include -c D:\Andrew_Development\Z_Testing_Apps\Clang_Multi_File_Test\Sub_4\second.cpp -o obj\Sub_4\second.o
g++.exe -LC:\msys64\mingw64\lib -o bin\clang_Printf.exe obj\main.o obj\second.o obj\Sub_3\second.o obj\Sub_4\second.o
~~~
The batch file I use to start the LLVM lldb-vscode.exe for testing is:
~~~
echo on
set PYTHONHOME=C:\Users\andrew\AppData\Local\Programs\Python\Python310\
E:\Downloads\GCC_Compilers\LLVM\LLVM-14.0.6-win64\bin\lldb-vscode.exe --port 12345
~~~
The Code::Blocks DAP plugin log file snippet for the launch command is:
~~~
[debug ] < Debugger_DAP::OnDapLog(L 3234)>
-->
{
"seq": 5,
"type": "request",
"command": "launch",
"arguments": {
"noDebug": false,
"program": "D:\\Andrew_Development\\Z_Testing_Apps\\Clang_Multi_File_Test\\bin\\clang_Printf.exe",
"args": [],
"cwd": "",
"env": {}
}
}
[debug] < Debugger_DAP::OnDapLog(L 3234) >
<--
{
"command": "launch",
"message": "unknown error",
"request_seq": 5,
"seq": 0,
"success": false,
"type": "response"
}
~~~
The Code::Blocks DAP plugin full log file is:
~~~
Active debugger config: DAP:LLVM
< Debugger_DAP::Debug(L 329)> starting debugger
Building to ensure sources are up-to-date
< Debugger_DAP::SelectCompiler(L 394)> Selecting target: Debug
Adding file: D:\Andrew_Development\Z_Testing_Apps\Clang_Multi_File_Test\bin\clang_Printf.exe
[debug ] < Debugger_DAP::StartDebugger(L 597)> wxSetEnv(PATH , .;C:\msys64\mingw64\bin;C:\msys64\mingw64;.;D:\Andrew_Development\Libraries\wxWidgets-3.2.0_win64\lib\gcc_dll;D:\Andrew_Development\Work_Installers\CodeBLocks_Private_Experimental_GCC\src\devel32_64;D:\Andrew_Development\Work_Installers\CodeBLocks_Private_Experimental_GCC\src\exchndl\Win_10\win64\lib;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Bin;C:\Program Files\dotnet;C:\Program Files\nodejs;C:\Program Files\TortoiseGit\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\PowerShell\7-preview\preview;C:\Program Files\PowerShell\7;C:\Program Files\Git\cmd;C:\Users\andrew\AppData\Local\Programs\Python\Python310\Scripts;C:\Users\andrew\AppData\Local\Programs\Python\Python310;C:\Users\andrew\AppData\Local\Programs\git-cola\bin;C:\Users\andrew\AppData\Local\Microsoft\WindowsApps;C:\Users\andrew\AppData\Local\Programs\Microsoft VS Code Insiders\bin;C:\Users\andrew\AppData\Local\GitHubDesktop\bin;C:\Users\andrew\AppData\Local\gitkraken\bin;C:\Users\andrew\.dotnet\tools;C:\Users\andrew\AppData\Roaming\npm
< Debugger_DAP::LaunchDebugger(L 651)> dap_debugger: E:\Downloads\GCC_Compilers\LLVM\LLVM-14.0.6-win64\bin\lldb-vscode.exe
< Debugger_DAP::LaunchDebugger(L 660)> dap_port_number: 12345
< Debugger_DAP::LaunchDebugger(L 665)> DEBUGGEE: D:\Andrew_Development\Z_Testing_Apps\Clang_Multi_File_Test\bin\clang_Printf.exe
< Debugger_DAP::LaunchDAPDebugger(L 624)> dapStartCmd: E:\Downloads\GCC_Compilers\LLVM\LLVM-14.0.6-win64\bin\lldb-vscode.exe -port 12345
< Debugger_DAP::LaunchDAPDebugger(L 630)> finished dapStartCmd: E:\Downloads\GCC_Compilers\LLVM\LLVM-14.0.6-win64\bin\lldb-vscode.exe -port 12345 , m_dapPid: 7820
[debug ] < Debugger_DAP::LaunchDebugger(L 707)> m_dap_debuggeepath: D:\Andrew_Development\Z_Testing_Apps\Clang_Multi_File_Test\bin
[debug ] < Debugger_DAP::OnDapLog(L 3234)> --> {"seq":1,"type":"request","command":"initialize","arguments":{"clientID":"CB_DAP_Plugin","clientName":"CB_DAP_Plugin","adapterID":"","locale":"en-US","linesStartAt1":true,"columnsStartAt1":false,"pathFormat":"path","supportsInvalidatedEvent":false}}
[debug ] < Debugger_DAP::OnDapLog(L 3234)> <-- {"body":{"exceptionBreakpointFilters":[{"default":false,"filter":"cpp_catch","label":"C++ Catch"},{"default":false,"filter":"cpp_throw","label":"C++ Throw"},{"default":false,"filter":"objc_catch","label":"Objective C Catch"},{"default":false,"filter":"objc_throw","label":"Objective C Throw"},{"default":false,"filter":"swift_catch","label":"Swift Catch"},{"default":false,"filter":"swift_throw","label":"Swift Throw"}],"supportTerminateDebuggee":true,"supportsCompletionsRequest":false,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":true,"supportsFunctionBreakpoints":true,"supportsGotoTargetsRequest":false,"supportsHitConditionalBreakpoints":true,"supportsLoadedSourcesRequest":false,"supportsModulesRequest":true,"supportsProgressReporting":true,"supportsRestartFrame":false,"supportsRestartRequest":false,"supportsRunInTerminalRequest":true,"supportsSetVariable":true,"supportsStepBack":false,"supportsStepInTargetsRequest":false,"supportsValueFormattingOptions":true},"command":"initialize","request_seq":1,"seq":0,"success":true,"type":"response"}
< Debugger_DAP::OnInitializeResponse(L 2862)> Received event
< Debugger_DAP::OnInitializeResponse(L 2869)> Got OnInitialize Response
< Debugger_DAP::OnInitializeResponse(L 2896)> m_eSentConfigurationDone == eSentConfiguratonDone::NotSent
[debug ] < Debugger_DAP::CreateStartWatches(L 1405)> No watches
< Debugger_DAP::OnInitializeResponse(L 2907)> Placing breakpoint at main...
[debug ] < Debugger_DAP::OnDapLog(L 3234)> --> {"seq":2,"type":"request","command":"setFunctionBreakpoints","arguments":{"breakpoints":[{"name":"main","condition":""}]}}
[debug ] < Debugger_DAP::OnDapLog(L 3234)> --> {"seq":3,"type":"request","command":"configurationDone"}
[debug ] < Debugger_DAP::OnDapLog(L 3234)> <-- {"body":{"breakpoints":[{}]},"command":"setFunctionBreakpoints","request_seq":2,"seq":0,"success":true,"type":"response"}
< Debugger_DAP::OnBreakpointFunctionSet(L 3216)> Received response
< Debugger_DAP::OnBreakpointFunctionSet(L 3223)> Got OnBreakpointFunctionSet event
[debug ] < Debugger_DAP::OnDapLog(L 3234)> <-- {"command":"configurationDone","request_seq":3,"seq":0,"success":true,"type":"response"}
< Debugger_DAP::OnConfigurationDoneResponse(L 2930)> Received response
< Debugger_DAP::OnConfigurationDoneResponse(L 2936)> Got OnConfigurationDoneResponse Response
[debug ] < Debugger_DAP::OnDapLog(L 3234)> --> {"seq":5,"type":"request","command":"launch","arguments":{"noDebug":false,"program":"D:\\Andrew_Development\\Z_Testing_Apps\\Clang_Multi_File_Test\\bin\\clang_Printf.exe","args":[],"cwd":"","env":{}}}
[debug ] < Debugger_DAP::OnDapLog(L 3234)> <-- {"command":"launch","message":"unknown error","request_seq":5,"seq":0,"success":false,"type":"response"}
< Debugger_DAP::OnLaunchResponse(L 2794)> Received response
* ERROR * < Debugger_DAP::OnLaunchResponse(L 2807)> Bad Response: unknown error
[debug ] < Debugger_DAP::OnDapLog(L 3234)> <-- {"body":{"isLocalProcess":true,"name":"D:\\Andrew_Development\\Z_Testing_Apps\\Clang_Multi_File_Test\\bin\\clang_Printf.exe","startMethod":"launch","systemProcessId":0},"event":"process","seq":0,"type":"event"}
[debug ] < Debugger_DAP::OnDapLog(L 3234)> <-- {"event":"initialized","seq":0,"type":"event"}
< Debugger_DAP::OnInitializedEvent(L 2821)> Received event
< Debugger_DAP::OnInitializedEvent(L 2845)> m_eSentConfigurationDone != eSentConfiguratonDone::NotSent
~~~
The following is the snippet from the same app and C::B version using the MSYS2 Mingw64 14.04 lldb-vscode.exe dap adapter, which works fine.:
~~~
[debug ] < Debugger_DAP::OnDapLog(L 3234)> --> {"seq":5,"type":"request","command":"launch","arguments":{"noDebug":false,"program":"D:\\Andrew_Development\\Z_Testing_Apps\\Clang_Multi_File_Test\\bin\\clang_Printf.exe","args":[],"cwd":"","env":{}}}
[debug ] < Debugger_DAP::OnDapLog(L 3234)> <-- {"command":"launch","request_seq":5,"seq":0,"success":true,"type":"response"}
~~~
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs