GDB (API)
Classes | Defines | Functions
/home/stan/gdb/src/gdb/objfiles.h File Reference
#include "gdb_obstack.h"
#include "symfile.h"
#include "progspace.h"
#include "registry.h"
#include "gdb_bfd.h"

Go to the source code of this file.

Classes

struct  entry_info
struct  obj_section
struct  objstats
struct  objfile_per_bfd_storage
struct  objfile

Defines

#define obj_section_offset(s)   (((s)->objfile->section_offsets)->offsets[gdb_bfd_section_index ((s)->objfile->obfd, (s)->the_bfd_section)])
#define obj_section_addr(s)
#define obj_section_endaddr(s)
#define OBJSTAT(objfile, expr)   (objfile -> stats.expr)
#define OBJSTATS   struct objstats stats
#define MINIMAL_SYMBOL_HASH_SIZE   2039
#define OBJF_REORDERED   (1 << 0) /* Functions are reordered */
#define OBJF_SHARED   (1 << 1) /* From a shared library */
#define OBJF_READNOW   (1 << 2) /* Immediate full read */
#define OBJF_USERLOADED   (1 << 3) /* User loaded */
#define OBJF_PSYMTABS_READ   (1 << 4)
#define OBJF_MAINLINE   (1 << 5)
#define OBJF_NOT_FILENAME   (1 << 6)
#define ALL_PSPACE_OBJFILES(ss, obj)   for ((obj) = ss->objfiles; (obj) != NULL; (obj) = (obj)->next)
#define ALL_PSPACE_OBJFILES_SAFE(ss, obj, nxt)
#define ALL_OBJFILES(obj)
#define ALL_OBJFILES_SAFE(obj, nxt)
#define ALL_OBJFILE_SYMTABS(objfile, s)   for ((s) = (objfile) -> symtabs; (s) != NULL; (s) = (s) -> next)
#define ALL_OBJFILE_PRIMARY_SYMTABS(objfile, s)
#define ALL_OBJFILE_MSYMBOLS(objfile, m)   for ((m) = (objfile) -> msymbols; SYMBOL_LINKAGE_NAME(m) != NULL; (m)++)
#define ALL_SYMTABS(objfile, s)
#define ALL_PSPACE_SYMTABS(ss, objfile, s)
#define ALL_PRIMARY_SYMTABS(objfile, s)
#define ALL_PSPACE_PRIMARY_SYMTABS(pspace, objfile, s)
#define ALL_MSYMBOLS(objfile, m)
#define ALL_OBJFILE_OSECTIONS(objfile, osect)
#define ALL_OBJSECTIONS(objfile, osect)
#define SECT_OFF_DATA(objfile)
#define SECT_OFF_RODATA(objfile)
#define SECT_OFF_TEXT(objfile)
#define SECT_OFF_BSS(objfile)   (objfile)->sect_index_bss
#define MULTI_OBJFILE_P()   (object_files && object_files->next)

Functions

void print_objfile_statistics (void)
void print_symbol_bcache_statistics (void)
struct objfileallocate_objfile (bfd *, const char *name, int)
struct gdbarch * get_objfile_arch (struct objfile *)
int entry_point_address_query (CORE_ADDR *entry_p)
CORE_ADDR entry_point_address (void)
void build_objfile_section_table (struct objfile *)
void terminate_minimal_symbol_table (struct objfile *objfile)
struct objfileobjfile_separate_debug_iterate (const struct objfile *, const struct objfile *)
void put_objfile_before (struct objfile *, struct objfile *)
void objfile_to_front (struct objfile *)
void add_separate_debug_objfile (struct objfile *, struct objfile *)
void unlink_objfile (struct objfile *)
void free_objfile (struct objfile *)
void free_objfile_separate_debug (struct objfile *)
struct cleanup * make_cleanup_free_objfile (struct objfile *)
void free_all_objfiles (void)
void objfile_relocate (struct objfile *, const struct section_offsets *)
void objfile_rebase (struct objfile *, CORE_ADDR)
int objfile_has_partial_symbols (struct objfile *objfile)
int objfile_has_full_symbols (struct objfile *objfile)
int objfile_has_symbols (struct objfile *objfile)
int have_partial_symbols (void)
int have_full_symbols (void)
void objfile_set_sym_fns (struct objfile *objfile, const struct sym_fns *sf)
void objfiles_changed (void)
void objfile_purge_solibs (void)
int have_minimal_symbols (void)
struct obj_sectionfind_pc_section (CORE_ADDR pc)
int pc_in_section (CORE_ADDR, char *)
 DECLARE_REGISTRY (objfile)
