GDB (xrefs)
Classes | Functions | Variables
compile-object-load.c File Reference
#include "defs.h"
#include "compile-object-load.h"
#include "compile-internal.h"
#include "command.h"
#include "objfiles.h"
#include "gdbcore.h"
#include "readline/tilde.h"
#include "bfdlink.h"
#include "gdbcmd.h"
#include "regcache.h"
#include "inferior.h"
#include "compile.h"
#include "block.h"
#include "arch-utils.h"

Go to the source code of this file.

Classes

struct  munmap_list
 
struct  setup_sections_data
 
struct  link_hash_table_cleanup_data
 

Functions

static void munmap_list_add (struct munmap_list **headp, CORE_ADDR addr, CORE_ADDR size)
 
void munmap_list_free (struct munmap_list *head)
 
static void munmap_listp_free_cleanup (void *headp_voidp)
 
static void setup_sections (bfd *abfd, asection *sect, void *data_voidp)
 
static bfd_boolean link_callbacks_multiple_definition (struct bfd_link_info *link_info, struct bfd_link_hash_entry *h, bfd *nbfd, asection *nsec, bfd_vma nval)
 
static bfd_boolean link_callbacks_warning (struct bfd_link_info *link_info, const char *xwarning, const char *symbol, bfd *abfd, asection *section, bfd_vma address)
 
static bfd_boolean link_callbacks_undefined_symbol (struct bfd_link_info *link_info, const char *name, bfd *abfd, asection *section, bfd_vma address, bfd_boolean is_fatal)
 
static bfd_boolean link_callbacks_reloc_overflow (struct bfd_link_info *link_info, struct bfd_link_hash_entry *entry, const char *name, const char *reloc_name, bfd_vma addend, bfd *abfd, asection *section, bfd_vma address)
 
static bfd_boolean link_callbacks_reloc_dangerous (struct bfd_link_info *link_info, const char *message, bfd *abfd, asection *section, bfd_vma address)
 
static bfd_boolean link_callbacks_unattached_reloc (struct bfd_link_info *link_info, const char *name, bfd *abfd, asection *section, bfd_vma address)
 
