From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mMsHIbKnRmBHcQAAWB0awg (envelope-from ) for ; Mon, 08 Mar 2021 17:39:46 -0500 Received: by simark.ca (Postfix, from userid 112) id 84D621EF78; Mon, 8 Mar 2021 17:39:46 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 397E21E789 for ; Mon, 8 Mar 2021 17:39:46 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D7FC03951402; Mon, 8 Mar 2021 22:39:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D7FC03951402 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615243185; bh=ENKHmTUcRY3iRnIsMyKoSl265b2+HnnF5+yrHmqCYB0=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=K1vB/naU0RmzPss/JgucgIJa2ak7k5eL7gYpRkH1ZYhJvOzgImgqXOA6+VI00juyS tbaqJ7c09SHwPVRsF1SaoHAxLCGmYBNeZChPeUCvm3JnHQASLjgzFJDBuLfciiait4 zhz7C7CS5oiidEt/Xf3y2r4zEuiZjKP5EtkUMbKQ= Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by sourceware.org (Postfix) with ESMTPS id 0F8723950400 for ; Mon, 8 Mar 2021 22:39:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0F8723950400 Received: by mail-io1-xd30.google.com with SMTP id 81so11763514iou.11 for ; Mon, 08 Mar 2021 14:39:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NSUCQL36PYuhqJKGnBu890O0PbWLy4O5p/5KmavN/8I=; b=kFq+KFhbrcgKJj9JTe8tnuuXE0gXec3l24RK6gA8ugCXAH4BxpgPx546QwxZY7cxSy Kf7DOGBiQkSbDpLGv6VLdYDjsQ9/Nkf2Q+Xk8ouTTSz65mDxQ/K3pFntXGlYHr/wR75s UInYVlnIdtgIqt1szq8rZYm/ijo+m0gcR7Y3tfFG39hHT1rbvkwEN5Fvh2SWJOjVZ1+o IJDyYOp9lGiUCABLzL4OTWC9mY2WF6v01QQ42Nt9T1jInZkZXIPxvHRq1bKGliyyh2Nd a6zKQID9GrojFFmmk7OhnJBuG9aLGppJuciSFggw4ZYqpJ30d7OZCT8EpcRNCY5055vW o/wA== X-Gm-Message-State: AOAM533AK8enzF7ceW37Llv4OGarX3VetuPEpYLAUdCylEPvwteRw93T go1nCSSiUpLFcz5qLdER1Ljdk8F8A1d2pPJa1Yg= X-Google-Smtp-Source: ABdhPJxMAIpW3CTGRsHAkKztXd5uMaMGRWQjnmae0kQ2wV6+X015aXkFH4GEU15uhpSMptrLQKevV4RhrQrHohVYZSk= X-Received: by 2002:a02:a606:: with SMTP id c6mr26814267jam.108.1615243182560; Mon, 08 Mar 2021 14:39:42 -0800 (PST) MIME-Version: 1.0 References: <3a4748a5-8059-aa9e-a55a-3939dd569c36@trande.de> <278d129c-f27c-c47c-3e33-4a5a85cda855@polymtl.ca> In-Reply-To: Date: Mon, 8 Mar 2021 14:39:31 -0800 Message-ID: Subject: Re: GNU style checker for GDB To: Simon Marchi Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: David Blaikie via Gdb Reply-To: David Blaikie Cc: gdb@sourceware.org, Zied Guermazi Errors-To: gdb-bounces@sourceware.org Sender: "Gdb" On Mon, Mar 8, 2021 at 2:31 PM Simon Marchi wrote: > On 2021-03-08 3:39 p.m., David Blaikie wrote: > > If anyone's interested in investing some time in it, I expect > clang-format would be open to bugs/patches to support whatever formatting > idioms gdb needs. > > That's one of those things I'd really like to try, but will never have > time. But I can at least file some bugs. > > What stopped me from doing so in the past is that the missing things > were really some things I would consider like oddities / inconsistency > of our style. For example, we use space before parenthesis, except for > the `_` (gettext) macro: > > printf (_("Hello %s\n"), name); > > If we tell clang-format we want spaces before function call parenthesis, > it (rightfully) inserts a space after the `_`. To prevent that, I > suppose we'd need a way to say: in general I want this style, but for > this macro I want this other style. I fear I'll be called crazy if I > request that :). > I think if you can point to a widely used style (the gdb (& binutils more generally?) codebase) there's probably going to be a fair bit of sympathy/understanding there.