From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by server2.sourceware.org (Postfix) with ESMTPS id 294F1385C019 for ; Sun, 8 Mar 2020 04:16:48 +0000 (GMT) Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 4BB051E5F3; Sat, 7 Mar 2020 23:16:47 -0500 (EST) Subject: Re: [PATCH v2] arc: Migrate to new target features To: Shahab Vahedi , gdb-patches@sourceware.org Cc: Shahab Vahedi , Anton Kolesov , Francois Bedard References: <20200305160552.29193-1-shahab.vahedi@gmail.com> <20200307235422.13489-1-shahab.vahedi@gmail.com> From: Simon Marchi Message-ID: Date: Sat, 7 Mar 2020 23:16:46 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200307235422.13489-1-shahab.vahedi@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US-large Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_PASS autolearn=ham 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: Sun, 08 Mar 2020 04:16:49 -0000 On 2020-03-07 6:54 p.m., Shahab Vahedi wrote: > From: Anton Kolesov > > This patch replaces usage of target descriptions in ARC, where the whole > description is fixed in XML, with new target descriptions where XML describes > individual features, and GDB assembles those features into actual target > description. Hi Shahab, The patch is ok, with the nit below fixed. Also, I remembered that other architectures that use feature-based target descriptions cache the target descriptions, such that if you request a tdesc with the same features twice, the exact same instance is returned. See for example: - amd64_linux_read_description - arm_read_description I can't remember if this is just a simple optimization or if it's actually required... > diff --git a/gdb/arch/arc.h b/gdb/arch/arc.h > new file mode 100644 > index 00000000000..dc7871c3103 > --- /dev/null > +++ b/gdb/arch/arc.h > @@ -0,0 +1,20 @@ > +/* Copyright (C) 2017-2020 Free Software Foundation, Inc. > + > + This file is part of GDB. > + > + This program is free software; you can redistribute it and/or modify > + it under the terms of the GNU General Public License as published by > + the Free Software Foundation; either version 3 of the License, or > + (at your option) any later version. > + > + This program is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + GNU General Public License for more details. > + > + You should have received a copy of the GNU General Public License > + along with this program. If not, see . */ > + > +#include "gdbsupport/tdesc.h" > + > +target_desc *arc_create_target_description (bool print_debug, bool is_arcv2); This file (arc.h) is missing include guards. Simon