【发布时间】:2022-12-15 20:10:33
【问题描述】:
我尝试在 Windows 主机(无 WSL)上使用 VSCode 中的本机调试远程调试 ARM Linux 嵌入式设备。
宿主launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "gdb",
"request": "attach",
"name": "gdb",
"executable": "${workspaceRoot}\\myprogram\\myprogram ",
"stopAtConnect": true,
"target": "192.168.xxx.xxx:2000",
"remote": true,
"cwd": "${workspaceRoot}/myprogram",
"gdbpath": "C:\\msys64\\mingw64\\bin\\gdb-multiarch.exe",
"debugger_args": ["-iex", "set osabi none"],
}
]
}
目标
debarm:~# gdbserver --version
GNU gdbserver (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
gdbserver is free software, covered by the GNU General Public License.
This gdbserver was configured as "arm-linux-gnueabi"
debarm:~# gdbserver :2000 --attach 1966
Attached; pid = 1966
Listening on port 2000
Remote debugging from host 192.168.xxx.xxx
然而,步进给warning: Remote failure reply: E01类似于:GDB remote debugging fails with error E01
我也试过 https://developer.arm.com/downloads/-/gnu-rm 的 arm-none-eabi-gdb.exe 但它给出了同样的问题。
我还尝试了来自https://releases.linaro.org/components/toolchain/binaries/latest-5/arm-linux-gnueabi/ 的arm-linux-gnueabi-gdb.exe,但它给出了Error while reading shared library symbols for target:/lib/ld-linux.so.3。
对于这种方法的问题有什么建议吗?
【问题讨论】:
-
你看到this answer了吗?
-
是的,看到了,但现在你提到了,我检查了以下内容;目标上的
uname --m给出了armv5tejl,当我将set architecture armv5tej添加到主机debugger_args时,问题仍然存在。 -
This answer表明使用的gdb只能调试intel架构。如果输入
set architecture,armv5tej是否在有效参数列表中? -
是的,
gdb-multiarch.exe中的set architecture列出了armv5tej。
标签: visual-studio-code arm gdb cross-platform gdbserver