void inhibit_section_map_updates (struct program_space *pspace)
void resume_section_map_updates (struct program_space *pspace)
void resume_section_map_updates_cleanup (void *arg)
void default_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype *cb, void *cb_data, struct objfile *current_objfile)
void set_objfile_per_bfd (struct objfile *obj)
const char * objfile_name (const struct objfile *objfile)

Define Documentation

#define ALL_MSYMBOLS (   objfile,
 
)
Value:
ALL_OBJFILES (objfile)   \
    ALL_OBJFILE_MSYMBOLS (objfile, m)

Definition at line 605 of file objfiles.h.

#define ALL_OBJFILE_MSYMBOLS (   objfile,
 
)    for ((m) = (objfile) -> msymbols; SYMBOL_LINKAGE_NAME(m) != NULL; (m)++)

Definition at line 576 of file objfiles.h.

#define ALL_OBJFILE_OSECTIONS (   objfile,
  osect 
)
Value:
for (osect = objfile->sections; osect < objfile->sections_end; osect++) \
    if (osect->the_bfd_section == NULL)                                 \
      {                                                                 \
        /* Nothing.  */                                                 \
      }                                                                 \
    else

Definition at line 609 of file objfiles.h.

#define ALL_OBJFILE_PRIMARY_SYMTABS (   objfile,
 
)
Value:
ALL_OBJFILE_SYMTABS ((objfile), (s)) \
    if ((s)->primary)

Definition at line 570 of file objfiles.h.

#define ALL_OBJFILE_SYMTABS (   objfile,
 
)    for ((s) = (objfile) -> symtabs; (s) != NULL; (s) = (s) -> next)

Definition at line 565 of file objfiles.h.

#define ALL_OBJFILES (   obj)
Value:
for ((obj) = current_program_space->objfiles; \
       (obj) != NULL;                               \
       (obj) = (obj)->next)

Definition at line 553 of file objfiles.h.

#define ALL_OBJFILES_SAFE (   obj,
  nxt 
)
Value:
for ((obj) = current_program_space->objfiles;   \
       (obj) != NULL? ((nxt)=(obj)->next,1) :0; \
       (obj) = (nxt))

Definition at line 558 of file objfiles.h.

#define ALL_OBJSECTIONS (   objfile,
  osect 
)
Value:
for ((objfile) = current_program_space->objfiles,                       \
         (objfile) != NULL ? ((osect) = (objfile)->sections_end) : 0;   \
       (objfile) != NULL                                                \
         && (osect) == (objfile)->sections_end;                         \
       ((osect) == (objfile)->sections_end                              \
        ? ((objfile) = (objfile)->next,                                 \
           (objfile) != NULL ? (osect) = (objfile)->sections_end : 0)   \
        : 0))                                                           \
    ALL_OBJFILE_OSECTIONS (objfile, osect)

Definition at line 642 of file objfiles.h.

#define ALL_PRIMARY_SYMTABS (   objfile,
 
)
Value:
ALL_OBJFILES (objfile)          \
    ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)

Definition at line 594 of file objfiles.h.

#define ALL_PSPACE_OBJFILES (   ss,
  obj 
)    for ((obj) = ss->objfiles; (obj) != NULL; (obj) = (obj)->next)

Definition at line 545 of file objfiles.h.

