diff options
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 13910c6..a24a083 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -4977,10 +4977,21 @@ find_gnu_ifunc (const symbol *sym) [&] (minimal_symbol *minsym) { if (MSYMBOL_TYPE (minsym) == mst_text_gnu_ifunc - && MSYMBOL_VALUE_ADDRESS (objfile, minsym) == address) + || MSYMBOL_TYPE (minsym) == mst_data_gnu_ifunc) { - ifunc = minsym; - return true; + CORE_ADDR msym_addr = MSYMBOL_VALUE_ADDRESS (objfile, minsym); + if (MSYMBOL_TYPE (minsym) == mst_data_gnu_ifunc) + { + struct gdbarch *gdbarch = get_objfile_arch (objfile); + msym_addr = gdbarch_convert_from_func_ptr_addr (gdbarch, + msym_addr, + ¤t_target); + } + if (msym_addr == address) + { + ifunc = minsym; + return true; + } } return false; }); |