From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15935 invoked by alias); 13 Jun 2013 09:32:03 -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 15926 invoked by uid 89); 13 Jun 2013 09:32:03 -0000 X-Spam-SWARE-Status: No, score=-7.7 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; Thu, 13 Jun 2013 09:32:02 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5D9UjdI011390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 13 Jun 2013 05:30:45 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5D9UhOs016885; Thu, 13 Jun 2013 05:30:44 -0400 Message-ID: <51B99143.3080808@redhat.com> Date: Thu, 13 Jun 2013 11:02: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: Mark Kettenis , gdb-patches@sourceware.org, Ulrich.Weigand@de.ibm.com Subject: Re: [PATCH v3 3/3] Dynamic core regset sections support References: <877ghzmkmj.fsf@br87z6lw.de.ibm.com> <8738sngy5e.fsf@br87z6lw.de.ibm.com> <201306121521.r5CFLvl9024858@glazunov.sibelius.xs4all.nl> <871u86e5gi.fsf@br87z6lw.de.ibm.com> In-Reply-To: <871u86e5gi.fsf@br87z6lw.de.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00308.txt.bz2 On 06/13/2013 10:16 AM, Andreas Arnez wrote: > Mark Kettenis writes: > >> Sorry, but I really don't like the obfuscation that this diff brings >> to the amd64 & i186 Linux targets. > > If you can point me specifically to the spot where the obfuscation > occurs, I'll do my best to clean it up. A side-intention with the patch > actually was to *improve* readability, mainly by avoiding copy- & pasted > array initializers and distributed code logic. And indeed, while > offering improved flexibility, the patch overall saves 60 lines of code: > > 11 files changed, 266 insertions(+), 326 deletions(-) > > amd64 is the only architecture that suffers from a slight code increase > (8 lines). > >> Is there really no other way to this? > > There are always other ways ;-) I already implemented some of them, and > the proposed patch seemed like the best approach to me. > >> Is it really that bad to write out the invalid TDB registers? If GDB >> recognizes them as invalid, this shouldn't be a big issue should it? > > Do you mean to always write the TDB regset into the core dump, like > without the patch? And then add some logic such that GDB recognizes > zero values in the register note section as invalid and clears the > regset? Or do I misinterpret your suggestion? Not zero, but present them as unavailable/invalid. I tend to agree with Mark. Isn't there a control register GDB can read to check whether a transaction is in progress (useful for both core and live debugging) ? > BTW, I wonder how transaction diagnostics works on x86. E.g., when an > illegal instruction occurs within a hardware transaction, will the core > dump contain the address of the violating instruction? I haven't personally tried debugging anything with transaction support yet. -- Pedro Alves