#define ALL_PSPACE_OBJFILES_SAFE (   ss,
  obj,
  nxt 
)
Value:
for ((obj) = ss->objfiles;                      \
       (obj) != NULL? ((nxt)=(obj)->next,1) :0; \
       (obj) = (nxt))

Definition at line 548 of file objfiles.h.

#define ALL_PSPACE_PRIMARY_SYMTABS (   pspace,
  objfile,
 
)
Value:
ALL_PSPACE_OBJFILES (ss, objfile)                       \
    ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)

Definition at line 598 of file objfiles.h.

#define ALL_PSPACE_SYMTABS (   ss,
  objfile,
 
)
Value:
ALL_PSPACE_OBJFILES (ss, objfile)                       \
    ALL_OBJFILE_SYMTABS (objfile, s)

Definition at line 586 of file objfiles.h.

#define ALL_SYMTABS (   objfile,
 
)
Value:
ALL_OBJFILES (objfile)   \
    ALL_OBJFILE_SYMTABS (objfile, s)

Definition at line 582 of file objfiles.h.

#define MINIMAL_SYMBOL_HASH_SIZE   2039

Definition at line 162 of file objfiles.h.

#define MULTI_OBJFILE_P ( )    (object_files && object_files->next)

Definition at line 678 of file objfiles.h.

#define obj_section_addr (   s)
Value:
(bfd_get_section_vma ((s)->objfile->obfd, s->the_bfd_section)           \
   + obj_section_offset (s))

Definition at line 130 of file objfiles.h.

#define obj_section_endaddr (   s)
Value:
(bfd_get_section_vma ((s)->objfile->obfd, s->the_bfd_section)           \
   + bfd_get_section_size ((s)->the_bfd_section)                        \
   + obj_section_offset (s))

Definition at line 136 of file objfiles.h.

#define obj_section_offset (   s)    (((s)->objfile->section_offsets)->offsets[gdb_bfd_section_index ((s)->objfile->obfd, (s)->the_bfd_section)])

Definition at line 126 of file objfiles.h.

#define OBJF_MAINLINE   (1 << 5)

Definition at line 430 of file objfiles.h.

#define OBJF_NOT_FILENAME   (1 << 6)

Definition at line 435 of file objfiles.h.

#define OBJF_PSYMTABS_READ   (1 << 4)

Definition at line 425 of file objfiles.h.

#define OBJF_READNOW   (1 << 2) /* Immediate full read */

Definition at line 411 of file objfiles.h.

#define OBJF_REORDERED   (1 << 0) /* Functions are reordered */

Definition at line 397 of file objfiles.h.

#define OBJF_SHARED   (1 << 1) /* From a shared library */

Definition at line 407 of file objfiles.h.

#define OBJF_USERLOADED   (1 << 3) /* User loaded */

Definition at line 420 of file objfiles.h.

#define OBJSTAT (   objfile,
  expr 
)    (objfile -> stats.expr)

Definition at line 156 of file objfiles.h.

#define OBJSTATS   struct objstats stats

Definition at line 157 of file objfiles.h.

#define SECT_OFF_BSS (   objfile)    (objfile)->sect_index_bss

Definition at line 674 of file objfiles.h.

#define SECT_OFF_DATA (   objfile)
Value:
((objfile->sect_index_data == -1) \
      ? (internal_error (__FILE__, __LINE__, \
                         _("sect_index_data not initialized")), -1)     \
      : objfile->sect_index_data)

Definition at line 653 of file objfiles.h.

#define SECT_OFF_RODATA (   objfile)
Value:
((objfile->sect_index_rodata == -1) \
      ? (internal_error (__FILE__, __LINE__, \
                         _("sect_index_rodata not initialized")), -1)   \
      : objfile->sect_index_rodata)

Definition at line 659 of file objfiles.h.

#define SECT_OFF_TEXT (   objfile)
Value:
((objfile->sect_index_text == -1) \
      ? (internal_error (__FILE__, __LINE__, \
                         _("sect_index_text not initialized")), -1)     \
      : objfile->sect_index_text)

Definition at line 665 of file objfiles.h.


