[PATCH] Use GCC5/DWARF5 DW_AT_noreturn to mark functions that don't return normally.

Pedro Alves palves@redhat.com
Sat Jan 24 00:32:00 GMT 2015


On 01/23/2015 04:33 PM, Mark Wielaard wrote:
> On Wed, 2015-01-21 at 17:07 +0000, Pedro Alves wrote:

>>> diff --git a/gdb/testsuite/gdb.base/noreturn.c b/gdb/testsuite/gdb.base/noreturn.c
>>> new file mode 100644
>>> index 0000000..e39cf15
>>> --- /dev/null
>>> +++ b/gdb/testsuite/gdb.base/noreturn.c
>>> @@ -0,0 +1,13 @@
>>
>> Please add a copyright header.  Even though some of our old
>> files don't have it, all new files should, even if the file
>> is small (so that we don't have to recall adding it back
>> if the file grows in future).
> 
> Added.
> Note that most .c files in gdb.base don't have such a header.

Yeah, that's why I felt completed to explain why we add it for
new files.  Adding the header to old files now requires looking at
the logs to know what would be the correct year range.  That's a lot
of boring work, so nobody ever does it.  And that's exactly
the work you've now spared someone in the future by adding
the copyright header now.

> Added the void.
> Note most existing .c tests in gdb.base don't declare functions with
> void arguments.

Yes, a lot of old code in the testsuite doesn't follow
the currently agreed rules for new files.
Doesn't mean we need to keep repeating past mistakes though.

See:
 https://sourceware.org/gdb/wiki/Internals%20GDB-Testsuite-Coding-Standards
 https://sourceware.org/gdb/wiki/GDBTestcaseCookbook

It's just the usual problem of lacking manpower to go through the
existing tests and update them.  It'd be great to see that
done (volunteers very much welcome!), but meanwhile, we try to
avoid propagating bad idioms in new tests.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list