projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abb75db
)
fixed backtrace to work with -O (now conforms to
author
Godmar Back
<godmar@gmail.com>
Fri, 14 Nov 2008 02:30:41 +0000
(21:30 -0500)
committer
Godmar Back
<godmar@gmail.com>
Fri, 14 Nov 2008 02:30:41 +0000
(21:30 -0500)
http://gcc.gnu.org/onlinedocs/gcc/Return-Address.html )
src/lib/debug.c
patch
|
blob
|
history
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;
- 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]);