From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id P3A1KB/nt2U0RAwAWB0awg (envelope-from ) for ; Mon, 29 Jan 2024 12:57:51 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; secure) header.d=lancelotsix.com header.i=@lancelotsix.com header.a=rsa-sha256 header.s=2021 header.b=q89pQmLo; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 97F3C1E0C3; Mon, 29 Jan 2024 12:57:51 -0500 (EST) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DA0BD1E092 for ; Mon, 29 Jan 2024 12:57:48 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F1E0138582A3 for ; Mon, 29 Jan 2024 17:57:47 +0000 (GMT) Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id 1CC153858C2D for ; Mon, 29 Jan 2024 17:57:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1CC153858C2D Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=lancelotsix.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lancelotsix.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1CC153858C2D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=51.195.220.111 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706551033; cv=none; b=btpvNDlHaIZyOI6toyHGHJXUwk0AwtQ58od3cnbzF45qbMQQ5TC0xvAvCM/akicRe9DjaHYKQCvDMxqtt/67M/LP/vas3T6GZ1TE5fqFZeELWZUvJ8mf/3pCoaKZN2bF2LRrfZhGKEcmQS7OXaZ6mA8V4e9Rnbfah3bPhUsr2Xo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706551033; c=relaxed/simple; bh=6Trv1JRkZyyYv4V+dDSJ+C5ddYImLHZ1yBjyniEQJ98=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=RRpHyvSTMeqDiaBNYQhycfPb4bDZsJKXcEym4ZIyUP1b6O1pEcbpykNlYv6Bxq68Xkj3IIxzQ403+qyDy5MQgueXBJbJhdp13pIcj+S38HsDyedRSmXzA1+VvqRPRaIYy3sIbeSK3gSgU4A9EA7Pgn/ZwHaXBwBt7Q4YSN/z98o= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from octopus (cust120-dsl54.idnet.net [212.69.54.120]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 16CFE8BCC8; Mon, 29 Jan 2024 17:57:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lancelotsix.com; s=2021; t=1706551029; bh=6Trv1JRkZyyYv4V+dDSJ+C5ddYImLHZ1yBjyniEQJ98=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q89pQmLowVcEV43TA5+IC6q20trlCM5LFV4KdMHRAd3sqEodfMgsvt6tEpu3k+lab fLTQGB5/Sp3ok6tAF1EsX7enqN2j178Q80IsI1pJUKfWY7HrsS9qgcVqxEz9VMkbts zSnhYVU/zBw92LHRQvWgjFq4HjqQpeP/+j1UKCx1QtMcM2uBwVp/wqEr1MmpFiosX9 R+c3KNTAY9Tgtq2e9FumuH7Qqa/j025bBZUze2n1N8BcBDwYNyjJoqzfK5i7kaeLvt UqezvRP1P5PHcHEV6U0gLigZxOndiul1WGwJe4Ek2YHjZ9yho+bME0SLmw6aEo26dh zvn7qU4Jv804w== Date: Mon, 29 Jan 2024 17:57:03 +0000 From: Lancelot SIX To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v2 10/30] Use a .def file for domain_enum Message-ID: <20240129175703.ioxpkdcql2n4dxn3@octopus> References: <20240118-submit-domain-hacks-2-v2-0-aecab29fa104@tromey.com> <20240118-submit-domain-hacks-2-v2-10-aecab29fa104@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240118-submit-domain-hacks-2-v2-10-aecab29fa104@tromey.com> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (lndn.lancelotsix.com [0.0.0.0]); Mon, 29 Jan 2024 17:57:09 +0000 (UTC) X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_STOCKGEN, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org On Thu, Jan 18, 2024 at 01:32:08PM -0700, Tom Tromey wrote: > Future patches will change and reuse the names from domain_enum. This > patch makes this less error-prone by having a single point to define > these names, using the typical gdb ".def" file. > --- > gdb/guile/scm-symbol.c | 18 ++++++++++-------- > gdb/python/py-symbol.c | 21 ++++++++------------- > gdb/sym-domains.def | 47 +++++++++++++++++++++++++++++++++++++++++++++++ > gdb/symtab.c | 10 ++++------ > gdb/symtab.h | 31 +++---------------------------- > 5 files changed, 72 insertions(+), 55 deletions(-) Hi Tom, FYI, starting this patch I have a CI box running centos-7 which fails with: In file included from ../../gdb/tui/tui-source.c:25: ../../gdb/symtab.h:897: error: "DOMAIN" redefined [-Werror] 897 | #define DOMAIN(X) X ## _DOMAIN, | In file included from /opt/rh/devtoolset-9/root/usr/include/c++/9/cmath:45, from /opt/rh/devtoolset-9/root/usr/include/c++/9/math.h:36, from ../gnulib/import/math.h:41, from ../../gdb/tui/tui-source.c:23: /usr/include/math.h:332: note: this is the location of the previous definition 332 | # define DOMAIN 1 | The DOMAIN macro used to call the .def conflicts with the one from /usr/include/math.h (glibc-1.17, so yeah, quite old). A fix can be to use DOMAIN_ (or SYM_DOMAIN any better name) in sym-domains.def. Do you have a preferred name? Best, Lancelot.