GDB硬件断点不远程调试工作 [英] GDB hardware breakpoint don't work with remote debugging
问题描述
我用GDBSERVER做远程调试与ARM11 CPU。该软件断点效果很好,但我们我使用hbreak test.c的:5设置硬件断点,CPU将永远不会停止。
I use GDBServer to do a remote debug with an ARM11 CPU. The software breakpoint works well, but we i use "hbreak test.c:5" to set a hardware breakpoint, CPU will never stop.
GDB版本:7.3.1
GDB version: 7.3.1
目标CPU:ARM11
Target CPU: ARM11
操作:
arm-linux-gdb ./main
(gdb) target remote 192.168.0.1:2345
(gdb) hbreak test.c:5 => HW breakpoint, it doesn't work. but if change to "b test.c:5", it will works
(gdb) c
是否有人能告诉我如何实现与GDB7.3.1硬件调试?谢谢!
Does anybody can tell me how to enable hardware debug with GDB7.3.1? Thanks!
推荐答案
硬件断点只能通过JTAG探头操纵。 GDB不能访问它们,除非你有一个JTAG仿真器(我怀疑你有)连接到您的设备和软件胶(如OpenOCD的),允许GDB与JTAG仿真器通信。在PANDABOARD,例如,TI建议那些JTAG探头: http://omapedia.org/wiki/PandaBoard_JTAG_Debugging
Hardware breakpoints can only be manipulated by JTAG probes. GDB cannot access them, unless you have a JTAG probe (which I doubt you have) connected to your device and a software glue (eg OpenOCD), allowing GDB to communicate with the JTAG probe. On pandaboard, for instance, TI recommends those JTAG probes: http://omapedia.org/wiki/PandaBoard_JTAG_Debugging
这篇关于GDB硬件断点不远程调试工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!