GDB 硬件断点不适用于远程调试 [英] GDB hardware breakpoint don't work with remote debugging

查看:36
本文介绍了GDB 硬件断点不适用于远程调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 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

目标处理器: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 探针通信.例如,在熊猫板上,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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