parlib: Improve panic() and assert()
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 25 Apr 2017 16:29:51 +0000 (12:29 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 3 May 2017 16:13:02 +0000 (12:13 -0400)
commit4e7f343f0768fd5b7e1f6a17f3145e768d69d84d
tree6272ed9aa0049aebdb5b4f3c84c18843f87faffe
parentd2667a247248fd9f3fa4dca7ebf64ad2d9ce0961
parlib: Improve panic() and assert()

Two things:
- Don't use printf() in panic/assert.  It will soon be illegal to use
  glibc's IO functions (including printf()) from vcore context.
- Force a backtrace on assert/panic.  Note this does not replace glibc's
  assert, so you'd have to #include <parlib/assert.h> to get it.  For now.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/trap.c
user/parlib/include/parlib/assert.h
user/parlib/panic.c
user/vmm/memory.c