GDBproxy is an open source remote proxy program for the GNU debugger, GDB. Its licence is similar to the BSD licence, so it can be used to build closed source interfaces between GDB and proprietary target debug environments. This is important for a number of people. Various MCUs have proprietary libraries to drive their debug interfaces. The vendors will not permit the source code for those libraries to be open. GDBproxy permits them remain closed, and keep the vendor happy, while fully complying with the licence conditions of the GNU toolchain. Of course, if you need to build a fully open source proxy for GDB, GDBproxy is also an excellent framework to use.
GDBproxy is based on the Open Source program rproxy, which can be found at http://world.std.com/~qqi/labslave/rproxy.html. rproxy is no longer actively maintained by its author.
Binaries for the MSP430 version of gdbproxy may be found here. The generic source code may be found in the project CVS at http://sourceforge.net/projects/gdbproxy.
Here was our problem:
One of the nice features of the Texas Instruments MSP430 microcontrollers is their on-chip emulation facility. These are usually accessed through a TI JTAG Flash Emulation Tool (FET) - either a PC parallel port connected tool, or a USB one. To make the GNU debugger (GDB) work with the MSP430s, an interface between GDB and the FET was needed.
TI made their MSP430 debug interface code available to the developers of the MSP430 port of the GNU toolchain. However, for commercial reasons, TI would not allow the full version of their interface library to be released as open source code. It would reveal things about the working of the MSP430, which they consider commercially confidential. The licencing of the GNU tools does not permit linking against a closed source library. This is where GDBproxy fits in.....
GDB supports remote debugging through serial or TCP/IP connections. gdbserver is a remote debug proxy program, supplied with GDB, which acts as a TCP/IP to serial port gateway for target debug environments. However, gdbserver was not designed to be adapted to specific target hardware interfaces, such as specialised JTAG hardware. It does not, therefore, isolate the functionality associated with a specific target in an easy to substitute module. GDBproxy was specifically designed to do exactly this. This makes it much easier to adapt it to new targets, than basing them on gdbserver. gdbserver is licenced under the GPL, and cannot be mingled with closed source code. GDBproxy is licenced under a BSD style licence, and has no licencing problems when mixed closed source code. A closed source module for GDBproxy exists, which turns it into a GDB compatible TCP/IP driver for the MSP430 FET interfaces. A skeleton target module exists, which may be adapted to suit new targets.
The source for the generic version of GDBproxy is available here, and continues to be released under the same licence as the original rproxy program. Only target specific code which must remain closed source is actually closed.
If you are trying to provide GDB support for a target which requires the use of proprietary code, GDBproxy may be just the right starting point for you. I also think GDBproxy is the best basis for building completely open source GDB debug interfaces, too. In GDBproxy, all target specific code is kept in one tidy module. A skeleton for that module is provided, so it should be quite a quick task to get support for a new environment up and running. Look through the code for "TODO" markers that highlight what needs changing for new target support.
If you are using the mspgcc port of the GNU tools for the Texas Instruments MSP430 you definitely want the MSP430 version of gdbproxy.
gdbproxy builds OK on Linux, and with MinGW32 or Cygwin on Windows. It uses the GNU autoconf and automake tools, so to build it use:
./configure make make install
By default, this will build the program to support a GDB serial protocol interface to a generic target, and a skeleton module that you can adapt to a target specific debug environment.
To try it use:
or to get help specific to the "skeleton" target use:
./gdbproxy --help skeleton
To run GDBproxy for the "skeleton" target, listening on TCP/IP port 1234 for connections from GDB, use:
./gdbproxy --port=1234 skeleton
Steve Underwood <firstname.lastname@example.org>