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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|