Handle cleanly the absence of RBP
This commit is contained in:
parent
0dd3ca94ce
commit
4369a4f3cc
1 changed files with 11 additions and 7 deletions
|
@ -205,13 +205,17 @@ DwarfInterpret::UnwindContext DwarfInterpret::unwind_context(
|
|||
// An undefined RA means we've reached the end of the call stack
|
||||
throw FirstUnwindFrame();
|
||||
}
|
||||
new_context.rbp = interpret_dw_register(
|
||||
cur_row,
|
||||
lib::DWARF_X86_64_RBP,
|
||||
ctx);
|
||||
if(new_context.rbp == 0) {
|
||||
// A null rbp means we've reached the end of the call stack
|
||||
throw FirstUnwindFrame();
|
||||
try {
|
||||
new_context.rbp = interpret_dw_register(
|
||||
cur_row,
|
||||
lib::DWARF_X86_64_RBP,
|
||||
ctx);
|
||||
if(new_context.rbp == 0) {
|
||||
// A null rbp means we've reached the end of the call stack
|
||||
throw FirstUnwindFrame();
|
||||
}
|
||||
} catch(const std::out_of_range& e) {
|
||||
new_context.rbp = 0; // The base pointer does not exist
|
||||
}
|
||||
|
||||
new_context.rsp = interpret_dw_register(
|
||||
|
|
Loading…
Reference in a new issue