Example #1
0
struct symbol *
find_pc_sect_function (CORE_ADDR pc, struct bfd_section *section)
{
    struct block *b = block_for_pc_sect (pc, section);
    if (b == 0)
        return 0;
    return block_function (b);
}
Example #2
0
struct symbol *
find_pc_sect_function (CORE_ADDR pc, struct obj_section *section)
{
  const struct block *b = block_for_pc_sect (pc, section);

  if (b == 0)
    return 0;
  return block_linkage_function (b);
}
Example #3
0
struct symbol *
find_pc_sect_containing_function (CORE_ADDR pc, struct obj_section *section)
{
  const block *bl = block_for_pc_sect (pc, section);

  if (bl == nullptr)
    return nullptr;

  return block_containing_function (bl);
}
Example #4
0
struct symbol *
find_pc_sect_function (CORE_ADDR pc, struct bfd_section *section)
{
  /* APPLE LOCAL begin cache lookup values for improved performance  */
  struct block *b;
  /* APPLE LOCAL inlined function symbols & blocks  */
  struct symbol *func_sym;

  if (pc == last_function_lookup_pc
      && pc == last_mapped_section_lookup_pc
      && section == cached_mapped_section
      && cached_pc_function)
    return cached_pc_function;

  last_function_lookup_pc = pc;

  b = block_for_pc_sect (pc, section);
  if (b == 0)
    {
      cached_pc_function = NULL;
      return 0;
    }

  /* APPLE LOCAL begin inlined function symbols & blocks  */
  func_sym = NULL;
  if (BLOCK_FUNCTION (b) == 0)
    {
      /* APPLE LOCAL radar 6381384, add section to symtab lookups.  */
      func_sym = block_inlined_function (b, section);
    }

  if (!func_sym)
    func_sym = block_function (b);

  cached_pc_function = func_sym;
  return func_sym;
  /* APPLE LOCAL end inlined function symbols & blocks  */
  /* APPLE LOCAL end cache lookup values for improved performance  */
}
Example #5
0
struct block *
block_for_pc (CORE_ADDR pc)
{
  return block_for_pc_sect (pc, find_pc_mapped_section (pc));
}