From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30705 invoked by alias); 7 Jun 2013 18:58:21 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 30649 invoked by uid 89); 7 Jun 2013 18:58:20 -0000 X-Spam-SWARE-Status: No, score=-7.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 07 Jun 2013 18:58:19 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r57IwE4L005198 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Jun 2013 14:58:14 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r57IwCKf007738; Fri, 7 Jun 2013 14:58:13 -0400 Message-ID: <51B22D43.9080304@redhat.com> Date: Fri, 07 Jun 2013 19:06:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 MIME-Version: 1.0 To: Andreas Arnez CC: gdb-patches@sourceware.org, Ulrich Weigand Subject: Re: [RFA/RFT PATCH 0/3] Add TDB regset support References: <87fvwu5937.fsf@br87z6lw.de.ibm.com> <51B1F629.5070006@redhat.com> <87li6lud1m.fsf@br87z6lw.de.ibm.com> <51B20DFD.8040805@redhat.com> <87d2rxu6r0.fsf@br87z6lw.de.ibm.com> In-Reply-To: <87d2rxu6r0.fsf@br87z6lw.de.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00175.txt.bz2 On 06/07/2013 07:15 PM, Andreas Arnez wrote: > Pedro Alves writes: >> You might not need to look at the auxv. Return the right tdesc >> depending on presence of bfd sections. See ppc_linux_core_read_description. > > This doesn't work for the TDB, because the absence of the TDB register > section doesn't mean that the core file target didn't support it. At > least we'd break the gcore.exp test case. Okay. How are the TDB registers presented to the user (info all-registers, etc) in the current patchset when the target supports them, but the inferior is presently interrupted outside a transaction, with live debugging? (screenshot, please! :-)) > >> If you connect a 7.6 GDB without this patch to a new GDBserver that >> sends this extended regdat, I believe GDB will complain with >> "Remote 'g' packet reply is too long", even if the target actually >> doesn't support TDB. > > Hm, didn't realize that. But if the target does support TDB, we'd be in > trouble either way, right? Right. >> You're extending the remote register buffer with an optional feature, >> and in future when another alternative register set comes along that >> replaces this one, we're in trouble, as we won't be able to tell >> which is which (without ugly hacks). > > Well, the patch doesn't treat TDB as an optional feature, does it? + /* Transaction diagnostic block. */ + feature = tdesc_find_feature (tdesc, "org.gnu.gdb.s390.tdb"); + if (feature) That makes it optional (as it should). + { + for (i = 0; i < ARRAY_SIZE (tdb_regs); i++) + valid_p &= tdesc_numbered_register (feature, tdesc_data, + S390_TDB_DWORD0_REGNUM + i, + tdb_regs[i]); + } + The new org.gnu.gdb.s390.tdb target feature needs to be documented, btw. http://sourceware.org/gdb/wiki/ContributionChecklist#Documentation TDB support should be mentioned in NEWS too. > In the future the TDB would always be included in the target description. That's really wrong. No reason for such a hack when we have a proper mechanism in place. > Actually representing n optional register sets with different tdescs > would require 2**n tdescs, right? With xi:include, that's really pretty manageable. Please do take a look at ppc_linux_read_description and at features/rs6000/, for example, though there are several others in the tree. The x86 port has a complex selection of proper description/register set too, given xsave. -- Pedro Alves