From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40214 invoked by alias); 31 Jan 2019 16:04:13 -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 40203 invoked by uid 89); 31 Jan 2019 16:04:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=Robert, henry, Henry, H*i:sk:enhFgfy X-HELO: mx2.freebsd.org Received: from mx2.freebsd.org (HELO mx2.freebsd.org) (8.8.178.116) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 31 Jan 2019 16:04:07 +0000 Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 19CE46E29F; Thu, 31 Jan 2019 16:04:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D4FF94FBC; Thu, 31 Jan 2019 16:04:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id C0F5842FA; Thu, 31 Jan 2019 16:04:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: implementation specific registers in elf core files? To: Robert Henry , gdb@sourceware.org References: From: John Baldwin Openpgp: preference=signencrypt Message-ID: <038eb9c4-13e7-9b1c-aaa1-1c9f5d9311b3@FreeBSD.org> Date: Thu, 31 Jan 2019 16:04:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3D4FF94FBC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.986,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; TAGGED_RCPT(0.00)[]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US] X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00048.txt.bz2 On 1/30/19 8:59 PM, Robert Henry wrote: > I would like to save implementation specific registers in elf core files, > and have gdb find and print those registers under the guidance of the > target description machinery (xml reg specs) described in Appendix G. Is > this possible? I would presume the values would end up in an ELF core file > note, but what would the note's name and type be, and how does it all come > together? You would need to define the note type and format. You would then teach the note-parsing code in bfd/elf.c to create a pseudosection (look for elfcore_make_note_pseudosection). You then add register set descriptions in the gdb/foo-tdep.c file that find the named notes and hook them into the callback to parse per-thread register notes. -- John Baldwin                                                                            Â