From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QNpxIzOn/WVErhEAWB0awg (envelope-from ) for ; Fri, 22 Mar 2024 11:43:47 -0400 Received: by simark.ca (Postfix, from userid 112) id 8E2051E0C0; Fri, 22 Mar 2024 11:43:47 -0400 (EDT) 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 793F81E030 for ; Fri, 22 Mar 2024 11:43:45 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D816A385841A for ; Fri, 22 Mar 2024 15:43:44 +0000 (GMT) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by sourceware.org (Postfix) with ESMTPS id 102943858C32 for ; Fri, 22 Mar 2024 15:43:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 102943858C32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 102943858C32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711122208; cv=none; b=VtntEAbJmV54GaCOdaN8VsMc6rWXskNtoMjemOUb5uLJ4UJAeFnx24FA6pw/5kxjrnhT04rj1vLjdUqBiAPW/pdJXwyUjsd2QLNmqwPeb+GJuvOE9RYaKLRbxQcWt/sViwngfYn0eWmBid4qAD1aAp3tV94EtAZXKWKCrKnOf88= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711122208; c=relaxed/simple; bh=CxbbVvzKlmCWmRpQX6YqY4iVThgjDwyD4kR2fZnerOY=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=AMTDgyxLILAHQD4TaOyGcVUXAGaVwchiFVQ94Ya6IdiYil6Puhp+C4V9ZE+/ytBq5o/maMN8Vn4DTt9ElAq/I3cASvAaa5nllgn72fgsWsIXK5kT1yHaCU/IujPNMZteyV6QeZFAoTncp+0owVjPxMwcrCOb35XYK8CqXHDPPNY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4147c286309so5277935e9.3 for ; Fri, 22 Mar 2024 08:43:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711122206; x=1711727006; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=a++YiEff0f8e8MJrlgp2oBPvuiNsITxz45UTrciTgM4=; b=B0aa0nHNNLrfT27Em6OkeZmUpQ6sUYkkbmIFUnJ5CbqWbrzKNqUk5DzEEyUsa3O5ev HhrqzkyepC+hpEIZ45//9cnAUosnxyaoqylRvB5kKSHq2FSR0v06PXldi82hQd1aT4Lx xnHDB5TAj0YlzswXQlnJz1VOWBUVrZcOuMgyCv3XqS3C/LehP57zcAiFR+p6U4br2L66 Cv8/Tx+I0H1OOo5v4CCc36akZk5EoRKHECAnHX3nHL4b5LyaHrZ7qs4+AWEnKAn1PHPi g2sisQTIl39PA1OeLzHWaS3Z0GyihmAxQ+NsPKSh/A3368kBeZfgZxdPDgn384EI3r8C lh7A== X-Forwarded-Encrypted: i=1; AJvYcCW1y3/RRl7oZPpvzrFVb0LZZTbrLWUXaRjykaPrOW+AviCssrxnO+aZ1gDuQbgLROb+Qdy0lISSurt3155wZCQqUSkP1oTYxKOw3Q== X-Gm-Message-State: AOJu0Ywv9h+quQN7go9eQ6HcW0SzbFbWlLDEXXyF1jnUX9rYQpeG7nur FGqJ4LrtKTQRJtzHKO+Tafa85d6aN70OWozU6//qrmVufj3gpWsC X-Google-Smtp-Source: AGHT+IEwXlPFGcQY4Inz3Sez28UaQQI5Ns1CROHE02g8er+1mG7QZelRJfTC6ejMntfn+tDKhNi6ew== X-Received: by 2002:a05:600c:a02:b0:413:f7cb:75c1 with SMTP id z2-20020a05600c0a0200b00413f7cb75c1mr1969426wmp.16.1711122205469; Fri, 22 Mar 2024 08:43:25 -0700 (PDT) Received: from ?IPV6:2001:8a0:f918:ab00:3ba9:feec:1922:9a68? ([2001:8a0:f918:ab00:3ba9:feec:1922:9a68]) by smtp.gmail.com with ESMTPSA id n39-20020a05600c3ba700b0041409cabb39sm9222401wms.18.2024.03.22.08.43.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Mar 2024 08:43:25 -0700 (PDT) Message-ID: <2d9ba39d-317f-4c2d-bc1d-7236e886f55b@palves.net> Date: Fri, 22 Mar 2024 15:43:23 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] gdb, gdbserver, gdbsupport: include config.h files with -include Content-Language: en-US To: Simon Marchi , Simon Marchi , gdb-patches@sourceware.org References: <20240318200257.131199-1-simon.marchi@efficios.com> <20240318200257.131199-2-simon.marchi@efficios.com> <2da78531-8a3a-4ac9-a87c-f4962d573fce@palves.net> <9a146cea-3adf-4365-8eb7-60c65d00dcf4@simark.ca> <13639831-3749-4d8d-83d1-dec2174320c0@simark.ca> From: Pedro Alves In-Reply-To: <13639831-3749-4d8d-83d1-dec2174320c0@simark.ca> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP 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 2024-03-22 15:08, Simon Marchi wrote: > On 3/22/24 10:55, Simon Marchi wrote:> Ack, thanks! >> >> Simon > > One question: files such as gdb/arch/arc.c currently include > gdbsupport/common-defs.h, since they are compiled separately in the gdb > and gdbserver context. With my changes (even when I'll update my patch > to take the approach you suggest), the gdb-compiled version will use > `-include defs.h`, while the gdbserver-compiled version will use > `-include server.h`. Both defs.h and server.h include common-defs.h, so > it works. But is it a problem? Should I modify the build system so > that these shared files use `-include gdbsupport/common-defs.h`? I think we can go either way at this point, I don't think it's a real problem unless we move the files to gdbsupport/. Using common-defs.h helps a little with avoiding adding gdb-only or gdbserver-only code, but then OTOH, some of the files under gdb/arch/ already have conditional compilation with #ifdef GDBSERVER, unfortunately, so we're not ready to move them somewhere where they're compiled once. > > Another (more involved) option would be to see if these files could get > moved to gdbsupport. Yeah.