This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Wishlist: declarations suitable for post mortem debugging
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: David Kastrup <dak at gnu dot org>, libc-help at sourceware dot org, libc-alpha at sourceware dot org
- Date: Thu, 26 Apr 2012 13:49:56 +0000 (UTC)
- Subject: Re: Wishlist: declarations suitable for post mortem debugging
- References: <87fwbqj00f.fsf@fencepost.gnu.org><CALoOobPMOFp=-YmJ-X-SNxczBHaN0G9BaDbzD-KehN-g+kfmPg@mail.gmail.com>
On Thu, 26 Apr 2012, Paul Pluzhnikov wrote:
> On Thu, Apr 26, 2012 at 2:49 AM, David Kastrup <dak@gnu.org> wrote:
> > So I would strongly suggest that functions that are _explicitly_
> > intended to dump core don't get marked as "__noreturn__". ?This seems
The noreturn attributes are needed for the compiler to know the control
flow when compiling the caller and avoid lots of spurious warnings from
thinking control flow can continue past a call to such a function. I
think the correct change would be to GCC, to reduce the default
optimizations around calls to noreturn functions. Note that a problem
with such an optimization affecting backtraces from abort on ARM was fixed
by <http://gcc.gnu.org/ml/gcc-patches/2009-11/msg01234.html>.
--
Joseph S. Myers
joseph@codesourcery.com