I recently switched to an ARM64 machine with the Snapdragon X Elite on Windows and I am trying to set up Visual Studio Code. Since MinGW-w64 with gcc and gdb isn’t available for ARM64, I’m using LLVM-Mingw (version 18.1.18).(I also tried MSVC but I just cannot get used to it).
The problem arises when I try to start lldb-mi from within VS Code. I encounter the following error (full output at the bottom of the question):
[Error] MI parsing error: CString not terminated: ""C:\Users\User_\Documents\Development\TestProject"
[Error] MI parsing error: Result expected: "path="C:\Users\User_\Documents\Development\TestProject"
[Error] MI parsing error: trailing chars: ""C:\Users\User_\Documents\Development\TestProject"
The Launch Configuration (launch.json):
{
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.launchTargetPath}",
"showDisplayString": true,
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"logging": {
"engineLogging": true
},
"externalConsole": true,
"MIMode": "lldb"
}
]
}
Debugging using only lldb directly via CLI works fine.
I also tried the vs code extension CodeLLDB but unfortunately that one is not available on ARM64 yet.
For anyone who would like to reproduce the problem.
The code is a simple Hello World program in C++ and CMake used:
cmake_minimum_required(VERSION 3.27)
project(TestProject)
set(CMAKE_BUILD_TYPE Debug)
add_executable(testProject ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
target_link_libraries( testProject)
Environment:
- Visual Studio Code version: 1.91.0 (user setup)
- Clang revision: 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff
- LLVM revision: 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff
Any idea what I am missing?
Full Debug output:
1: (80) LaunchOptions{"name":"(lldb) Launch","type":"cppdbg","request":"launch","program":"C:\Users\User_\Documents\Development\TestProject\build\testProject.exe","showDisplayString":true,"args":[],"stopAtEntry":false,"cwd":"C:\Users\User_\Documents\Development\TestProject","logging":{"engineLogging":true},"externalConsole":true,"MIMode":"lldb","__configurationTarget":6,"__sessionId":"b05ff7d2-9d7c-4e88-96b2-79ee5c80f421","miDebuggerPath":null}
1: (131) Starting: "C:BuildToolsllvm-mingw-20240619-ucrt-aarch64binlldb-mi.exe" --interpreter=mi
1: (201) DebuggerPid=21952
1: (806) ->(gdb)
1: (816) <-1001-gdb-set auto-solib-add on
1: (816) ->1001^done
1: (817) ->(gdb)
1: (819) 1001: elapsed time 3
1: (820) <-1002-gdb-set solib-search-path "C:\Users\User_\Documents\Development\TestProject\build;"
1: (821) ->1002^done
1: (821) 1002: elapsed time 1
1: (821) <-1003-environment-cd C:\Users\User_\Documents\Development\TestProject
1: (821) ->(gdb)
1: (821) ->1003^done,path="C:\Users\User_\Documents\Development\TestProject
1: (821) ->"
1: (821) ->(gdb)
[Error] 1: (825) MI parsing error: CString not terminated: ""C:\Users\User_\Documents\Development\TestProject"
[Error] 1: (825) MI parsing error: Result expected: "path="C:\Users\User_\Documents\Development\TestProject"
[Error] 1: (825) MI parsing error: trailing chars: ""C:\Users\User_\Documents\Development\TestProject"
[Error] 1: (894) EXCEPTION:
[Error] 1: (895) EXCEPTION: at MICore.MIResults.ParseResultList(Span listStr, ResultClass resultClass)
[Error] 1: (895) EXCEPTION: at MICore.MIResults.ParseCommandOutput(String output)
[Error] 1: (895) EXCEPTION: at MICore.Debugger.ProcessStdOutLine(String line)
[Error] 1: (895) EXCEPTION: at Microsoft.MIDebugEngine.DebuggedProcess.<>c__DisplayClass96_0.<ScheduleStdOutProcessing>b__0()
[Error] 1: (895) EXCEPTION: at Microsoft.MIDebugEngine.WorkerThread.ThreadFunc()
1: (897) Send Event AD7MessageEvent
[Error] 1: (898) MI parsing error: CString not terminated: """