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 either programs a hardware breakpoint register or places a software breakpoint by replacing the instruction at the breakpoint with an instruction that will cause an exception.
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.
© 2022 - 2024 — McMap. All rights reserved.