From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81134 invoked by alias); 23 Mar 2017 16:44:17 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 69782 invoked by uid 89); 23 Mar 2017 16:44:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=1300, H*F:D*pl X-HELO: smtpo56.poczta.onet.pl Received: from smtpo56.poczta.onet.pl (HELO smtpo56.poczta.onet.pl) (213.180.142.187) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Mar 2017 16:44:05 +0000 Received: from [192.168.2.253] (83-238-226-97.adsl.inetia.pl [83.238.226.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: freddie_chopin@op.pl) by smtp.poczta.onet.pl (Onet) with ESMTPSA id 3vpsnq0wH7z1RRGlr; Thu, 23 Mar 2017 17:43:58 +0100 (CET) Message-ID: <1490287437.1231.5.camel@op.pl> Subject: Re: Python API for supplying thread information? From: Freddie Chopin To: Gareth McMullin Cc: gdb@sourceware.org, openocd-devel Date: Thu, 23 Mar 2017 16:44:00 -0000 In-Reply-To: References: <1490175792.1242.7.camel@op.pl> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00050.txt.bz2 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