From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by sourceware.org (Postfix) with ESMTPS id DB84B3851C36 for ; Fri, 19 Jun 2020 08:03:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DB84B3851C36 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-x444.google.com with SMTP id t13so6310600wrs.2 for ; Fri, 19 Jun 2020 01:03:20 -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=CPdBWLHzwtzO1SXu+wyyLFuhLPekQ+usai2rJ0dC9B8=; b=RKiYY56w1p3J0Fef74wo6F7TrAuHYgvMnS/Z7vUqJt2vbazuCxL0z8cHho8AxEp9yO saRqT7wPIKJbNf0jnN+B5zlfTm27R5zztnFLGwL36FjxJwWEe5cKorJ/mRDUYAxozyFs mmQhjPKa60dROImcicP1SYUMloYFtODWmJeDKc8EwA0lxHM29Q6PT4VByVqPr7XWhATI ArggEAyBWXexPS1OpEbxJncJaNgOYF43YvkieJIDhcvORLgdhtSuNJG5JPS4dNgHgV2H wANsM5CdpleMv868Cziz/NQv/x+pIXijmAESG1Dx9DqYAs1dL4fFz5ho/wdE/PQFJlNv P/dg== 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=CPdBWLHzwtzO1SXu+wyyLFuhLPekQ+usai2rJ0dC9B8=; b=LQxR6SYlz422p0CCCJ5CVy58NzBCdUtJ7XC2X35PEgDoqB40hR9nze4rwPdu5jqRi7 1DEAIu+5AKYijGS4IBPyq3eNXH/wIdrxu71v8XcK1hhIYaEgrBF+RRcUxRC34e7JaDdU tOsdLpZONox2QIAQ8R68z01G1HM/EAm+hF4CQQrT+ZczHCMSmlH/+8H2HEJBMfod46vv vBDdUJ0TXtQ1b+E/XTaxveFH/tCTcXV965vYM0I2FDQ2+7uUB7/L4Qn5WQsOpO4yxK+B F19UzRMIq4zml2ENSuTqii3yJ9lE+Th9O3sup8CPrMAcMoHytCk2jHv6HxyIcXL47/Jk yjQA== X-Gm-Message-State: AOAM530gIcOjPbtOkx0RiE5BSLefHyI63DWeBzPjeSOK3JmleAVYuodu 6n6YRXGK2Z5dGIV+19GpbF5ZR8Dh0tk= X-Google-Smtp-Source: ABdhPJzz6Cl14e02doluXuazmc90yJE6ZldGh09GKf6W87V/pS9luAUB+p1pqdC5b/Wzh3SlsvB7CQ== X-Received: by 2002:a5d:4987:: with SMTP id r7mr2645668wrq.316.1592553799944; Fri, 19 Jun 2020 01:03:19 -0700 (PDT) Received: from localhost (host86-128-12-16.range86-128.btcentralplus.com. [86.128.12.16]) by smtp.gmail.com with ESMTPSA id q128sm6128503wma.38.2020.06.19.01.03.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jun 2020 01:03:19 -0700 (PDT) Date: Fri, 19 Jun 2020 09:03:18 +0100 From: Andrew Burgess To: Sandra Loosemore Cc: "gdb-patches@sourceware.org" Subject: Re: [patch] gdb/testsuite: fixes for gdb.xml/tdesc-regs.exp Message-ID: <20200619080318.GH2737@embecosm.com> References: <71c00a14-a956-a087-8b9a-9b453194d4f2@codesourcery.com> <20200616204701.GT2737@embecosm.com> <369fc78b-2e7c-545d-fc19-53193fa93f64@codesourcery.com> <20200618094337.GX2737@embecosm.com> <104278ce-a730-2a59-dcf2-cb76fc6646d9@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <104278ce-a730-2a59-dcf2-cb76fc6646d9@codesourcery.com> X-Operating-System: Linux/5.6.15-200.fc31.x86_64 (x86_64) X-Uptime: 09:02:58 up 10 days, 22:09, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-2.1 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: Fri, 19 Jun 2020 08:03:22 -0000 * Sandra Loosemore [2020-06-18 20:18:18 -0600]: > On 6/18/20 3:43 AM, Andrew Burgess wrote: > > * Sandra Loosemore [2020-06-16 15:08:59 -0600]: > > > > > On 6/16/20 2:47 PM, Andrew Burgess wrote: > > > > > > > I'd be interested to know more about which targets don't place any > > > > registers in the 'general' group. This group is used in > > > > default_print_registers_info to implement 'info registers', so I'd > > > > like to see what this particular target has done instead. > > > > > > nios2, for one. From the original test log for nios2-linux-gnu: > > > > OK, but... > > > > Please bear with me, I don't have a nios2 tool chain to hand, but... > > > > In nios2-tdep.c, there is no call to set_gdbarch_print_registers_info, > > which means (from gdbarch.c) that nios2 will use > > default_print_registers_info. > > > > Now if we look in infcmd.c at both default_print_registers_info and > > registers_info, then we see that if a user says: > > > > (gdb) info registers > > > > then they will be asking which registers are in the general_reggroup. > > > > Now, nios can optionally use a remote target-description (from > > nios2_gdbarch_init), so, lets for now assume no target description. I > > see no call to set_gdbarch_register_reggroup_p for nios2, which means > > we are going to be using default_register_reggroup_p, which if we > > inspect (in reggroups.c) we'll see does place some registers into the > > general group. > > > > Now, does this matter? The reggroup name is never printed anywhere, we > > just see a set of random registers? > > > > But it is annoying that the user is not easily able to say: > > > > (gdb) info registers general > > > > and get the same output. > > > > If we look at how other targets deal with this most of them manually > > add at least some sub-set of the default register groups to their > > architectures set of register groups as part of their _gdbarch_init > > routine. > > > > My gut instinct here is that this is what nios2 should be doing (and > > maybe arm too). > > > > It does seem odd that there's no central "add-the-default-reggroups" > > type routine that targets can or should call. > > OK. How about I commit the other two pieces of the patch (which seem like > genuine bugs in the testcase), and treat this one as uncovering a bug in the > implementation instead of just an inappropriate x86-specific assumption > wired into the testcase? That sounds good to me. Thanks, Andrew