GNU style checker for GDB
Simon Marchi
simon.marchi@polymtl.ca
Mon Mar 8 22:53:29 GMT 2021
On 2021-03-08 5:39 p.m., David Blaikie wrote:
>
>
> On Mon, Mar 8, 2021 at 2:31 PM Simon Marchi <simon.marchi@polymtl.ca <mailto:simon.marchi@polymtl.ca>> 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.
Ok, I will. Worst case, the idea is shot down.
I filed a first one here:
https://bugs.llvm.org/show_bug.cgi?id=49481
Simon
More information about the Gdb
mailing list