From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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: From: David Blaikie Date: Mon, 8 Mar 2021 14:39:31 -0800 Message-ID: Subject: Re: GNU style checker for GDB To: Simon Marchi Cc: Zied Guermazi , gdb@sourceware.org X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Mon, 08 Mar 2021 22:39:44 -0000 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.