From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +Ix2NvUv/GVdRRAAWB0awg (envelope-from ) for ; Thu, 21 Mar 2024 09:02:45 -0400 Received: by simark.ca (Postfix, from userid 112) id DA46B1E0C0; Thu, 21 Mar 2024 09:02:45 -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 C957C1E030 for ; Thu, 21 Mar 2024 09:02:43 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 69E323858C98 for ; Thu, 21 Mar 2024 13:02:43 +0000 (GMT) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by sourceware.org (Postfix) with ESMTPS id E44FA3858D28 for ; Thu, 21 Mar 2024 13:02:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E44FA3858D28 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 E44FA3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711026145; cv=none; b=jaGxnABd4+7cuj9ltzvN4nQZ8bFU4PgzEOE2TZ3yu1Z01+Xmoun/SuANTybnlCxD35YESIbUTaA+zhnZAbTgCFaAA318mrEh3Y7IwpEKbqQn5XEwfnz9E7wpLOnVpX/+iIANT5vKmjQAsKc1zrHme1MYvTZSXZSB/+NXLbEc4S4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711026145; c=relaxed/simple; bh=AbcLXQa80WNHTGGJ8gz5Oe8h2VG5GLXnKLC9nExErbE=; h=Message-ID:Date:MIME-Version:Subject:From:To; b=rMKZwFSugK5mv6klPGM5G5AkvI26DnXC1l0ZGpBz/+BI6uecHTp1rzeUxHsRORAHBXBnYRxKD+cee3P67BtY2JLbQLB1++cMBlktKIHOhH7H1wT2U/knh9KDZElrQJazPPe2JTjSOT5towY45GMbZDivl2if+zB6ZtUdj6SsSsQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4146e5c719bso7219785e9.2 for ; Thu, 21 Mar 2024 06:02:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711026134; x=1711630934; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=y3xwrRbC02EAeSrYcLSJwW6KrqE3gIkI/Ecnz2BF1Fc=; b=DPhkilfUorFVTCKKy/PQcV9+64dq5/XW9hq6HnvCJIT+8btLisF85N7AII118mr78I 6c/mxSxl4yt8M2WfOxSVrWEgP5FyYaEELoW7CktFfRi3wVLmIx6Sq3I+UESKSR3VUVx+ Kr1L8tzJEJz00v0qYXJusVMmQazQdGiunOyBKDgI6m7p4sCsO4yzaUJjswx6M5dW2teJ aUD2rqGRGCA5OlzxpPwK1Z/hB3WS0ymtgr+DF/tv1AiSyUFd2e2j4jIebsA+9xCzZNyU zqw727aN1ApHOgRcv8836OCKXbRPb/oebh8l8DuMM7EV96s7oxblUA3zlrxcoB4+oUfx t8yw== X-Forwarded-Encrypted: i=1; AJvYcCWoVXCxdv+Q5nh7d3scVtAgF8PetouUFx1mEJ6OqDyx4wFzRC2hNemN8L+YTZhj6ZhHVzcqVWiicLDwQsgiQoNNaP3g+KRHMWQ5nw== X-Gm-Message-State: AOJu0Yx6PptlXRtTnbkEaoUqi2wu3vL7YQhtQodEcbiLtjZrELaM0fwY p2eAYD8zqmQujM9rP9rrrglo2L34klEoucX9Cxg4ZgBlCQcnRLM6SAdD6kRq X-Google-Smtp-Source: AGHT+IFGUQJk49ww6eJ8R2I+C6NnVKPwPdaJJG44L1NtDVR+3vppGPRavz+1KfeCnSDlCiBqEcM8Lw== X-Received: by 2002:a05:600c:45c8:b0:413:f174:4b46 with SMTP id s8-20020a05600c45c800b00413f1744b46mr4212596wmo.23.1711026133384; Thu, 21 Mar 2024 06:02:13 -0700 (PDT) Received: from ?IPV6:2001:8a0:f918:ab00:5ea7:1bb:7941:5784? ([2001:8a0:f918:ab00:5ea7:1bb:7941:5784]) by smtp.gmail.com with ESMTPSA id a5-20020a5d4d45000000b0033e03a6b1ecsm17149175wru.18.2024.03.21.06.02.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Mar 2024 06:02:12 -0700 (PDT) Message-ID: Date: Thu, 21 Mar 2024 13:02:09 +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 From: Pedro Alves 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> In-Reply-To: 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-21 12:50, Pedro Alves wrote: > And at each step of the way, editing a header file always sees the exact > same set of pre-included files/symbols as when the same header > is compiled normally. Let me clarify this. Here I was generally referring to the rule that source files should include their module header right after defs.h. Like: foo.c: #include "defs.h" #include "foo.h" * other includes * So with that, there's one compilation unit that compiles "foo.h" exactly the same as what clangd sees when editing foo.h. That even enforces "include what you need" in foo.h (other than the things defs.h already includes, of course). We don't do that presently in many places, but we should do it throughout. IIRC, Tromey even had a series to normalize that throughout the tree a few years ago. I don't recall why it didn't land.