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.
-
possible duplicate of [General JTAG working flow in an embedded development system?](http://stackoverflow.com/questions/3775445/general-jtag-working-flow-in-an-embedded-development-system) – Gilles 'SO- stop being evil' Apr 01 '12 at 17:04
3 Answers
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.

- 69,149
- 8
- 89
- 168
-
what i want to know is that after connecting my board to Pc with a jtag cable, if i type for example "bp 25" with GDB , what happens exatly after for that command in order to be executed with my embedded processor (Microblaze) through JTAG ? – jenje Apr 03 '12 at 11:49
-
you have to look up that processor and the jtag commands, it could be a few to a few thousand different commands that happen to implement that one thing. A dozen different ways processors handle such a command, etc. If you dont want to look up the datasheet then look in the gdb soruces, gdb is open source, the answers to your questions are all right there in open documents and software. Re-build gdb, add some printfs, dig down to the code of interest. – old_timer Apr 03 '12 at 14:21
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.

- 333,147
- 50
- 533
- 760