Ser*_*rge 2 gdb qnx visual-studio visual-studio-code vscode-debugger
我正在尝试在 VSCode 或 Visual Studio(实际上都是)中建立一个项目,以在 QNX 目标上构建和调试软件。到目前为止,我可以通过附加到进程来正常工作来进行调试,但是,当我设置调试会话来运行该进程时:
"customLaunchSetupCommands": [
{
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"text": "set solib-search-path <mypath on host>",
"ignoreFailures": true
},
{
"text": "file <exe on host>",
"description": "load file",
"ignoreFailures": false
},
{
"text": "handle SIGQUIT nostop",
"ignoreFailures": true
},
{
"description": "Connect to target",
"text": "target qnx <mytarget>",
"ignoreFailures": false
},
{
"text": "upload <exe on host> <exe on target>",
"ignoreFailures": false
},
{
"text": "run",
"ignoreFailures": false
}
],
Run Code Online (Sandbox Code Playgroud)
调试会话失败:
我在 Visual Studio 和 VSCode 中遇到同样的错误。我在主机上本地使用 gdb(QNX 安装附带的 ntoaarch64-gdb)
遇到了完全相同的问题,经过对不同属性的一些测试后,以下内容有效:
{
"version": "0.2.1",
"defaults": {},
"configurations": [
{
"type": "cppdbg",
"targetArchitecture": "arm",
"project": "CMakeLists.txt",
"projectTarget": "$target",
"program": "$path-to-binary",
"name": "$name",
"miDebuggerPath": "C:/qnx660/host/win32/x86/usr/bin/ntoarmv7-gdb.exe",
"MIMode": "gdb",
"externalConsole": true,
"launchCompleteCommand": "exec-run",
"stopOnEntry": true,
"setupCommands": [
{
"description": "setup target",
"text": "target qnx 192.168.101.11:8000"
},
{
"description": "upload",
"text": "upload $path /tmp/test-signals"
},
{
"description": "load symbols",
"text": "file $path"
}
]
}
]
}
Run Code Online (Sandbox Code Playgroud)
我认为最重要的部分是删除 run 命令并添加"launchCompleteCommand": "exec-run"。
希望这对某人有帮助,因为它让我发疯:)
归档时间: |
|
查看次数: |
2398 次 |
最近记录: |