mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2025-01-09 10:53:43 +01:00
eh_elf: detect eh_elf errors
(No data, unimplemented data type, …)
This commit is contained in:
parent
7d9352d990
commit
7494efbb16
1 changed files with 8 additions and 0 deletions
|
@ -114,6 +114,14 @@ int eh_elf_step_cursor(struct cursor *cursor) {
|
|||
ip - mmap_entry->offset,
|
||||
fetchw_here);
|
||||
|
||||
if(eh_elf_context.rbp + 1 == 0
|
||||
&& eh_elf_context.rsp + 1 == 0
|
||||
&& eh_elf_context.rip + 1 == 0) {
|
||||
// Error, somehow
|
||||
Debug(2, "eh_elf unwinding FAILED\n");
|
||||
return -3;
|
||||
}
|
||||
|
||||
// Push back the data into libunwind's structures
|
||||
for (int i = 0; i < DWARF_NUM_PRESERVED_REGS; ++i)
|
||||
cursor->dwarf.loc[i] = DWARF_NULL_LOC;
|
||||
|
|
Loading…
Reference in a new issue