From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59769 invoked by alias); 22 Mar 2017 21:51:19 -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 59695 invoked by uid 89); 22 Mar 2017 21:51:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=H*F:D*co.nz, Freddie, freddie, Chopin X-HELO: mail-vk0-f50.google.com Received: from mail-vk0-f50.google.com (HELO mail-vk0-f50.google.com) (209.85.213.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 22 Mar 2017 21:51:17 +0000 Received: by mail-vk0-f50.google.com with SMTP id z204so80043522vkd.1 for ; Wed, 22 Mar 2017 14:51:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=jxhZKxR8h+iUufj4C05/D6Kxs4HYtt2r7HHzYTUiR+4=; b=XoScVDnFV0lHIRfjqmDRhJ7PRqhr9otaJItQQttf+dgW7nXHIa8sztmt/XS50YvGyW v2pJy0lMolNhjNkd5jJ3Grpzz3pKM9X1voQ0z5sXQ67AJVnlkYwl6op2iT5TgkswJYnF 7N2qWakUTFIDom2W3Oa43ZxOP/1bSNKujozopA+L6q8xjV7BHzeyQxCBKKvVNNIzAtjU cqagFMTOvAtONtir5mX6TEvpLYTfu0a//vDZ3TCND1z4SlM6rdhJ/5/faj0iIMJzMbe7 ZYVIIrCXjByIKWsnkpz5StP5Pa2FjeY9wF/8exKJvIHud7SYE9eUCvW5gFkQiP61cRo3 mhiA== X-Gm-Message-State: AFeK/H2XQfibeCGVkKn1jqn7cEMl4tbTftdVAklN/M1/gWsQTb/YVh6f39xFEJPhkzaJ2pyNIOwvG6srVxLCRA== X-Received: by 10.159.48.158 with SMTP id j30mr4422888uab.156.1490219476305; Wed, 22 Mar 2017 14:51:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.9.79 with HTTP; Wed, 22 Mar 2017 14:50:55 -0700 (PDT) In-Reply-To: <1490175792.1242.7.camel@op.pl> References: <1490175792.1242.7.camel@op.pl> From: Gareth McMullin Date: Wed, 22 Mar 2017 21:51:00 -0000 Message-ID: Subject: Re: Python API for supplying thread information? To: Freddie Chopin Cc: gdb@sourceware.org, openocd-devel Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00045.txt.bz2 On Wed, Mar 22, 2017 at 10:43 PM, Freddie Chopin 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