This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix Gold/strip discrepancies for PR 11786
- From: Doug Evans <dje at google dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, gdb-patches <gdb-patches at sourceware dot org>, Pedro Alves <palves at redhat dot com>
- Date: Wed, 6 Nov 2013 13:14:27 -0800
- Subject: Re: [PATCH] Fix Gold/strip discrepancies for PR 11786
- Authentication-results: sourceware.org; auth=none
- References: <yjt24n85x78h dot fsf at ruffy dot mtv dot corp dot google dot com> <20131031154957 dot GA11260 at host2 dot jankratochvil dot net> <CADPb22QKBpYpmmZzeKJy7JWukpfkTQcYZDm+KeEkr6K_92LJ2A at mail dot gmail dot com> <87li13shk2 dot fsf at fleche dot redhat dot com> <CADPb22QNaGzvagsDwgt2mAVOQw9kQxtKbnHKtnTbUMy-7xaJhw at mail dot gmail dot com> <20131105172219 dot GA21529 at host2 dot jankratochvil dot net> <CADPb22Tcg9g=pCG1q07hK6DkRnTQop7bZynqnoN+upiuDBWsZA at mail dot gmail dot com> <20131105180547 dot GA24004 at host2 dot jankratochvil dot net>
On Tue, Nov 5, 2013 at 10:05 AM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Tue, 05 Nov 2013 18:56:29 +0100, Doug Evans wrote:
>> If the decision is to be more strict with the rules for testcases
>> that's fine by me.
>> Let's write it down, then discussions like these will become a *lot* shorter.
>
> Adding more and more rules I do not find as a clear win.
> When I code GDB I have to think about so many established non-standard coding
> style rules my head is going to explode. Switching between multiple projects
> each having different coding style makes it worse.
>
> But sending a patch and getting it corrected here and there due to unwritten
> rules one could not find anywhere is also not great, though, I agree.
At the end of the day I'm still lacking the clarity I seek.
[It's not imperative, but it's more than "IWBN".]
I'm not suggesting adding more rules (per se), but I do think there's
no downside to writing down existing unwritten rules (for those things
that are, indeed, rules).
I'm going to propose the following, and if y'all are ok with it then
this can be the end of it, this thread is done.
If there are no objections, I will add a Testsuite section to the
C-Coding-Standards section of the wiki:
https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards
It will basically say tests are in general not required to following
the GDB coding standards,
but there are a few exceptions, and then have an enumeration of explicit rules,
and for now just have the one: (void) is required over ().
And for grin's sake, since there's so many of them, and less likely to
be a problem, int main () is ok.
I'll also mention that "Monkey See Monkey Do hacking should generally
Just Work."
[There's less need to go into detail if one can say one can just mimic
existing code.
That will keep it short-and-sweet.
I'm ok with people adding more to the wiki, but I like taking "baby steps".]
I'll probably also add a link to the new section to:
https://sourceware.org/gdb/wiki/GDBTestcaseCookbook