需要跨gdb的设备 [英] Need cross gdb for device
问题描述
我在Ubuntu 12.04上安装了 gcc-arm-linux-gnueabihf 交叉编译器,现在我能够为嵌入式设备构建程序。我在哪里可以找到跨gdb进行调试?
I installed gcc-arm-linux-gnueabihf cross-compiler on Ubuntu 12.04, and now I am able to build a program for embedded device. Where can I find cross gdb for debugging?
gcc-arm-linux-gnueabihf参考资料在相关软件包列表中包含gdb-arm-linux-gnueabihf我正在寻找的调试器。
gcc-arm-linux-gnueabihf reference contains gdb-arm-linux-gnueabihf in the Related Packages list, which seems to be the debugger that I am looking for. But this package is not available.
推荐答案
我建议从 Linaro工具链,而不是Ubuntu存储库。从下载gcc-linaro-arm-linux-gnueabihf-4.7-2012.10-20121022_linux.tar.bz2在这里,您会发现:
I recommend getting gdb from the Linaro toolchain rather than the Ubuntu repositories. Download gcc-linaro-arm-linux-gnueabihf-4.7-2012.10-20121022_linux.tar.bz2 from here and you'll find:
-
bin / arm-linux-gnueabihf-gdb
-
arm-linux-gnueabihf / debug-root / usr / bin / gdbserver
bin/arm-linux-gnueabihf-gdb
arm-linux-gnueabihf/debug-root/usr/bin/gdbserver
后者是静态链接的,并且当然是为ARM Linux构建的。
The latter is statically linked and of course built for ARM Linux.
假定您已经建立了网络设置到目标板上,将 gdbserver
复制到它并运行:
Assuming you have networking already set up to your target board, copy gdbserver
to it and run:
$ gdbserver --multi :2345
在开发计算机上,运行:
On your development machine, run:
$ arm-linux-gnueabihf-gdb
(gdb) target extended BOARD-IP-ADDR:2345
(gdb) set remote exec-file /bin/true
(gdb) run
并运行远程交叉调试。
链接到Linaro错误跟踪器,邮件列表和w eb论坛位于此处。从他们的发行说明中可以看出,他们在ARM Linux工具链,内核,QEMU开发方面非常活跃。
Links to the Linaro bug tracker, mailing list and web forum are here. They're very active in ARM Linux toolchain, kernel, QEMU development as you can see from their release notes.
这篇关于需要跨gdb的设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!