From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ned.t-8ch.de (ned.t-8ch.de [212.47.237.191]) by sourceware.org (Postfix) with ESMTPS id B8BE93858002 for ; Mon, 29 Mar 2021 17:33:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B8BE93858002 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=t-8ch.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=thomas@t-8ch.de Date: Mon, 29 Mar 2021 19:33:45 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=t-8ch.de; s=mail; t=1617039226; bh=8Ncr433o7fJA52nEsT70vdj1hX6dRhlbCsYHry+bV0U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=INaG+xaVXEj4ahCaBumpqbQ2PW+AsfSWN/U1hhVIcCYwwvuw+m+dLn+R3VRbPcY/N iVXK7v7+TRQH7p53wHo8IA/0VW83CMpUX1hCmmr1gWOVRKVsHLbUOgpmle/fZUrmpW SSZIcJoIELnTeI9JDCarQ+ZWz1XhloTio9qsyxkk= From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Simon Marchi Cc: gdb@sourceware.org Subject: Re: Remote query for structure layout Message-ID: <51319e86-d463-475c-ad50-b998ac507463@t-8ch.de> References: <0e328e95-5035-4de6-9b44-b83ffab38662@t-8ch.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Jabber-ID: thomas@t-8ch.de X-Accept: text/plain, text/html;q=0.2, text/*;q=0.1 X-Accept-Language: en-us, en;q=0.8, de-de;q=0.7, de;q=0.6 X-PGP-Key: https://t-8ch.de/pubkey.asc X-PGP-Key-Fingerprint: 187EF7CE X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2021 17:33:54 -0000 Hi! On Mo, 2021-03-29T12:05-0400, Simon Marchi wrote: > On 2021-03-28 7:06 a.m., Thomas Weißschuh wrote:> Hi everybody, > > I would like to propose a new command for the remote protocol that can be used to > > query structure layouts. > > Essentially a `qSymbol` equivalent for the output of `ptype`. > > > I think that would make sense. We already help the stub look up some > things in the debugged process using qSymbol, so it would be a bit silly > to say "now you're on your own to interpret it!". Good to know, I'll take a shot at it. > If we go there, we could also help the stub make the link between the > symbol and its type, so that you don't have to hardcode that symbol > "foo" is of type "foo_t". For example, if you could also pass a symbol > name (like pxCurrentTCB) to qType, you wouldn't have to hardcode its > type name in the openocd source code, it's one less thing that can go > wrong. Or it could be another packet that does symbol name to type > name, which you then pass to qType. Would it not make more sense to report the type of a symbol as part of qSymbol? Gated behind a qSupported flag "qSymbol:type+" or so? What do you think about the dataformat of the qType response? Should it be a homegrown textformat or XML which would be much easier to extend. Regards, Thomas