Re: Python API for supplying thread information?

Gareth McMullin <[email protected]>
Newsgroups gmane.comp.gdb.devel,gmane.comp.debugging.openocd.devel
Message-ID <CAL8qUbrcM=khjNAAs2NgvDcwYZVGbyZduazPqFo=phyZVL3zJQ@mail.gmail.com>
On Wed, Mar 22, 2017 at 10:43 PM, Freddie Chopin <[email protected]> wrote:
> Would that be even possible to implement in GDB? Maybe something like
> that is possible even now, but not documented?

There has also been some discussion on this in the Black Magic Probe
user community.
Black Magic Probe is a similar project to OpenOCD, but the GDB server
is embedded in firmware in the JTAG hardware.
https://github.com/blacksphere/blackmagic
It currently has no support for RTOS threads.

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 unfortunately don't have the time to work on getting the necessary
extensions into GDB.

Regards,
Gareth
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.