From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id AD11838930E0 for ; Thu, 11 Jun 2020 08:28:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AD11838930E0 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x435.google.com with SMTP id c3so5161963wru.12 for ; Thu, 11 Jun 2020 01:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=pR09RTHYUeQk8c1ihkdXSwPI1Qib5v7oqIfGYYQJ708=; b=VxWNwPG9rOSyYQzYFA8HhxonD6W1wW4rJ5YZfhDtE6/qHzGt5yixKT9SvogfBDXKPJ IRmGocUKbpk24cLX/9EQ194NqKVoVZhdtGAUQa/GDWxC5QqbkYwiJu8oq//IjhhfY67D ylZ4pvz0k0JYe/yKHczULWHBugDweJBOFM/kAFDx+PqYrb7fvzCtRYoB6XceyLeRaZdW uIpxO72JIfKZZT2CX8v/ZiHHO1E8hcwl24ozgeIMjOiRjLiKWk5wn0AV2zy1gjWtQ7TX aP/PVvKYtewildMHFDu6peKoX4YTOsEIb94CbA2zAoL27MHWMvzRg7ciEr/HH7ZmggEI Petw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pR09RTHYUeQk8c1ihkdXSwPI1Qib5v7oqIfGYYQJ708=; b=UQyng8qWpmEZuwBJWKh4cowi0NiDrPsMONiI8FsNKtx/8hGBrQtK4HjFX8vpBmdGaf 43yxB6PDe9FB05XuAXvfTC5SZogVPUVACrmu4s/oDaLPXvkkatxA0VzT9iAByyHgIR2b xmgle03z8rQsLem6culixgU7aIVPHnOkITeDgeOaGPjRv2D3y5zkUyKO32Qek4mU3+Hi KylMHcXmq+o6JF/WZ5EdVtzuQvgB1rzjlcAYr3LK9/aUCpjIQY5vECiIICAy84NvYkvA z0xKANeyyikW0FGMkbfT+XeypEuckKiaJMYjBMyjT3s30ahfV0rA8j/LqGexBAHdaxrE pwLg== X-Gm-Message-State: AOAM531Czl0ikt5p1Dkmv32excJbzmEa2UBpWCJ5qrjcWv2fOQcDxCFi 1De81V9qnBzoEFsqWqaOXmxPlaGJ6uI= X-Google-Smtp-Source: ABdhPJzMWc0ZOpjvcgmWeKj7GlMIFyZFoWHTgZZ74sts1ep36GFjRvzNjaEXsprjr3O2d/oY1wNBTw== X-Received: by 2002:adf:ec03:: with SMTP id x3mr8223624wrn.297.1591864122813; Thu, 11 Jun 2020 01:28:42 -0700 (PDT) Received: from localhost (host86-128-12-16.range86-128.btcentralplus.com. [86.128.12.16]) by smtp.gmail.com with ESMTPSA id y14sm2972259wma.25.2020.06.11.01.28.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 01:28:42 -0700 (PDT) Date: Thu, 11 Jun 2020 09:28:41 +0100 From: Andrew Burgess To: Jim Wilson Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFC] gdb/riscv: Improved register alias name creation Message-ID: <20200611082841.GJ2737@embecosm.com> References: <1584007257-14466-1-git-send-email-nelson.chu@sifive.com> <87r1upefg8.fsf@tromey.com> <20200609173040.GE2737@embecosm.com> <87pna855a8.fsf@tromey.com> <20200609223051.GF2737@embecosm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux/5.6.15-200.fc31.x86_64 (x86_64) X-Uptime: 09:22:56 up 2 days, 22:29, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2020 08:28:45 -0000 * Jim Wilson [2020-06-10 13:37:03 -0700]: > On Tue, Jun 9, 2020 at 3:31 PM Andrew Burgess > wrote: > > > (gdb) call debug.trace (me, "You") > > > Could not fetch register "mucounteren"; remote failure reply 'E14' > > > > That is so weird! Based on the dump you included in the other email I > > would have expected that to work. > > Bu mucounteren is one of the registers that we chose not to make an > alias for because of the compatibility break. Apparently we will have > to make an alias for it anyways because qemu 4.0 wants it. No. QEMU provides a register list that _includes_ mucounteren so GDB doesn't need to know anything about this register or its aliases. The XML built into GDB is used only for targets that don't provide a target description. If a target provides a description, as in this case, then the builtin description is not touched. > And > someone should fix qemu to use the right register list depending on > the priv spec version. Yes, this. Change the register description that QEMU sends based on the machine its emulating and then GDB will "just work". GDB doesn't need to know about privilege specs at all[1]. Thanks, Andrew [1] Native debugging is a slightly different case, but lets leave that discussion for another day.