user1540381
user1540381

Reputation: 13

GDB hardware breakpoint don't work with remote debugging

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!

Upvotes: 1

Views: 3014

Answers (1)

m-ric
m-ric

Reputation: 5901

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

Upvotes: 1

Related Questions