Commit 69eb8a11 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Improve the error messages here

parent 84cc3b31
......@@ -79,7 +79,9 @@ void collectStackRoots(TraceStack *stack) {
int code;
while (true) {
int code = unw_step(&cursor);
assert(code > 0 && "something broke unwinding!");
// Negative codes are errors, zero means that there isn't a new frame.
ASSERT(code >= 0 && "something broke unwinding!", "%d '%s'", code, unw_strerror(code));
assert(code != 0 && "didn't get to the top of the stack!");
unw_get_reg(&cursor, UNW_REG_IP, &ip);
unw_get_reg(&cursor, UNW_REG_SP, &sp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment