GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
machoread.c File Reference
#include "defs.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "bfd.h"
#include "symfile.h"
#include "objfiles.h"
#include "gdbcmd.h"
#include "gdbcore.h"
#include "mach-o.h"
#include "aout/stab_gnu.h"
#include "complaints.h"
#include "gdb_bfd.h"
#include <string>
#include <algorithm>
#include "dwarf2/public.h"

Go to the source code of this file.

Classes

struct  oso_el
 
struct  macho_sym_hash_entry
 

Macros

#define macho_debug(LEVEL, FMT, ...)
 
#define DSYM_SUFFIX   ".dSYM/Contents/Resources/DWARF/"
 

Functions

static void macho_new_init (struct objfile *objfile)
 
static void macho_symfile_init (struct objfile *objfile)
 
static void macho_symtab_add_minsym (minimal_symbol_reader &reader, struct objfile *objfile, const asymbol *sym)
 
static void macho_symtab_read (minimal_symbol_reader &reader, struct objfile *objfile, long number_of_symbols, asymbol **symbol_table, std::vector< oso_el > *oso_vector_ptr)
 
static int get_archive_prefix_len (const char *name)
 
static bool oso_el_compare_name (const oso_el &l, const oso_el &r)
 
static struct bfd_hash_entry * macho_sym_hash_newfunc (struct bfd_hash_entry *entry, struct bfd_hash_table *table, const char *string)
 
static CORE_ADDR macho_resolve_oso_sym_with_minsym (struct objfile *main_objfile, asymbol *sym)
 
static void macho_add_oso_symfile (oso_el *oso, const gdb_bfd_ref_ptr &abfd, const char *name, struct objfile *main_objfile, symfile_add_flags symfile_flags)
 
static void macho_symfile_read_all_oso (std::vector< oso_el > *oso_vector_ptr, struct objfile *main_objfile, symfile_add_flags symfile_flags)
 
static gdb_bfd_ref_ptr macho_check_dsym (struct objfile *objfile, std::string *filenamep)
 
static void macho_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
 
static bfd_byte * macho_symfile_relocate (struct objfile *objfile, asection *sectp, bfd_byte *buf)
 
static void macho_symfile_finish (struct objfile *objfile)
 
static void macho_symfile_offsets (struct objfile *objfile, const section_addr_info &addrs)
 
void _initialize_machoread ()
 

Variables

static unsigned int mach_o_debug_level = 0
 
static const struct sym_fns macho_sym_fns
 

Macro Definition Documentation

◆ DSYM_SUFFIX

#define DSYM_SUFFIX   ".dSYM/Contents/Resources/DWARF/"

Definition at line 717 of file machoread.c.

Referenced by macho_check_dsym().

◆ macho_debug

#define macho_debug ( LEVEL,
FMT,
... )
Value:
debug_prefixed_printf_cond_nofunc (mach_o_debug_level > LEVEL, \
"machoread", FMT, ## __VA_ARGS__)
static unsigned int mach_o_debug_level
Definition machoread.c:38

Definition at line 40 of file machoread.c.

Referenced by macho_add_oso_symfile(), macho_symfile_read(), and macho_symfile_relocate().

Function Documentation

◆ _initialize_machoread()

void _initialize_machoread ( )

◆ get_archive_prefix_len()

static int get_archive_prefix_len ( const char * name)
static

Definition at line 325 of file machoread.c.

References name.

Referenced by macho_symfile_read_all_oso().

◆ macho_add_oso_symfile()

static void macho_add_oso_symfile ( oso_el * oso,
const gdb_bfd_ref_ptr & abfd,
const char * name,
struct objfile * main_objfile,
symfile_add_flags symfile_flags )
static

◆ macho_check_dsym()

static gdb_bfd_ref_ptr macho_check_dsym ( struct objfile * objfile,
std::string * filenamep )
static

Definition at line 725 of file machoread.c.

References DSYM_SUFFIX, gdb_bfd_openr(), gnutarget, objfile::obfd, and objfile_name().

Referenced by macho_symfile_read().

◆ macho_new_init()

static void macho_new_init ( struct objfile * objfile)
static

Definition at line 77 of file machoread.c.

◆ macho_resolve_oso_sym_with_minsym()

static CORE_ADDR macho_resolve_oso_sym_with_minsym ( struct objfile * main_objfile,
asymbol * sym )
static

◆ macho_sym_hash_newfunc()

static struct bfd_hash_entry * macho_sym_hash_newfunc ( struct bfd_hash_entry * entry,
struct bfd_hash_table * table,
const char * string )
static

Definition at line 360 of file machoread.c.

References macho_sym_hash_entry::sym.

Referenced by macho_add_oso_symfile().

◆ macho_symfile_finish()

static void macho_symfile_finish ( struct objfile * objfile)
static

Definition at line 886 of file machoread.c.

◆ macho_symfile_init()

static void macho_symfile_init ( struct objfile * objfile)
static

Definition at line 82 of file machoread.c.

◆ macho_symfile_offsets()

static void macho_symfile_offsets ( struct objfile * objfile,
const section_addr_info & addrs )
static

◆ macho_symfile_read()

static void macho_symfile_read ( struct objfile * objfile,
symfile_add_flags symfile_flags )
static

◆ macho_symfile_read_all_oso()

static void macho_symfile_read_all_oso ( std::vector< oso_el > * oso_vector_ptr,
struct objfile * main_objfile,
symfile_add_flags symfile_flags )
static

◆ macho_symfile_relocate()

static bfd_byte * macho_symfile_relocate ( struct objfile * objfile,
asection * sectp,
bfd_byte * buf )
static

Definition at line 869 of file machoread.c.

References macho_debug, objfile::obfd, and objfile_name().

◆ macho_symtab_add_minsym()

static void macho_symtab_add_minsym ( minimal_symbol_reader & reader,
struct objfile * objfile,
const asymbol * sym )
static

◆ macho_symtab_read()

static void macho_symtab_read ( minimal_symbol_reader & reader,
struct objfile * objfile,
long number_of_symbols,
asymbol ** symbol_table,
std::vector< oso_el > * oso_vector_ptr )
static

Definition at line 150 of file machoread.c.

References complaint, macho_symtab_add_minsym(), and objfile_name().

Referenced by macho_symfile_read().

◆ oso_el_compare_name()

static bool oso_el_compare_name ( const oso_el & l,
const oso_el & r )
static

Definition at line 343 of file machoread.c.

References oso_el::name.

Referenced by macho_symfile_read_all_oso().

Variable Documentation

◆ mach_o_debug_level

unsigned int mach_o_debug_level = 0
static

Definition at line 38 of file machoread.c.

Referenced by _initialize_machoread().

◆ macho_sym_fns

const struct sym_fns macho_sym_fns
static
Initial value:
= {
NULL,
NULL,
}
static bfd_byte * macho_symfile_relocate(struct objfile *objfile, asection *sectp, bfd_byte *buf)
Definition machoread.c:869
static void macho_symfile_init(struct objfile *objfile)
Definition machoread.c:82
static void macho_symfile_read(struct objfile *objfile, symfile_add_flags symfile_flags)
Definition machoread.c:779
static void macho_symfile_offsets(struct objfile *objfile, const section_addr_info &addrs)
Definition machoread.c:891
static void macho_symfile_finish(struct objfile *objfile)
Definition machoread.c:886
static void macho_new_init(struct objfile *objfile)
Definition machoread.c:77
symfile_segment_data_up default_symfile_segments(bfd *abfd)
Definition symfile.c:711

Definition at line 937 of file machoread.c.

Referenced by _initialize_machoread().