This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Python API for supplying thread information?
- From: Freddie Chopin <freddie_chopin at op dot pl>
- To: Gareth McMullin <gareth at blacksphere dot co dot nz>
- Cc: gdb at sourceware dot org, openocd-devel <openocd-devel at lists dot sourceforge dot net>
- Date: Thu, 23 Mar 2017 17:43:57 +0100
- Subject: Re: Python API for supplying thread information?
- Authentication-results: sourceware.org; auth=none
- References: <1490175792.1242.7.camel@op.pl> <CAL8qUbrcM=khjNAAs2NgvDcwYZVGbyZduazPqFo=phyZVL3zJQ@mail.gmail.com>
On Thu, 2017-03-23 at 10:50 +1300, Gareth McMullin wrote:
> I am also of the opinion that this would be better achieved as a
> Python extension to GDB.
> A while ago I worked on some Python scripts that fake it in GDB, by
> overriding the `thread`
> and `info threads` CLI commands.
> https://github.com/gsmcmullin/gdb_chibios/blob/master/chibios.py
> (This is for ChibiOS 2 and is not currently maintained.) It
> obviously
> doesn't work
> with frontends using MI.
I had a crazy idea yesterday, that it should (maybe) be possible to
implement a python "bridge" between GDB and OpenOCD. This script would
open sockets for both ends and generally be transparent to the traffic.
But it could intercept all the GDB packets about threads. This way this
logic could be implemented completely in the script. This seems
promising, but I'm not sure it would be possible to create such bridged
connection between GDB and OpenOCD while intercepting some of the
traffic...
Regards,
FCh