From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59385 invoked by alias); 13 Jan 2019 20:08:13 -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 59375 invoked by uid 89); 13 Jan 2019 20:08:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy= X-HELO: mail-yw1-f67.google.com Received: from mail-yw1-f67.google.com (HELO mail-yw1-f67.google.com) (209.85.161.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 13 Jan 2019 20:08:11 +0000 Received: by mail-yw1-f67.google.com with SMTP id k188so7873739ywa.6 for ; Sun, 13 Jan 2019 12:08:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9dp5G2Xe31CZ4c5RGGCpql2MBp2WVGBfOzuemmMgdI0=; b=kbvjbxhfezuQb/Zet4JbEal3JqsJAVFAy9JGNiErWBbOOIvcSYcEOgWjGtGANAXWQf 9Z5mo6dUkaq/sRszNSngvfE+xkjE+4/i1rhpzTGSPPlBH9DCIRPtiII5ioYKX5gahMhU 2ROJa85seYYR30XOAVFhRFWffg6bVwEr4NnySv+wajOsdJN0fUiKLer+NFgHLkVH6GY5 hyDj9eelO0Ph8KjRnPM5eL+DaudPnis/sLgG9WSQ6MYOrTXPU4ShpOmqLL2R+vRd6h7i XVLyxUaDyIGr7x/mLPMHQTvlrSrNHku2jKZiuzT+j3xr7Cf6ci3/2Uo0Ka2j3Co0jWK7 +Pwg== MIME-Version: 1.0 References: <20190113014248.28071-1-jcmvbkbc@gmail.com> <3a2bbe96385bb8c58fb69d192f2f91f6@polymtl.ca> <10b845bb829586d6784b53e87dabe8ab@polymtl.ca> In-Reply-To: <10b845bb829586d6784b53e87dabe8ab@polymtl.ca> From: Max Filippov Date: Sun, 13 Jan 2019 20:08:00 -0000 Message-ID: Subject: Re: [PATCH RESEND] gdb: xtensa: fix register counters for xtensa-linux To: Simon Marchi Cc: Simon Marchi , gdb-patches@sourceware.org, Woody LaRue Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00319.txt.bz2 On Sun, Jan 13, 2019 at 11:43 AM Simon Marchi wrote: > > 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? I'm cc'ing Woody as he's the maintainer of the xtensa gdb in Cadence/Tensilica. This patch is a resend of an old bugfix, I guess he'd reply if there was any concern first time I sent it. -- Thanks. -- Max