1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2025-01-08 18:33:42 +01:00

eh_elf: detect eh_elf errors

(No data, unimplemented data type, …)
This commit is contained in:
Théophile Bastian 2018-06-13 19:09:10 +02:00
parent 7d9352d990
commit 7494efbb16

View file

@ -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;