QNX gdb 与 VS 集成或 VSCode
QNX gdb integration with VS or VSCode
我正在尝试在 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
}
],
调试会话失败:
我在 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"
}
]
}
]
}
我认为最重要的部分是删除 运行 命令并添加 "launchCompleteCommand": "exec-运行".
希望这对某人有所帮助,因为它让我发疯:)
我正在尝试在 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
}
],
调试会话失败:
有完全相同的问题,在使用不同的属性进行一些测试后,以下是有效的:
{
"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"
}
]
}
]
}
我认为最重要的部分是删除 运行 命令并添加 "launchCompleteCommand": "exec-运行".
希望这对某人有所帮助,因为它让我发疯:)