projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1f2dc8
)
Make backtraces slightly more reliable.
author
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 10 Nov 2008 04:07:40 +0000
(20:07 -0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 10 Nov 2008 04:07:40 +0000
(20:07 -0800)
We now ignore pointers that are not null but still clearly wild.
We could check that there's really a valid PDE and PTE (I think Linux
does this) but it would take more code and be ugly.
src/lib/debug.c
patch
|
blob
|
history
diff --git
a/src/lib/debug.c
b/src/lib/debug.c
index 6d7c9e13bf064761b1496a232994040498b4c5d2..1dc1bf8fd69db3c5651654620dcf79200cbf6844 100644
(file)
--- a/
src/lib/debug.c
+++ b/
src/lib/debug.c
@@
-17,7
+17,7
@@
debug_backtrace (void)
printf ("Call stack:");
for (frame = __builtin_frame_address (0);
-
frame != NULL
&& frame[0] != NULL;
+
(uintptr_t) frame >= 0x1000
&& frame[0] != NULL;
frame = frame[0])
printf (" %p", frame[1]);
printf (".\n");