Fix dump_my_stack to handle cleanly end of unwind
This commit is contained in:
parent
f25093ffce
commit
0dd3ca94ce
1 changed files with 7 additions and 2 deletions
|
@ -28,7 +28,11 @@ void dump_my_stack() {
|
|||
(dl_rc && dl_inf.dli_sname) ? dl_inf.dli_sname : "(no symbol)",
|
||||
cur_map_entry.pathname.c_str());
|
||||
fflush(stdout);
|
||||
try {
|
||||
unw_context = dw.unwind_context(unw_context);
|
||||
} catch(const DwarfInterpret::FirstUnwindFrame& exn) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,6 +40,7 @@ void fill_my_stack(int stack_depth) {
|
|||
if(stack_depth == 0)
|
||||
dump_my_stack();
|
||||
|
||||
else
|
||||
fill_my_stack(stack_depth - 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue