From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54812 invoked by alias); 17 Aug 2018 18:11:22 -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 54803 invoked by uid 89); 17 Aug 2018 18:11:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=guys, truth, alternatively, htm X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Aug 2018 18:11:20 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D9D27A7EE; Fri, 17 Aug 2018 18:11:19 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 475921010435; Fri, 17 Aug 2018 18:11:18 +0000 (UTC) Subject: Re: [PATCH v4 12/12] [PowerPC] Add support for HTM registers To: Pedro Franco de Carvalho , gdb-patches@sourceware.org References: <20180815000608.26840-1-pedromfc@linux.ibm.com> <20180815000608.26840-13-pedromfc@linux.ibm.com> <540dad8e-f9a2-8173-a556-c919fbeeb43f@redhat.com> <87lg96xktg.fsf@linux.vnet.ibm.com> <87d0uixe1b.fsf@linux.vnet.ibm.com> <87mutlj2m3.fsf@linux.vnet.ibm.com> Cc: uweigand@de.ibm.com, edjunior@gmail.com From: Pedro Alves Message-ID: Date: Fri, 17 Aug 2018 18:11:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <87mutlj2m3.fsf@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-08/txt/msg00432.txt.bz2 On 08/17/2018 12:47 AM, Pedro Franco de Carvalho wrote: > Pedro Franco de Carvalho writes: > >> Pedro Franco de Carvalho writes: >> >>> Pedro Alves writes: >>> >>>> I won't pretend to understand the above fully (not an Power expert), >>>> but the question I ended up with was, after all this, will the >>>> GDB-generated files end up looking like kernel-generated cores? >>>> Or are there plans for that? >>> >>> They will end up looking different for this regset note section. This >>> really seems like a kernel bug, which I'm hoping will get fixed. >> >> Correction: the size of the regset note section for 32-bit threads seems >> like a kernel bug. The fact that the kernel includes values for >> registers that GDB doesn't include in the note section (by zeroing them) >> isn't a kernel bug, but to do this GDB would have to be aware of all >> these registers that aren't defined in the architecture. >> > > Does this issue block the patches? Up to you guys. I don't really understand the nuances here. Too many new registers. :-) Off hand, I'd think it better if GDB and kernel-generated cores had the same format. But I can't tell which is better. > I could add the registers to GDB but it would be messy, since it would > require a linux-specific target description with these extra registers. Can you clarify what do you mean by "is messy"? Linux-specific target descriptions are nothing something new. There's gdb/features/rs6000/power64-linux.xml already, for example? > Alternatively, I can make GDB not generate this specific note section, > this is a simple change in the current patches. The only confusing > thing is that when reading back the core file through GDB the > checkpointed GPRs will show up as unavailable, even if the thread was in > the middle of a transaction when the core file was generated, while all > the other checkpointed registers will be available. Is the only difference zeros vs ? If so, I think is less confusing than a bogus zero. The former tells the truth. A fake zero is misleading. Or is that so that by dropping the note we would lose access to other, relevant info as well? Thanks, Pedro Alves