From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23069 invoked by alias); 13 Jan 2019 19:43:52 -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 23058 invoked by uid 89); 13 Jan 2019 19:43:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=woody, Hx-languages-length:1264 X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 13 Jan 2019 19:43:50 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id x0DJhivD025722 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 13 Jan 2019 14:43:49 -0500 Received: by simark.ca (Postfix, from userid 112) id 7AA141E7BF; Sun, 13 Jan 2019 14:43:44 -0500 (EST) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 837611E50C; Sun, 13 Jan 2019 14:43:41 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 13 Jan 2019 19:43:00 -0000 From: Simon Marchi To: Max Filippov Cc: Simon Marchi , gdb-patches@sourceware.org, Woody LaRue Subject: Re: [PATCH RESEND] gdb: xtensa: fix register counters for xtensa-linux In-Reply-To: References: <20190113014248.28071-1-jcmvbkbc@gmail.com> <3a2bbe96385bb8c58fb69d192f2f91f6@polymtl.ca> Message-ID: <10b845bb829586d6784b53e87dabe8ab@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00318.txt.bz2 On 2019-01-13 14:33, Max Filippov wrote: > On Sun, Jan 13, 2019 at 8:32 AM Simon Marchi > wrote: >> >> On 2019-01-13 03:36, Max Filippov wrote: >> > In the original code (prior to 37d9e0623102) num_regs was the smallest >> > of >> > the number of the first pseudo register or the first privileged >> > register, and >> > num_pseudo_regs was the total number of registers minus num_regs. >> > The register table is constructed so that pseudo registers are always >> > at the >> > end of it, so num_regs was always equal to num_nonpriv_regs. >> > I'd like to restore this in xtensa-linux gdb, and what I do is I >> > increase >> > num_pseudo_regs by the difference of num_regs and num_nonpriv regs >> > and set num_regs equal to num_nonpriv_regs to maintain the above >> > equations. >> >> "num_regs == num_nonpriv_regs": is this only true for Linux, because >> we >> don't have access to privileged registers (and therefore there are 0 >> nonpriv registers)? > > Correct. > >> For bare-metal, num_regs would be greater than num_nonpriv_regs? > > Correct. Ok. For the record, the patch LGTM, but I am not sure if you are waiting for a review from Woody in CC? Simon