Function Documentation

void add_separate_debug_objfile ( struct objfile ,
struct objfile  
)

Definition at line 500 of file objfiles.c.

struct objfile* allocate_objfile ( bfd *  ,
const char *  name,
int   
) [read]

Definition at line 276 of file objfiles.c.

void build_objfile_section_table ( struct objfile )

Definition at line 234 of file objfiles.c.

void default_iterate_over_objfiles_in_search_order ( struct gdbarch *  gdbarch,
iterate_over_objfiles_in_search_order_cb_ftype cb,
void *  cb_data,
struct objfile current_objfile 
)

Definition at line 1481 of file objfiles.c.

Definition at line 371 of file objfiles.c.

Definition at line 358 of file objfiles.c.

struct obj_section* find_pc_section ( CORE_ADDR  pc) [read]

Definition at line 1376 of file objfiles.c.

void free_all_objfiles ( void  )

Definition at line 685 of file objfiles.c.

void free_objfile ( struct objfile )

Definition at line 553 of file objfiles.c.

void free_objfile_separate_debug ( struct objfile )

Definition at line 524 of file objfiles.c.

struct gdbarch* get_objfile_arch ( struct objfile ) [read]

Definition at line 349 of file objfiles.c.

int have_full_symbols ( void  )

Definition at line 1021 of file objfiles.c.

Definition at line 1060 of file objfiles.c.

Definition at line 1004 of file objfiles.c.

void inhibit_section_map_updates ( struct program_space pspace)

Definition at line 1450 of file objfiles.c.

struct cleanup* make_cleanup_free_objfile ( struct objfile ) [read]

Definition at line 677 of file objfiles.c.

int objfile_has_full_symbols ( struct objfile objfile)

Definition at line 979 of file objfiles.c.

int objfile_has_partial_symbols ( struct objfile objfile)

Definition at line 960 of file objfiles.c.

int objfile_has_symbols ( struct objfile objfile)

Definition at line 988 of file objfiles.c.

const char* objfile_name ( const struct objfile objfile)

Definition at line 1499 of file objfiles.c.

void objfile_purge_solibs ( void  )

Definition at line 1039 of file objfiles.c.

void objfile_rebase ( struct objfile ,
CORE_ADDR   
)

Definition at line 940 of file objfiles.c.

void objfile_relocate ( struct objfile ,
const struct section_offsets  
)

Definition at line 875 of file objfiles.c.

struct objfile* objfile_separate_debug_iterate ( const struct objfile ,
const struct objfile  
) [read]

Definition at line 390 of file objfiles.c.

void objfile_set_sym_fns ( struct objfile objfile,
const struct sym_fns sf 
)

Definition at line 710 of file symfile-debug.c.

void objfile_to_front ( struct objfile )

Definition at line 448 of file objfiles.c.

void objfiles_changed ( void  )

Definition at line 1441 of file objfiles.c.

int pc_in_section ( CORE_ADDR  ,
char *   
)

Definition at line 1423 of file objfiles.c.

void print_objfile_statistics ( void  )

Definition at line 99 of file symmisc.c.

Definition at line 78 of file symmisc.c.

void put_objfile_before ( struct objfile ,
struct objfile  
)

Definition at line 425 of file objfiles.c.

void resume_section_map_updates ( struct program_space pspace)

Definition at line 1458 of file objfiles.c.

void resume_section_map_updates_cleanup ( void *  arg)

Definition at line 1466 of file objfiles.c.

void set_objfile_per_bfd ( struct objfile obj)

Definition at line 188 of file objfiles.c.

void terminate_minimal_symbol_table ( struct objfile objfile)

Create the terminating entry of OBJFILE's minimal symbol table. If OBJFILE->msymbols is zero, allocate a single entry from OBJFILE->objfile_obstack; otherwise, just initialize OBJFILE->msymbols[OBJFILE->minimal_symbol_count].

Definition at line 1268 of file minsyms.c.

void unlink_objfile ( struct objfile )

Definition at line 479 of file objfiles.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines