This is the mail archive of the
mailing list for the GDB project.
Re: GDB plugin proposal
- From: "Matthew Fyles" <Matthew dot Fyles at st dot com>
- To: <gdb at sources dot redhat dot com>
- Date: Tue, 23 Apr 2002 10:22:12 +0100
- Subject: Re: GDB plugin proposal
For the Superh H architecture we have added a command called fork into GDB to allow the user to create a new process from the GDB command language in the same way that the shell command is implemented.
Basically the new process gets passed a pipe to the GDB command languange when created allowing the user application to talk directly to GDB. This allows you to add new code which can be executed whilst in a GDB session without adding new commands into GDB.
The main use we have for this at the momemt is to solve the problem of having to specify a port to a simulator that is driven via the GBD server interface. We fork a loader process from GDB which sets up the sockets for communication and then passes a target-remote command with the port number back into GDB which then connects to the simulator.
This interface has proved very useful and allows us to add whatever functionality we require without changing the source code for GDB (with the exception of the 20 lines required to add the fork command)
It will also work on all supported host platforms.
If this would be useful to anybody then let me know.