How does a debugger like gdb work to set a breakpoint through JTAG?
i'm working on debugging with gdb. i wanted to know how gdb works internally to set a brekpoint on an embedded processor through JTAG.
它可以编程一个硬件断点寄存器,或者通过用一个会导致异常的指令替换断点处的指令来放置一个软件断点。
It is different for every processor, you have to look up the jtag debugger details for the specific processor. not just processor family necessarily but specific processor. The datasheets/users guides, if available, are normally available from the chip vendor or core vendor depending on the product.
The few times I've used GDB in conjunction with a JTAG unit, GDB communicated over the JTAG by using a gdbserver
program that handled the details of the JTAG. For example, using an OpenOCD JTAG unit: http://openocd.sourceforge.net/doc/html/GDB-and-OpenOCD.html
This essentially means that GDB doesn't know much of anything about the JTAG unit - it relies on the gdbserver
interface and that server then does whatever it needs to behind the scenes to do what GDB requests.
上一篇: 对象渲染没有方法“应用”