From: Jimi Xenidis Subject: Re: Re: [Xen-changelog] [xen-unstable] [XEN] BUG() places console in sync mode. Date: Tue, 4 Jul 2006 13:01:21 -0400 Message-ID: <2AFD070A-6EED-45AB-8149-9F4C0FFAB3BC@watson.ibm.com> References: <6439B35F-3C48-4027-B0B8-2F6D2C2FCA22@watson.ibm.com> <643386083a641c77eec58bc2021a2d37@cl.cam.ac.uk> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <643386083a641c77eec58bc2021a2d37@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Jun 30, 2006, at 12:04 PM, Keir Fraser wrote: > > On 30 Jun 2006, at 16:57, Jimi Xenidis wrote: >> >> I can understand panic() being "noreturn", which it isn't, but >> __bug() should not, since It should result in some debugging logic >> (gdb, xmon, whatever) that could potentially continue. > > Is it used in any contexts other than where some pretty serious > error has occurred and all you want to do is postmortem? I don't > think continuing would ever be be helpful or sane. So: panic(): STOP but eventually reboot __bug(): STOP and loop forever for postmortem/debugging cannot be suppressed ASSERT(): STOP but can be suppressed (!NDEBUG ) Panic is very serious, but BUG and ASSERT, to me, are used to indicate some error in programming logic, if that error can be "fixed" during a debugging session then the ability to continue is quite valuable, especially if it takes a long time ot get to the BUG(). if it is not BUG, then perhaps we can introduce something like BREAKPOINT() that can be used for this purpose? -JX