From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id E6EC83858D34 for ; Tue, 16 Jun 2020 21:09:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E6EC83858D34 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Sandra_Loosemore@mentor.com IronPort-SDR: RDryvPMoSsmoQV+a7ZQyG8Hfarw6QjDcmeuxFxtjk50rYpEKE9/aSQtfgMToZgTa0olosWCKhR cag73uxQik2WFjJ9kIZcj5Cpeh4vSkUrCTS1d64kk+M1rs51v4jQQNC7tFKQm9FyK3GciMVmNP zJAJOjFudo2HXTZQMKZTLmEVzBsuT2Cshd91gwVXc9FpvPOg0ID8MmTqUGFXGt2HKaU6Fv1b7x SH0CoN884c/Tc1Wg4LqhydhU1ggsxqvTmAyfcfgXQJpM4hmIL5ZDZI5t3vlzIpBEUJOQo5hp27 0cA= X-IronPort-AV: E=Sophos;i="5.73,519,1583222400"; d="scan'208";a="49871343" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 16 Jun 2020 13:09:05 -0800 IronPort-SDR: iRzBTqgnIs3e4a8bEWBYeXLJ6+8ErQu7FBQl6IwthU4+RG3tDP69r0OOgRXQI4ktLdKq4sdb4K g+EMn2mtrpLPftiYn8RGwo/6mtjHoh7rrynXC4T34+543QQJ48M/9QGLmh+GasFZG86j/Cycpe K4CGLZahkUUttDU/BVmyjwehEhjqRMaYZqp4cd66bsmrOrazbT+A3TVD72/ct89Z3sISu2ce1j QVdj9JQQtS+D24Jd2+UGXijcExE2yY3/RkOARLhwNQylXZStD1jJU2o73YkbSzXSUZLezIyxaw CNo= Subject: Re: [patch] gdb/testsuite: fixes for gdb.xml/tdesc-regs.exp To: Andrew Burgess CC: "gdb-patches@sourceware.org" References: <71c00a14-a956-a087-8b9a-9b453194d4f2@codesourcery.com> <20200616204701.GT2737@embecosm.com> From: Sandra Loosemore Message-ID: <369fc78b-2e7c-545d-fc19-53193fa93f64@codesourcery.com> Date: Tue, 16 Jun 2020 15:08:59 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200616204701.GT2737@embecosm.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SVR-ORW-MBX-05.mgc.mentorg.com (147.34.90.205) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, 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: Tue, 16 Jun 2020 21:09:08 -0000 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: maintenance print reggroups Group Type foo user (gdb) FAIL: gdb.xml/tdesc-regs.exp: maintenance print reggroups I don't have a mainline build for ARM handy but the failure reproduces on GDB 9 branch for arm-none-eabi. This is Abid's original summary of his investigation in 2018: There are 2 reggroups maintained in the code. One is the default_groups which is populated in _initialize_reggroup. This group has 'general' group. So if you do 'maint print reggroups without loading anything in gdb, you will see 'general' group. The other group is stored in reggroups_data. This is populated when we load a target description xml file. So it only has group defined in xml file. But if has a valid group, then 'maint print reggroups' will not use default_groups. So that command will not print 'general' group if xml files did not have any. For x86, we have slightly different behavior. Its tdep code calls i386_add_reggroups which add 'general' group to reggroups_data as well. So this testcase assumes that 'general' group is always present. This asumption is true on x86 only not in general. So I have removed it from the match pattern. -Sandra