static void link_callbacks_einfo (const char *fmt,...) ATTRIBUTE_PRINTF(1
 
static void link_hash_table_free (void *d)
 
static void copy_sections (bfd *abfd, asection *sect, void *data)
 
static struct typeget_out_value_type (struct symbol *func_sym, struct objfile *objfile, enum compile_i_scope_types scope)
 
static struct typeget_regs_type (struct symbol *func_sym, struct objfile *objfile)
 
static void store_regs (struct type *regs_type, CORE_ADDR regs_base)
 
struct compile_modulecompile_object_load (const char *object_file, const char *source_file, enum compile_i_scope_types scope, void *scope_data)
 

Variables

static const struct bfd_link_callbacks link_callbacks
 

Function Documentation

struct compile_module* compile_object_load ( const char *  object_file,
const char *  source_file,
enum compile_i_scope_types  scope,
void *  scope_data 
)

Definition at line 619 of file compile-object-load.c.

References _, BMSYMBOL_VALUE_ADDRESS, builtin_type::builtin_data_ptr, builtin_type(), builtin_type::builtin_void, check_typedef(), compile_debug, COMPILE_I_PRINT_ADDRESS_SCOPE, COMPILE_I_PRINT_VALUE_SCOPE, COMPILE_I_RAW_SCOPE, COMPILE_I_SIMPLE_SCOPE, copy_sections(), discard_cleanups(), do_cleanups(), error(), fprintf_unfiltered(), compile_module::func_sym, gdb_assert, gdb_bfd_errmsg(), gdb_bfd_open(), GDB_MMAP_PROT_READ, GDB_MMAP_PROT_WRITE, gdb_stdlog, gdbarch_infcall_mmap(), get_out_value_type(), get_regs_type(), gnu_ifunc_resolve_addr, gnutarget, internal_error(), setup_sections_data::last_max_alignment, setup_sections_data::last_prot, setup_sections_data::last_section_first, setup_sections_data::last_size, lookup_global_symbol_from_objfile(), lookup_minimal_symbol(), make_cleanup(), make_cleanup_bfd_unref(), make_cleanup_free_objfile(), bound_minimal_symbol::minsym, mst_text, mst_text_gnu_ifunc, mst_unknown, MSYMBOL_TYPE, munmap_list_add(), compile_module::munmap_list_head, setup_sections_data::munmap_list_headp, munmap_listp_free_cleanup(), compile_module::objfile, objfile_name(), objfile::objfile_obstack, compile_module::out_value_addr, compile_module::out_value_type, paddress(), compile_module::regs_addr, compile_module::scope, compile_module::scope_data, setup_sections(), compile_module::source_file, store_regs(), symbol_file_add_from_bfd(), SYMBOL_TYPE, target_gdbarch(), TYPE_CODE, TYPE_CODE_FUNC, TYPE_LENGTH, TYPE_NFIELDS, TYPE_TARGET_TYPE, types_deeply_equal(), VAR_DOMAIN, warning(), xfree(), and xmalloc().

Referenced by eval_compile_command().

static void copy_sections ( bfd *  abfd,
asection *  sect,
void *  data 
)
static
static struct type* get_out_value_type ( struct symbol func_sym,
struct objfile objfile,
enum compile_i_scope_types  scope 
)
static
static struct type* get_regs_type ( struct symbol func_sym,
struct objfile objfile 
)
static
static void static void link_callbacks_einfo ( const char *  fmt,
  ... 
)
static

Definition at line 289 of file compile-object-load.c.

References _, do_cleanups(), make_cleanup(), warning(), xfree(), and xstrvprintf().

static bfd_boolean link_callbacks_multiple_definition ( struct bfd_link_info *  link_info,
struct bfd_link_hash_entry *  h,
bfd *  nbfd,
asection *  nsec,
bfd_vma  nval 
)
static

Definition at line 202 of file compile-object-load.c.

References _, and warning().

static bfd_boolean link_callbacks_reloc_dangerous ( struct bfd_link_info *  link_info,
const char *  message,
bfd *  abfd,
asection *  section,
bfd_vma  address 
)
static

Definition at line 258 of file compile-object-load.c.

References _, and warning().

static bfd_boolean link_callbacks_reloc_overflow ( struct bfd_link_info *  link_info,
struct bfd_link_hash_entry *  entry,
const char *  name,
const char *  reloc_name,
bfd_vma  addend,
bfd *  abfd,
asection *  section,
bfd_vma  address 
)
static

Definition at line 245 of file compile-object-load.c.

static bfd_boolean link_callbacks_unattached_reloc ( struct bfd_link_info *  link_info,
const char *  name,
bfd *  abfd,
asection *  section,
bfd_vma  address 
)
static

Definition at line 272 of file compile-object-load.c.

References _, and warning().

static bfd_boolean link_callbacks_undefined_symbol ( struct bfd_link_info *  link_info,
const char *  name,
bfd *  abfd,
asection *  section,
bfd_vma  address,
bfd_boolean  is_fatal 
)
static

Definition at line 232 of file compile-object-load.c.

References _, and warning().

static bfd_boolean link_callbacks_warning ( struct bfd_link_info *  link_info,
const char *  xwarning,
const char *  symbol,
bfd *  abfd,
asection *  section,
bfd_vma  address 
)
static

Definition at line 218 of file compile-object-load.c.

References _, and warning().

static void link_hash_table_free ( void *  d)
static
static void munmap_list_add ( struct munmap_list **  headp,
CORE_ADDR  addr,
CORE_ADDR  size 
)
static
void munmap_list_free ( struct munmap_list head)
static void munmap_listp_free_cleanup ( void *  headp_voidp)
static

Definition at line 80 of file compile-object-load.c.

References munmap_list_free().

Referenced by compile_object_load().

static void setup_sections ( bfd *  abfd,
asection *  sect,
void *  data_voidp 
)
static
static void store_regs ( struct type regs_type,
CORE_ADDR  regs_base 
)
static

Variable Documentation

const struct bfd_link_callbacks link_callbacks
static
Initial value:
=
{
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
static bfd_boolean link_callbacks_reloc_dangerous(struct bfd_link_info *link_info, const char *message, bfd *abfd, asection *section, bfd_vma address)
static bfd_boolean link_callbacks_undefined_symbol(struct bfd_link_info *link_info, const char *name, bfd *abfd, asection *section, bfd_vma address, bfd_boolean is_fatal)
static void link_callbacks_einfo(const char *fmt,...) ATTRIBUTE_PRINTF(1
static bfd_boolean link_callbacks_multiple_definition(struct bfd_link_info *link_info, struct bfd_link_hash_entry *h, bfd *nbfd, asection *nsec, bfd_vma nval)
static bfd_boolean link_callbacks_reloc_overflow(struct bfd_link_info *link_info, struct bfd_link_hash_entry *entry, const char *name, const char *reloc_name, bfd_vma addend, bfd *abfd, asection *section, bfd_vma address)
static bfd_boolean link_callbacks_warning(struct bfd_link_info *link_info, const char *xwarning, const char *symbol, bfd *abfd, asection *section, bfd_vma address)
static bfd_boolean link_callbacks_unattached_reloc(struct bfd_link_info *link_info, const char *name, bfd *abfd, asection *section, bfd_vma address)

Definition at line 309 of file compile-object-load.c.

Referenced by copy_sections().