* eval.c (evaluate_subexp_standard) [OP_OBJC_MSGCALL]: Support
platforms that use function descriptors. Prefer to use function pointer types instead of function types. * linespec.c (decode_objc): Support function descriptors. Fully initialize SAL result. * objc-lang.c (find_methods): Support function descriptors. Do not require function symbol to point to text section. * ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): When calling via a function pointer, use the descriptor it points to.
This commit is contained in:
parent
67f470de12
commit
69368a60a4
5 changed files with 61 additions and 20 deletions
|
@ -1173,16 +1173,18 @@ find_methods (struct symtab *symtab, char type,
|
|||
|
||||
ALL_OBJFILE_MSYMBOLS (objfile, msymbol)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||
CORE_ADDR pc = SYMBOL_VALUE_ADDRESS (msymbol);
|
||||
|
||||
QUIT;
|
||||
|
||||
if ((MSYMBOL_TYPE (msymbol) != mst_text)
|
||||
&& (MSYMBOL_TYPE (msymbol) != mst_file_text))
|
||||
/* Not a function or method. */
|
||||
continue;
|
||||
/* The minimal symbol might point to a function descriptor;
|
||||
resolve it to the actual code address instead. */
|
||||
pc = gdbarch_convert_from_func_ptr_addr (gdbarch, pc,
|
||||
¤t_target);
|
||||
|
||||
if (symtab)
|
||||
if ((SYMBOL_VALUE_ADDRESS (msymbol) < BLOCK_START (block)) ||
|
||||
(SYMBOL_VALUE_ADDRESS (msymbol) >= BLOCK_END (block)))
|
||||
if (pc < BLOCK_START (block) || pc >= BLOCK_END (block))
|
||||
/* Not in the specified symtab. */
|
||||
continue;
|
||||
|
||||
|
@ -1221,7 +1223,7 @@ find_methods (struct symtab *symtab, char type,
|
|||
((nselector == NULL) || (strcmp (selector, nselector) != 0)))
|
||||
continue;
|
||||
|
||||
sym = find_pc_function (SYMBOL_VALUE_ADDRESS (msymbol));
|
||||
sym = find_pc_function (pc);
|
||||
if (sym != NULL)
|
||||
{
|
||||
const char *newsymname = SYMBOL_NATURAL_NAME (sym);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue