From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77609 invoked by alias); 18 May 2017 15:12:56 -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 77587 invoked by uid 89); 18 May 2017 15:12:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=representative X-HELO: mail-pf0-f182.google.com Received: from mail-pf0-f182.google.com (HELO mail-pf0-f182.google.com) (209.85.192.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 May 2017 15:12:53 +0000 Received: by mail-pf0-f182.google.com with SMTP id m17so25282464pfg.3 for ; Thu, 18 May 2017 08:12:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=23dBRkyINMmLs/s+rfZhr8pfp3vnMTR7t8bXJV029PU=; b=qxbKlx6cOTLE5OCbSSuBE1NM8Q4AMUYvJiOSpUUWFGaUP7qxVzyhBtpD0fJanz8YPm r5Hrk+w0isfKydhGlLZvBACr8rHTu9pqQ/IOdOBEHc47y54z2oy07HiqKyPlVyk1nSfd u7ZGZe5v5YEES9u5nq01Cit2yikN2zwMBSs6AV2ArNNq84mz98IR3iwtj0zG9urbujLo I9AJzrSUuB5I27nqRi+GOKm43CghFjbS7/qnWg5lop1bGz7MrWgEzUSEJ/nGBqmazbIB qMLsY/PXtFH7V3WV5ODWVm6aA52edEGWrC+IKSaWGR+LQY+rM/iBhmgLR4yBNxP4rF/M /s9w== X-Gm-Message-State: AODbwcBWIvY/0m4g4NbVTr0ginekOa0iDaAUQ6apMC+F237mxiGA+7gE dTgskpPyYxQjPw== X-Received: by 10.99.176.15 with SMTP id h15mr5088042pgf.19.1495120375561; Thu, 18 May 2017 08:12:55 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id o29sm9946732pgc.27.2017.05.18.08.12.53 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 18 May 2017 08:12:55 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [RFC 6/7] Lazily and dynamically create i386-linux target descriptions References: <1494518105-15412-1-git-send-email-yao.qi@linaro.org> <1494518105-15412-7-git-send-email-yao.qi@linaro.org> Date: Thu, 18 May 2017 15:12:00 -0000 In-Reply-To: (Pedro Alves's message of "Wed, 17 May 2017 16:43:51 +0100") Message-ID: <86y3tu6vww.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00422.txt.bz2 Pedro Alves writes: >> + >> + struct xml_and_mask array[] =3D { >> + { "i386/i386-linux.xml", X86_XSTATE_SSE_MASK }, >> + { "i386/i386-mmx-linux.xml", X86_XSTATE_X87_MASK }, >> + { "i386/i386-avx-linux.xml", X86_XSTATE_AVX_MASK }, >> + { "i386/i386-mpx-linux.xml", X86_XSTATE_MPX_MASK }, >> + { "i386/i386-avx-mpx-linux.xml", X86_XSTATE_AVX_MPX_MASK }, >> + { "i386/i386-avx-avx512-linux.xml", X86_XSTATE_AVX_AVX512_MASK }, >> + { "i386/i386-avx-mpx-avx512-pku-linux.xml", >> + X86_XSTATE_AVX_MPX_AVX512_PKU_MASK }, > > About these xml files. Is your idea that: > > #1 - we remove these xml description files at some point, keeping only > the description fragments which are currently xi:included by the xml > files above? > #2 - or, we'll still continue adding new xml files and grow this > list here? > #3 - or, we'll keep the existing xml files as representative / legacy, > and use them in the unit tests going forward, just to make sure > the machinery builds correct descriptions? > > (I don't expect to answer to be #2, I just put it there for completeness.) In short, #2 and #3. IIUC, you are not against "continue adding new xml files" in #2, you are against that we have to maintain the list here as we add new xml files. Even we finished the transition for all ports to dynamic tdesc creation, we still need to add new xml files to features/ directory for new hardware features, because GDBserver needs them (regformats/*.dat need them). We may add i386/i386-avx-mpx-avx512-linux.xml, GDB doesn't need it, but GDBserver still needs it. Given we need to add such .xml file, it is better to grow the list so that we can do the test. So the answer is #2. Suppose one day, we don't need these XML files to generate regformats/*.dat for GDBserver, we can remove all i386-*linux.xml files except i386-avx-mpx-avx512-pku-linux.xml, but I still want to move them to somewhere in testsuite directory to keep them as tests. Then, it becomes #3. The purpose of this test is to make sure these lazily/dynamically created tdesc (using create_feature_org_gnu_gdb_XXX functions) equal to the tdesc created from XML files. The dynamic tdesc creation is still new, needs more tests. During the process that we change other targets (amd64, arm, mips, etc) to the dynamic tdesc creation, the lists like this are expected to be added for each target. When we finish the transition to dynamic tdesc creation for all ports, and dynamic tdesc creation is quite stable, we can remove all these tests and lists, but I prefer to keeping the tests. Before we remove these tests and lists, we still need to update the lists when, 1) add a new port with target description, a new list should be added in its -tdep.c file. 2) add a new xml target description for the existing port, Let me think about how to generate this list instead of manually maintain this list. --=20 Yao (=E9=BD=90=E5=B0=A7)