diff options
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r-- | gdb/elfread.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c index 0fe2adb..0d538e6 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -833,7 +833,8 @@ elf_gnu_ifunc_resolve_by_got (const char *name, CORE_ADDR *addr_p) if (target_read_memory (pointer_address, buf, ptr_size) != 0) continue; addr = extract_typed_address (buf, ptr_type); - addr = gdbarch_convert_from_func_ptr_addr (gdbarch, addr, target_stack); + addr = gdbarch_convert_from_func_ptr_addr (gdbarch, addr, + current_top_target ()); addr = gdbarch_addr_bits_remove (gdbarch, addr); if (elf_gnu_ifunc_record_cache (name, addr)) @@ -900,12 +901,12 @@ elf_gnu_ifunc_resolve_addr (struct gdbarch *gdbarch, CORE_ADDR pc) parameter. FUNCTION is the function entry address. ADDRESS may be a function descriptor. */ - target_auxv_search (target_stack, AT_HWCAP, &hwcap); + target_auxv_search (current_top_target (), AT_HWCAP, &hwcap); hwcap_val = value_from_longest (builtin_type (gdbarch) ->builtin_unsigned_long, hwcap); address_val = call_function_by_hand (function, NULL, 1, &hwcap_val); address = value_as_address (address_val); - address = gdbarch_convert_from_func_ptr_addr (gdbarch, address, target_stack); + address = gdbarch_convert_from_func_ptr_addr (gdbarch, address, current_top_target ()); address = gdbarch_addr_bits_remove (gdbarch, address); if (name_at_pc) @@ -1012,7 +1013,7 @@ elf_gnu_ifunc_resolver_return_stop (struct breakpoint *b) resolved_address = value_as_address (value); resolved_pc = gdbarch_convert_from_func_ptr_addr (gdbarch, resolved_address, - target_stack); + current_top_target ()); resolved_pc = gdbarch_addr_bits_remove (gdbarch, resolved_pc); gdb_assert (current_program_space == b->pspace || b->pspace == NULL); |