This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Extending GDB to provide console over telnet
- From: Matt Rice <ratmice at gmail dot com>
- To: Grigory Tolstolytkin <gtolstolytkin at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Thu, 29 Sep 2011 05:46:58 -0700
- Subject: Re: Extending GDB to provide console over telnet
- References: <4E845D53.9090102@gmail.com>
On Thu, Sep 29, 2011 at 4:58 AM, Grigory Tolstolytkin
<gtolstolytkin@gmail.com> wrote:
> Hi,
>
> I'm working on extending gdb functionality and would like to start a
> discussion since it might be useful for other people too.
you can kind of do this purely with python,
below is a link to a python script which (it only writes to the
network, doesn't read..)
I use it to dump the current source location to some port every time
gdb stops (probably using some patches)...
adding this sort of stuff to .gdbinit
python from misc_gdb import twisted_gdb
# listen on port on 8007.
python twisted_gdb.start(8007)
define hook-stop
python twisted_gdb.dumpCurrentLocation()
end
in theory it'd be simple to read data from the client and
gdb.execute() them, though I believe that anything which queries the
user with a yes/no style confirmation, is going to end up with the
default.
https://gitorious.org/misc-gdb-stuff/misc-gdb-stuff/blobs/master/misc_gdb/twisted_gdb.py