projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed backtrace to work with -O (now conforms to
[pintos-anon]
/
src
/
lib
/
debug.c
diff --git
a/src/lib/debug.c
b/src/lib/debug.c
index 1dc1bf8fd69db3c5651654620dcf79200cbf6844..b4f8c2d0b66ff0fc5542d213dc829101afdc0358 100644
(file)
--- a/
src/lib/debug.c
+++ b/
src/lib/debug.c
@@
-15,8
+15,8
@@
debug_backtrace (void)
static bool explained;
void **frame;
static bool explained;
void **frame;
- printf ("Call stack:
"
);
- for (frame = __builtin_frame_address (
0
);
+ printf ("Call stack:
%p", __builtin_return_address (0)
);
+ for (frame = __builtin_frame_address (
1
);
(uintptr_t) frame >= 0x1000 && frame[0] != NULL;
frame = frame[0])
printf (" %p", frame[1]);
(uintptr_t) frame >= 0x1000 && frame[0] != NULL;
frame = frame[0])
printf (" %p", frame[1]);