linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Jimi Xenidis <jimix@watson.ibm.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	paulus@samba.org, Hollis Blanchard <hollisb@us.ibm.com>,
	ppc-dev <linuxppc-dev@ozlabs.org>
Subject: Re: [POWERPC] mark BUG() as noreturn
Date: Thu, 21 Sep 2006 14:23:00 +0100	[thread overview]
Message-ID: <928.1158844980@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <135B477D-5DF8-48E9-94FD-A114A4526177@watson.ibm.com>

Jimi Xenidis <jimix@watson.ibm.com> wrote:

> > We finish the BUG() macro with a call to a function marked with  
> > attribute
> > "noreturn" so that the compiler will know that BUG() and BUG_ON()
> > (with a constant, non-zero argument) will not return.
> 
> But BUG() _can_ return, if I have a probe, xmon or kgdb configured it  
> is possible  to play with the state of the world and try to continue/ 
> recover, (xmon "x" command).  IMHO, this is a powerful debugging  
> scenario.

It could be made configurable.

OTOH, it is handy to mark BUG() as not being able to return as that tells the
compiler that it doesn't have to check that the code path through the BUG()
call is complete and this means it can be more relaxed about generating
warnings about potentially unused variables and suchlike.

David

  parent reply	other threads:[~2006-09-21 13:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-05  2:08 [POWERPC] merge iSeries i/o operations with the rest Stephen Rothwell
2006-09-05  5:07 ` David Woodhouse
2006-09-05  5:39   ` Stephen Rothwell
2006-09-05 16:41 ` Linas Vepstas
2006-09-05 23:19   ` Stephen Rothwell
2006-09-06  8:24 ` Stephen Rothwell
2006-09-18  5:38 ` Stephen Rothwell
2006-09-20 12:15   ` Stephen Rothwell
2006-09-20 16:01     ` Hollis Blanchard
2006-09-21  0:03       ` Stephen Rothwell
2006-09-21  0:20         ` Michael Ellerman
2006-09-21  4:55           ` [POWERPC] mark BUG() as noreturn Stephen Rothwell
2006-09-21 12:18             ` Jimi Xenidis
2006-09-22  0:54               ` Michael Ellerman
2006-09-22  1:34                 ` Amos Waterland
2006-09-22 10:58                 ` Jimi Xenidis
2006-09-21 13:23             ` David Howells [this message]
2006-09-21 15:15               ` Segher Boessenkool
2006-09-21  8:00         ` [POWERPC] merge iSeries i/o operations with the rest Stephen Rothwell

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=928.1158844980@warthog.cambridge.redhat.com \
    --to=dhowells@redhat.com \
    --cc=hollisb@us.ibm.com \
    --cc=jimix@watson.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=sfr@canb.auug.org.au \
    /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;
as well as URLs for NNTP newsgroup(s).