GDB hardware breakpoint don't work with remote debugging

痴心易碎 提交于 2020-01-05 07:03:59

问题


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 version: 7.3.1

Target CPU: ARM11

Operation:

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   

Does anybody can tell me how to enable hardware debug with GDB7.3.1? Thanks!


回答1:


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



来源:https://stackoverflow.com/questions/11577139/gdb-hardware-breakpoint-dont-work-with-remote-debugging

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!