From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102640 invoked by alias); 13 Jan 2019 19:33:37 -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 102630 invoked by uid 89); 13 Jan 2019 19:33:37 -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-yb1-f196.google.com Received: from mail-yb1-f196.google.com (HELO mail-yb1-f196.google.com) (209.85.219.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 13 Jan 2019 19:33:35 +0000 Received: by mail-yb1-f196.google.com with SMTP id w186so6973361ybg.1 for ; Sun, 13 Jan 2019 11:33:35 -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=fb9Iwb+bzpMlyOWU1bv0ryrKOUtdszDPygvVBYeqLbQ=; b=OGCJoK1Tgjou2eb9ba2dmXY2bODsRIyCWZow87tKBmjk5hS/ifdMeiS95WuYQnbLnz ePkV5URBo3GP+IWM2pemJf6D+DZF8yGd+Q3wxsfnck72n30MEo7i4J6x6q64vAdYQS5z J2UT8cbGCE9GWUks43BNpmFyK7ty6jMgY+KczmguunAFM+uF5vSPbJ3/3gRRvVGO/jIG 2lUkp9QXipkqd9LUod8311+O3mmUBNTLaEZf0i3+S17OCaPmTt27CmV4483jn3IvPLec 0VT2S8jL8ygyDGYsP/2+jTol9K3WYi35eIVVkWKvWTrXUn7w9LMaEC/bWJ2k1uuZNApQ TtIw== MIME-Version: 1.0 References: <20190113014248.28071-1-jcmvbkbc@gmail.com> <3a2bbe96385bb8c58fb69d192f2f91f6@polymtl.ca> In-Reply-To: <3a2bbe96385bb8c58fb69d192f2f91f6@polymtl.ca> From: Max Filippov Date: Sun, 13 Jan 2019 19:33: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/msg00317.txt.bz2 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. -- Thanks. -- Max