This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Python API for supplying thread information?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]