From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67061 invoked by alias); 13 Jan 2019 16:32:20 -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 67014 invoked by uid 89); 13 Jan 2019 16:32:18 -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= 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 16:32:17 +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 x0DGWB5S027685 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 13 Jan 2019 11:32:15 -0500 Received: by simark.ca (Postfix, from userid 112) id 1B0291E7BD; Sun, 13 Jan 2019 11:32:11 -0500 (EST) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 75BDF1E4C2; Sun, 13 Jan 2019 11:32:09 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 13 Jan 2019 16:32: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> Message-ID: <3a2bbe96385bb8c58fb69d192f2f91f6@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00315.txt.bz2 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)? For bare-metal, num_regs would be greater than num_nonpriv_regs? Simon -