GDB Tap

I’ve been working on openocd to try to get it working on my Kinetis K20 eval board: TWR-K20D72M. More about that soon since I haven’t gotten it working yet! But I wanted to contribute a tool that has been useful for me. I modified a generic TCP proxy in perl to decode the gdb remote protocol so I can see exactly what gdb is doing when it is communicating with openocd. GDB Tap taps into the TCP stream between gdb and openocd and decodes the messages and outputs them to stdout.

You run it like this:

perl gdbtap.pl 3332 localhost:3333

Then when you configure the remote port that gdb uses to connect to openocd, just use 3332 instead of 3333.

Almost all the credit goes to Peteris Krumins who wrote a very nice generic TCP proxy (credit details at top of the source file).

Attached.

Let me know what you think.