This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Python API for supplying thread information?
- From: Gareth McMullin <gareth at blacksphere dot co dot nz>
- To: Freddie Chopin <freddie_chopin at op dot pl>
- Cc: gdb at sourceware dot org, openocd-devel <openocd-devel at lists dot sourceforge dot net>
- Date: Thu, 23 Mar 2017 10:50:55 +1300
- Subject: Re: Python API for supplying thread information?
- Authentication-results: sourceware.org; auth=none
- References: <1490175792.1242.7.camel@op.pl>
On Wed, Mar 22, 2017 at 10:43 PM, Freddie Chopin <freddie_chopin@op.pl> 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