1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-29 02:07:39 +01:00

eh_elf: fix as_arg not set

This commit is contained in:
Théophile Bastian 2018-06-13 19:08:42 +02:00
parent 96ed4c4d82
commit 7d9352d990

View file

@ -99,14 +99,14 @@ int eh_elf_step_cursor(struct cursor *cursor) {
dwarf_get(&cursor->dwarf, dwarf_get(&cursor->dwarf,
cursor->dwarf.loc[UNW_TDEP_BP], &eh_elf_context.rbp); cursor->dwarf.loc[UNW_TDEP_BP], &eh_elf_context.rbp);
Debug(4, "BEFORE eh_elf_context: rip=0x%lx, rsp=0x%lx, rbp=0x%lx\n",
eh_elf_context.rip,
eh_elf_context.rsp,
eh_elf_context.rbp);
// Set _fetch_state before passing fetchw_here // Set _fetch_state before passing fetchw_here
_fetch_state.addr_space = cursor->dwarf.as; _fetch_state.addr_space = cursor->dwarf.as;
_fetch_state.accessors = &cursor->dwarf.as->acc; _fetch_state.accessors = &cursor->dwarf.as->acc;
_fetch_state.arg = &cursor->dwarf.as_arg;
Debug(4, "Unwinding in mmap entry %s at position 0x%lx\n",
mmap_entry->object_name,
ip - mmap_entry->offset);
// Call fde_func // Call fde_func
eh_elf_context = fde_func( eh_elf_context = fde_func(
@ -123,11 +123,6 @@ int eh_elf_step_cursor(struct cursor *cursor) {
cursor->dwarf.loc[UNW_TDEP_IP] = of_eh_elf_loc(eh_elf_context.rip); cursor->dwarf.loc[UNW_TDEP_IP] = of_eh_elf_loc(eh_elf_context.rip);
cursor->dwarf.use_prev_instr = 1; cursor->dwarf.use_prev_instr = 1;
Debug(4, "AFTER eh_elf_context: rip=0x%lx, rsp=0x%lx, rbp=0x%lx\n",
eh_elf_context.rip,
eh_elf_context.rsp,
eh_elf_context.rbp);
cursor->frame_info.frame_type = UNW_X86_64_FRAME_GUESSED; cursor->frame_info.frame_type = UNW_X86_64_FRAME_GUESSED;
cursor->frame_info.cfa_reg_rsp = 0; cursor->frame_info.cfa_reg_rsp = 0;
cursor->frame_info.cfa_reg_offset = 16; cursor->frame_info.cfa_reg_offset = 16;