From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24601 invoked by alias); 13 Jun 2017 15:31:18 -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 24559 invoked by uid 89); 13 Jun 2017 15:31:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:static. X-HELO: mail-it0-f46.google.com Received: from mail-it0-f46.google.com (HELO mail-it0-f46.google.com) (209.85.214.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Jun 2017 15:31:15 +0000 Received: by mail-it0-f46.google.com with SMTP id m62so42964049itc.0 for ; Tue, 13 Jun 2017 08:31:20 -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=mWXNA8sJqRHb3uJnGx8EVvGlYEIREEB1feWdN/RQElg=; b=WYtuR+AOeoVKe2ObReigTjmpzVIZMPCI/i1gmZ6Esm8ntqrT6otb+76G43vrY/3ToL KTodHtoO+K/vvscfvqS8QHJf1eZPd/r6i1F7D082dfEpxsmvX+ViLalbCD+yXRsDjfYs 5zDTYYcFgrXr0ryolO7Zdp8nSrtscgL++mQ1dxZ2Cq56oJSFDiI3tefVTRjNLl7e6R9+ 3JwTuUtRZKOZsn99owiDN1+NKyObLvLAOmmlrIx4XDf9QLe+EGc8MjyzLgYrQRbhAaC9 X1kkMTXx1ZPZ3E8/z8KrYjnk8Q9mywJ5qIWpB1i6ZKBAk/KAn/PWyK5waC8CYQzkteRU rSXA== X-Gm-Message-State: AKS2vOyPhukrvwGcxrkXr4A8P/dwpkKCNkhbca2cCDkPP7pCowskRdya S7Ev3wttGMdxwoxe X-Received: by 10.36.44.211 with SMTP id i202mr8399862iti.46.1497367878800; Tue, 13 Jun 2017 08:31:18 -0700 (PDT) Received: from E107787-LIN (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id 66sm1678812itj.1.2017.06.13.08.31.17 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 13 Jun 2017 08:31:18 -0700 (PDT) From: Yao Qi To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 06/25] Generate c for feature instead of tdesc References: <1497256916-4958-1-git-send-email-yao.qi@linaro.org> <1497256916-4958-7-git-send-email-yao.qi@linaro.org> <837f0h5kjz.fsf@gnu.org> <86wp8gccqv.fsf@gmail.com> <83h8zk3pu3.fsf@gnu.org> Date: Tue, 13 Jun 2017 15:31:00 -0000 In-Reply-To: <83h8zk3pu3.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 13 Jun 2017 17:49:24 +0300") Message-ID: <86k24fdhvf.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-06/txt/msg00390.txt.bz2 Eli Zaretskii writes: > Sorry, I don't understand: built into GDB how? The GDB in which the > user runs this command can then turn around and have the produced file > built into it? Yes, We feed GDB the XML target description file, let GDB print the c file, and then include these generated c files in *-tdep.c. That is, in gdb/features/Makefile, we have, %.c: %.xml $(GDB) -nx -q -batch \ -ex "set tdesc filename $<" -ex 'maint print c-tdesc' > $@.tmp sh ../../move-if-change $@.tmp $@ it generates gdb/features/*.c files from the corresponding .xml files. They are included in gdb source, like, in gdb/i386-linux-tdep.c, #include "features/i386/i386-linux.c" #include "features/i386/i386-mmx-linux.c" #include "features/i386/i386-mpx-linux.c" #include "features/i386/i386-avx-mpx-linux.c" #include "features/i386/i386-avx-linux.c" #include "features/i386/i386-avx-avx512-linux.c" #include "features/i386/i386-avx-mpx-avx512-pku-linux.c" --=20 Yao (=E9=BD=90=E5=B0=A7)