gpt4 book ai didi

visual-studio - QNX gdb 与 VS 或 VSCode 集成

转载 作者:行者123 更新时间:2023-12-03 08:50:35 25 4
gpt4 key购买 nike

我正在尝试在 VSCode 或 Visual Studio(实际上都是)中建立一个项目,以在 QNX 目标上构建和调试软件。到目前为止,我可以通过附加到进程来正常工作来进行调试,但是,当我设置调试 session 来运行该进程时:

        "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
}
],

调试 session 失败: error message我在 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 命令并添加 "launchCompleteCommand": "exec-run"

希望这对某人有帮助,因为它让我发疯:)

关于visual-studio - QNX gdb 与 VS 或 VSCode 集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59217242/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com