Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Joe Buck <Joe.Buck@synopsys.COM>
To: Paul Koning <Paul_Koning@Dell.com>
Cc: mark.kettenis@xs4all.nl, drow@false.org, gcc@sources.redhat.com,
	        sposelenov@emcraft.com, gdb@sources.redhat.com
Subject: Re: Problem reading corefiles on ARM
Date: Wed, 06 Aug 2008 17:52:00 -0000	[thread overview]
Message-ID: <20080806175125.GM18206@synopsys.com> (raw)
In-Reply-To: <18585.57711.850217.939413@gargle.gargle.HOWL>


I wrote:
>  Joe> There are several effects from "noreturn".  We would want some
>  Joe> of these effects for "abort", but not others, to get debuggable
>  Joe> code without degrading compile-time warnings.

On Wed, Aug 06, 2008 at 01:37:51PM -0400, Paul Koning wrote:
> So the issue is that two unrelated features are currently combined in
> a single attribute:
> 
> 1. This function doesn't return, do the right thing with warnings in 
>    the caller of this function.
> 
> 2. Don't bother saving registers when calling this function because it
>    won't return so the registers aren't needed afterwards.
> 
> The issue is that #2 doesn't apply to "abort" because the registers
> ARE needed afterwards -- at debug time.

But not necessarily all of them (depending on platform).  That is,
the caller-saved registers don't have to be saved because the function
isn't returning, but there has to be enough of a stack frame so that
a debugger can set a breakpoint on the abort and determine who the
caller was.

> One possibility is to have "noreturn" mean #1 only, and invent a new
> flag for #2.  The alternative is to have "noreturn" mean both (as
> today) and invent a new flag to cancel #2.
> 
> I'd suggest the former because that's the more likely case.  It's hard
> to think of examples where #2 is needed (or at least, where it is
> important). 

Evidently there was a motivating application where #2 was an important
optimization.  Still, I think you're right that it would be better to
do it only if the optimization is asked for (via a new flag).


  reply	other threads:[~2008-08-06 17:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-06 15:20 Sergei Poselenov
2008-08-06 15:28 ` Daniel Jacobowitz
2008-08-06 15:45   ` Mark Kettenis
2008-08-06 15:51     ` Daniel Jacobowitz
2008-08-06 16:02     ` Paul Koning
2008-08-06 17:10       ` Joe Buck
2008-08-06 17:39         ` Paul Koning
2008-08-06 17:52           ` Joe Buck [this message]
2008-08-06 18:11             ` Paul Koning
2008-08-06 21:39               ` Andreas Schwab
2008-08-06 21:58                 ` Joe Buck
2008-08-07 13:30                   ` Paul Koning
2008-08-07 16:56                     ` Joe Buck
2008-08-07 17:29                       ` Paul Koning
2008-08-07  9:30   ` Sergei Poselenov
2008-08-07 13:44     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080806175125.GM18206@synopsys.com \
    --to=joe.buck@synopsys.com \
    --cc=Paul_Koning@Dell.com \
    --cc=drow@false.org \
    --cc=gcc@sources.redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=mark.kettenis@xs4all.nl \
    --cc=sposelenov@emcraft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox