gdb/symfile.h - gdb

Data types defined

Macros defined

Source code

  1. /* Definitions for reading symbol files into GDB.

  2.    Copyright (C) 1990-2015 Free Software Foundation, Inc.

  3.    This file is part of GDB.

  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 3 of the License, or
  7.    (at your option) any later version.

  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.

  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  14. #if !defined (SYMFILE_H)
  15. #define SYMFILE_H

  16. /* This file requires that you first include "bfd.h".  */
  17. #include "symtab.h"
  18. #include "probe.h"

  19. /* Opaque declarations.  */
  20. struct target_section;
  21. struct objfile;
  22. struct obj_section;
  23. struct obstack;
  24. struct block;
  25. struct probe;
  26. struct value;
  27. struct frame_info;
  28. struct agent_expr;
  29. struct axs_value;

  30. /* Comparison function for symbol look ups.  */

  31. typedef int (symbol_compare_ftype) (const char *string1,
  32.                                     const char *string2);

  33. /* Partial symbols are stored in the psymbol_cache and pointers to
  34.    them are kept in a dynamically grown array that is obtained from
  35.    malloc and grown as necessary via realloc.  Each objfile typically
  36.    has two of these, one for global symbols and one for static
  37.    symbols.  Although this adds a level of indirection for storing or
  38.    accessing the partial symbols, it allows us to throw away duplicate
  39.    psymbols and set all pointers to the single saved instance.  */

  40. struct psymbol_allocation_list
  41. {

  42.   /* Pointer to beginning of dynamically allocated array of pointers
  43.      to partial symbols.  The array is dynamically expanded as
  44.      necessary to accommodate more pointers.  */

  45.   struct partial_symbol **list;

  46.   /* Pointer to next available slot in which to store a pointer to a
  47.      partial symbol.  */

  48.   struct partial_symbol **next;

  49.   /* Number of allocated pointer slots in current dynamic array (not
  50.      the number of bytes of storage).  The "next" pointer will always
  51.      point somewhere between list[0] and list[size], and when at
  52.      list[size] the array will be expanded on the next attempt to
  53.      store a pointer.  */

  54.   int size;
  55. };

  56. /* Define an array of addresses to accommodate non-contiguous dynamic
  57.    loading of modules.  This is for use when entering commands, so we
  58.    can keep track of the section names until we read the file and can
  59.    map them to bfd sections.  This structure is also used by solib.c
  60.    to communicate the section addresses in shared objects to
  61.    symbol_file_add ().  */

  62. struct section_addr_info
  63. {
  64.   /* The number of sections for which address information is
  65.      available.  */
  66.   size_t num_sections;
  67.   /* Sections whose names are file format dependent.  */
  68.   struct other_sections
  69.   {
  70.     CORE_ADDR addr;
  71.     char *name;

  72.     /* SECTINDEX must be valid for associated BFD or set to -1.  */
  73.     int sectindex;
  74.   } other[1];
  75. };


  76. /* A table listing the load segments in a symfile, and which segment
  77.    each BFD section belongs to.  */
  78. struct symfile_segment_data
  79. {
  80.   /* How many segments are present in this file.  If there are
  81.      two, the text segment is the first one and the data segment
  82.      is the second one.  */
  83.   int num_segments;

  84.   /* If NUM_SEGMENTS is greater than zero, the original base address
  85.      of each segment.  */
  86.   CORE_ADDR *segment_bases;

  87.   /* If NUM_SEGMENTS is greater than zero, the memory size of each
  88.      segment.  */
  89.   CORE_ADDR *segment_sizes;

  90.   /* If NUM_SEGMENTS is greater than zero, this is an array of entries
  91.      recording which segment contains each BFD section.
  92.      SEGMENT_INFO[I] is S+1 if the I'th BFD section belongs to segment
  93.      S, or zero if it is not in any segment.  */
  94.   int *segment_info;
  95. };

  96. /* Callback for quick_symbol_functions->map_symbol_filenames.  */

  97. typedef void (symbol_filename_ftype) (const char *filename,
  98.                                       const char *fullname, void *data);

  99. /* Callback for quick_symbol_functions->expand_symtabs_matching
  100.    to match a file name.  */

  101. typedef int (expand_symtabs_file_matcher_ftype) (const char *filename,
  102.                                                  void *data, int basenames);

  103. /* Callback for quick_symbol_functions->expand_symtabs_matching
  104.    to match a symbol name.  */

  105. typedef int (expand_symtabs_symbol_matcher_ftype) (const char *name,
  106.                                                    void *data);

  107. /* The "quick" symbol functions exist so that symbol readers can
  108.    avoiding an initial read of all the symbols.  For example, symbol
  109.    readers might choose to use the "partial symbol table" utilities,
  110.    which is one implementation of the quick symbol functions.

  111.    The quick symbol functions are generally opaque: the underlying
  112.    representation is hidden from the caller.

  113.    In general, these functions should only look at whatever special
  114.    index the symbol reader creates -- looking through the symbol
  115.    tables themselves is handled by generic code.  If a function is
  116.    defined as returning a "symbol table", this means that the function
  117.    should only return a newly-created symbol table; it should not
  118.    examine pre-existing ones.

  119.    The exact list of functions here was determined in an ad hoc way
  120.    based on gdb's history.  */

  121. struct quick_symbol_functions
  122. {
  123.   /* Return true if this objfile has any "partial" symbols
  124.      available.  */
  125.   int (*has_symbols) (struct objfile *objfile);

  126.   /* Return the symbol table for the "last" file appearing in
  127.      OBJFILE.  */
  128.   struct symtab *(*find_last_source_symtab) (struct objfile *objfile);

  129.   /* Forget all cached full file names for OBJFILE.  */
  130.   void (*forget_cached_source_info) (struct objfile *objfile);

  131.   /* Expand and iterate over each "partial" symbol table in OBJFILE
  132.      where the source file is named NAME.

  133.      If NAME is not absolute, a match after a '/' in the symbol table's
  134.      file name will also work, REAL_PATH is NULL then.  If NAME is
  135.      absolute then REAL_PATH is non-NULL absolute file name as resolved
  136.      via gdb_realpath from NAME.

  137.      If a match is found, the "partial" symbol table is expanded.
  138.      Then, this calls iterate_over_some_symtabs (or equivalent) over
  139.      all newly-created symbol tables, passing CALLBACK and DATA to it.
  140.      The result of this call is returned.  */
  141.   int (*map_symtabs_matching_filename) (struct objfile *objfile,
  142.                                         const char *name,
  143.                                         const char *real_path,
  144.                                         int (*callback) (struct symtab *,
  145.                                                          void *),
  146.                                         void *data);

  147.   /* Check to see if the symbol is defined in a "partial" symbol table
  148.      of OBJFILE.  BLOCK_INDEX should be either GLOBAL_BLOCK or STATIC_BLOCK,
  149.      depending on whether we want to search global symbols or static
  150.      symbols.  NAME is the name of the symbol to look for.  DOMAIN
  151.      indicates what sort of symbol to search for.

  152.      Returns the newly-expanded compunit in which the symbol is
  153.      defined, or NULL if no such symbol table exists.  If OBJFILE
  154.      contains !TYPE_OPAQUE symbol prefer its compunit.  If it contains
  155.      only TYPE_OPAQUE symbol(s), return at least that compunit.  */
  156.   struct compunit_symtab *(*lookup_symbol) (struct objfile *objfile,
  157.                                             int block_index, const char *name,
  158.                                             domain_enum domain);

  159.   /* Print statistics about any indices loaded for OBJFILE.  The
  160.      statistics should be printed to gdb_stdout.  This is used for
  161.      "maint print statistics".  */
  162.   void (*print_stats) (struct objfile *objfile);

  163.   /* Dump any indices loaded for OBJFILE.  The dump should go to
  164.      gdb_stdout.  This is used for "maint print objfiles".  */
  165.   void (*dump) (struct objfile *objfile);

  166.   /* This is called by objfile_relocate to relocate any indices loaded
  167.      for OBJFILE.  */
  168.   void (*relocate) (struct objfile *objfile,
  169.                     const struct section_offsets *new_offsets,
  170.                     const struct section_offsets *delta);

  171.   /* Find all the symbols in OBJFILE named FUNC_NAME, and ensure that
  172.      the corresponding symbol tables are loaded.  */
  173.   void (*expand_symtabs_for_function) (struct objfile *objfile,
  174.                                        const char *func_name);

  175.   /* Read all symbol tables associated with OBJFILE.  */
  176.   void (*expand_all_symtabs) (struct objfile *objfile);

  177.   /* Read all symbol tables associated with OBJFILE which have
  178.      symtab_to_fullname equal to FULLNAME.
  179.      This is for the purposes of examining code only, e.g., expand_line_sal.
  180.      The routine may ignore debug info that is known to not be useful with
  181.      code, e.g., DW_TAG_type_unit for dwarf debug info.  */
  182.   void (*expand_symtabs_with_fullname) (struct objfile *objfile,
  183.                                         const char *fullname);

  184.   /* Find global or static symbols in all tables that are in NAMESPACE
  185.      and for which MATCH (symbol name, NAME) == 0, passing each to
  186.      CALLBACK, reading in partial symbol tables as needed.  Look
  187.      through global symbols if GLOBAL and otherwise static symbols.
  188.      Passes NAME, NAMESPACE, and DATA to CALLBACK with each symbol
  189.      found.  After each block is processed, passes NULL to CALLBACK.
  190.      MATCH must be weaker than strcmp_iw_ordered in the sense that
  191.      strcmp_iw_ordered(x,y) == 0 --> MATCH(x,y) == 0.  ORDERED_COMPARE,
  192.      if non-null, must be an ordering relation compatible with
  193.      strcmp_iw_ordered in the sense that
  194.             strcmp_iw_ordered(x,y) == 0 --> ORDERED_COMPARE(x,y) == 0
  195.      and
  196.             strcmp_iw_ordered(x,y) <= 0 --> ORDERED_COMPARE(x,y) <= 0
  197.      (allowing strcmp_iw_ordered(x,y) < 0 while ORDERED_COMPARE(x, y) == 0).
  198.      CALLBACK returns 0 to indicate that the scan should continue, or
  199.      non-zero to indicate that the scan should be terminated.  */

  200.   void (*map_matching_symbols) (struct objfile *,
  201.                                 const char *name, domain_enum namespace,
  202.                                 int global,
  203.                                 int (*callback) (struct block *,
  204.                                                  struct symbol *, void *),
  205.                                 void *data,
  206.                                 symbol_compare_ftype *match,
  207.                                 symbol_compare_ftype *ordered_compare);

  208.   /* Expand all symbol tables in OBJFILE matching some criteria.

  209.      FILE_MATCHER is called for each file in OBJFILE.  The file name
  210.      and the DATA argument are passed to it.  If it returns zero, this
  211.      file is skipped.  If FILE_MATCHER is NULL such file is not skipped.
  212.      If BASENAMES is non-zero the function should consider only base name of
  213.      DATA (passed file name is already only the lbasename part).

  214.      Otherwise, if KIND does not match this symbol is skipped.

  215.      If even KIND matches, then SYMBOL_MATCHER is called for each symbol
  216.      defined in the file.  The symbol "search" name and DATA are passed
  217.      to SYMBOL_MATCHER.

  218.      If SYMBOL_MATCHER returns zero, then this symbol is skipped.

  219.      Otherwise, this symbol's symbol table is expanded.

  220.      DATA is user data that is passed unmodified to the callback
  221.      functions.  */
  222.   void (*expand_symtabs_matching)
  223.     (struct objfile *objfile,
  224.      expand_symtabs_file_matcher_ftype *file_matcher,
  225.      expand_symtabs_symbol_matcher_ftype *symbol_matcher,
  226.      enum search_domain kind,
  227.      void *data);

  228.   /* Return the comp unit from OBJFILE that contains PC and
  229.      SECTION.  Return NULL if there is no such compunit.  This
  230.      should return the compunit that contains a symbol whose
  231.      address exactly matches PC, or, if there is no exact match, the
  232.      compunit that contains a symbol whose address is closest to
  233.      PC.  */
  234.   struct compunit_symtab *(*find_pc_sect_compunit_symtab)
  235.     (struct objfile *objfile, struct bound_minimal_symbol msymbol,
  236.      CORE_ADDR pc, struct obj_section *section, int warn_if_readin);

  237.   /* Call a callback for every file defined in OBJFILE whose symtab is
  238.      not already read in.  FUN is the callback.  It is passed the file's
  239.      FILENAME, the file's FULLNAME (if need_fullname is non-zero), and
  240.      the DATA passed to this function.  */
  241.   void (*map_symbol_filenames) (struct objfile *objfile,
  242.                                 symbol_filename_ftype *fun, void *data,
  243.                                 int need_fullname);
  244. };

  245. /* Structure of functions used for probe support.  If one of these functions
  246.    is provided, all must be.  */

  247. struct sym_probe_fns
  248. {
  249.   /* If non-NULL, return an array of probe objects.

  250.      The returned value does not have to be freed and it has lifetime of the
  251.      OBJFILE.  */
  252.   VEC (probe_p) *(*sym_get_probes) (struct objfile *);
  253. };

  254. /* Structure to keep track of symbol reading functions for various
  255.    object file types.  */

  256. struct sym_fns
  257. {
  258.   /* Initializes anything that is global to the entire symbol table.
  259.      It is called during symbol_file_add, when we begin debugging an
  260.      entirely new program.  */

  261.   void (*sym_new_init) (struct objfile *);

  262.   /* Reads any initial information from a symbol file, and initializes
  263.      the struct sym_fns SF in preparation for sym_read().  It is
  264.      called every time we read a symbol file for any reason.  */

  265.   void (*sym_init) (struct objfile *);

  266.   /* sym_read (objfile, symfile_flags) Reads a symbol file into a psymtab
  267.      (or possibly a symtab).  OBJFILE is the objfile struct for the
  268.      file we are reading.  SYMFILE_FLAGS are the flags passed to
  269.      symbol_file_add & co.  */

  270.   void (*sym_read) (struct objfile *, int);

  271.   /* Read the partial symbols for an objfile.  This may be NULL, in which case
  272.      gdb has to check other ways if this objfile has any symbols.  This may
  273.      only be non-NULL if the objfile actually does have debuginfo available.
  274.      */

  275.   void (*sym_read_psymbols) (struct objfile *);

  276.   /* Called when we are finished with an objfile.  Should do all
  277.      cleanup that is specific to the object file format for the
  278.      particular objfile.  */

  279.   void (*sym_finish) (struct objfile *);


  280.   /* This function produces a file-dependent section_offsets
  281.      structure, allocated in the objfile's storage.

  282.      The section_addr_info structure contains the offset of loadable and
  283.      allocated sections, relative to the absolute offsets found in the BFD.  */

  284.   void (*sym_offsets) (struct objfile *, const struct section_addr_info *);

  285.   /* This function produces a format-independent description of
  286.      the segments of ABFD.  Each segment is a unit of the file
  287.      which may be relocated independently.  */

  288.   struct symfile_segment_data *(*sym_segments) (bfd *abfd);

  289.   /* This function should read the linetable from the objfile when
  290.      the line table cannot be read while processing the debugging
  291.      information.  */

  292.   void (*sym_read_linetable) (struct objfile *);

  293.   /* Relocate the contents of a debug section SECTP.  The
  294.      contents are stored in BUF if it is non-NULL, or returned in a
  295.      malloc'd buffer otherwise.  */

  296.   bfd_byte *(*sym_relocate) (struct objfile *, asection *sectp, bfd_byte *buf);

  297.   /* If non-NULL, this objfile has probe support, and all the probe
  298.      functions referred to here will be non-NULL.  */
  299.   const struct sym_probe_fns *sym_probe_fns;

  300.   /* The "quick" (aka partial) symbol functions for this symbol
  301.      reader.  */
  302.   const struct quick_symbol_functions *qf;
  303. };

  304. extern struct section_addr_info *
  305.   build_section_addr_info_from_objfile (const struct objfile *objfile);

  306. extern void relative_addr_info_to_section_offsets
  307.   (struct section_offsets *section_offsets, int num_sections,
  308.    const struct section_addr_info *addrs);

  309. extern void addr_info_make_relative (struct section_addr_info *addrs,
  310.                                      bfd *abfd);

  311. /* The default version of sym_fns.sym_offsets for readers that don't
  312.    do anything special.  */

  313. extern void default_symfile_offsets (struct objfile *objfile,
  314.                                      const struct section_addr_info *);

  315. /* The default version of sym_fns.sym_segments for readers that don't
  316.    do anything special.  */

  317. extern struct symfile_segment_data *default_symfile_segments (bfd *abfd);

  318. /* The default version of sym_fns.sym_relocate for readers that don't
  319.    do anything special.  */

  320. extern bfd_byte *default_symfile_relocate (struct objfile *objfile,
  321.                                            asection *sectp, bfd_byte *buf);

  322. extern struct symtab *allocate_symtab (struct compunit_symtab *, const char *)
  323.   ATTRIBUTE_NONNULL (1);

  324. extern struct compunit_symtab *allocate_compunit_symtab (struct objfile *,
  325.                                                          const char *)
  326.   ATTRIBUTE_NONNULL (1);

  327. extern void add_compunit_symtab_to_objfile (struct compunit_symtab *cu);

  328. extern void add_symtab_fns (enum bfd_flavour flavour, const struct sym_fns *);

  329. /* This enum encodes bit-flags passed as ADD_FLAGS parameter to
  330.    symbol_file_add, etc.  */

  331. enum symfile_add_flags
  332.   {
  333.     /* Be chatty about what you are doing.  */
  334.     SYMFILE_VERBOSE = 1 << 1,

  335.     /* This is the main symbol file (as opposed to symbol file for dynamically
  336.        loaded code).  */
  337.     SYMFILE_MAINLINE = 1 << 2,

  338.     /* Do not call breakpoint_re_set when adding this symbol file.  */
  339.     SYMFILE_DEFER_BP_RESET = 1 << 3,

  340.     /* Do not immediately read symbols for this file.  By default,
  341.        symbols are read when the objfile is created.  */
  342.     SYMFILE_NO_READ = 1 << 4
  343.   };

  344. extern void new_symfile_objfile (struct objfile *, int);

  345. extern struct objfile *symbol_file_add (const char *, int,
  346.                                         struct section_addr_info *, int);

  347. extern struct objfile *symbol_file_add_from_bfd (bfd *, const char *, int,
  348.                                                  struct section_addr_info *,
  349.                                                  int, struct objfile *parent);

  350. extern void symbol_file_add_separate (bfd *, const char *, int,
  351.                                       struct objfile *);

  352. extern char *find_separate_debug_file_by_debuglink (struct objfile *);

  353. /* Create a new section_addr_info, with room for NUM_SECTIONS.  */

  354. extern struct section_addr_info *alloc_section_addr_info (size_t
  355.                                                           num_sections);

  356. /* Build (allocate and populate) a section_addr_info struct from an
  357.    existing section table.  */

  358. extern struct section_addr_info
  359.   *build_section_addr_info_from_section_table (const struct target_section
  360.                                                *start,
  361.                                                const struct target_section
  362.                                                *end);

  363. /* Free all memory allocated by
  364.    build_section_addr_info_from_section_table.  */

  365. extern void free_section_addr_info (struct section_addr_info *);


  366.                         /*   Variables   */

  367. /* If non-zero, shared library symbols will be added automatically
  368.    when the inferior is created, new libraries are loaded, or when
  369.    attaching to the inferior.  This is almost always what users will
  370.    want to have happen; but for very large programs, the startup time
  371.    will be excessive, and so if this is a problem, the user can clear
  372.    this flag and then add the shared library symbols as needed.  Note
  373.    that there is a potential for confusion, since if the shared
  374.    library symbols are not loaded, commands like "info fun" will *not*
  375.    report all the functions that are actually present.  */

  376. extern int auto_solib_add;

  377. /* From symfile.c */

  378. extern void set_initial_language (void);

  379. extern void find_lowest_section (bfd *, asection *, void *);

  380. extern bfd *symfile_bfd_open (const char *);

  381. extern bfd *gdb_bfd_open_maybe_remote (const char *);

  382. extern int get_section_index (struct objfile *, char *);

  383. extern int print_symbol_loading_p (int from_tty, int mainline, int full);

  384. /* Utility functions for overlay sections: */
  385. extern enum overlay_debugging_state
  386. {
  387.   ovly_off,
  388.   ovly_on,
  389.   ovly_auto
  390. } overlay_debugging;
  391. extern int overlay_cache_invalid;

  392. /* Return the "mapped" overlay section containing the PC.  */
  393. extern struct obj_section *find_pc_mapped_section (CORE_ADDR);

  394. /* Return any overlay section containing the PC (even in its LMA
  395.    region).  */
  396. extern struct obj_section *find_pc_overlay (CORE_ADDR);

  397. /* Return true if the section is an overlay.  */
  398. extern int section_is_overlay (struct obj_section *);

  399. /* Return true if the overlay section is currently "mapped".  */
  400. extern int section_is_mapped (struct obj_section *);

  401. /* Return true if pc belongs to section's VMA.  */
  402. extern CORE_ADDR pc_in_mapped_range (CORE_ADDR, struct obj_section *);

  403. /* Return true if pc belongs to section's LMA.  */
  404. extern CORE_ADDR pc_in_unmapped_range (CORE_ADDR, struct obj_section *);

  405. /* Map an address from a section's LMA to its VMA.  */
  406. extern CORE_ADDR overlay_mapped_address (CORE_ADDR, struct obj_section *);

  407. /* Map an address from a section's VMA to its LMA.  */
  408. extern CORE_ADDR overlay_unmapped_address (CORE_ADDR, struct obj_section *);

  409. /* Convert an address in an overlay section (force into VMA range).  */
  410. extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, struct obj_section *);

  411. /* Load symbols from a file.  */
  412. extern void symbol_file_add_main (const char *args, int from_tty);

  413. /* Clear GDB symbol tables.  */
  414. extern void symbol_file_clear (int from_tty);

  415. /* Default overlay update function.  */
  416. extern void simple_overlay_update (struct obj_section *);

  417. extern bfd_byte *symfile_relocate_debug_section (struct objfile *, asection *,
  418.                                                  bfd_byte *);

  419. extern int symfile_map_offsets_to_segments (bfd *,
  420.                                             const struct symfile_segment_data *,
  421.                                             struct section_offsets *,
  422.                                             int, const CORE_ADDR *);
  423. struct symfile_segment_data *get_symfile_segment_data (bfd *abfd);
  424. void free_symfile_segment_data (struct symfile_segment_data *data);

  425. extern struct cleanup *increment_reading_symtab (void);

  426. void expand_symtabs_matching (expand_symtabs_file_matcher_ftype *,
  427.                               expand_symtabs_symbol_matcher_ftype *,
  428.                               enum search_domain kind, void *data);

  429. void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
  430.                            int need_fullname);

  431. /* From dwarf2read.c */

  432. /* Names for a dwarf2 debugging section.  The field NORMAL is the normal
  433.    section name (usually from the DWARF standard), while the field COMPRESSED
  434.    is the name of compressed sections.  If your object file format doesn't
  435.    support compressed sections, the field COMPRESSED can be NULL.  Likewise,
  436.    the debugging section is not supported, the field NORMAL can be NULL too.
  437.    It doesn't make sense to have a NULL NORMAL field but a non-NULL COMPRESSED
  438.    field.  */

  439. struct dwarf2_section_names {
  440.   const char *normal;
  441.   const char *compressed;
  442. };

  443. /* List of names for dward2 debugging sections.  Also most object file formats
  444.    use the standardized (ie ELF) names, some (eg XCOFF) have customized names
  445.    due to restrictions.
  446.    The table for the standard names is defined in dwarf2read.c.  Please
  447.    update all instances of dwarf2_debug_sections if you add a field to this
  448.    structure.  It is always safe to use { NULL, NULL } in this case.  */

  449. struct dwarf2_debug_sections {
  450.   struct dwarf2_section_names info;
  451.   struct dwarf2_section_names abbrev;
  452.   struct dwarf2_section_names line;
  453.   struct dwarf2_section_names loc;
  454.   struct dwarf2_section_names macinfo;
  455.   struct dwarf2_section_names macro;
  456.   struct dwarf2_section_names str;
  457.   struct dwarf2_section_names ranges;
  458.   struct dwarf2_section_names types;
  459.   struct dwarf2_section_names addr;
  460.   struct dwarf2_section_names frame;
  461.   struct dwarf2_section_names eh_frame;
  462.   struct dwarf2_section_names gdb_index;
  463.   /* This field has no meaning, but exists solely to catch changes to
  464.      this structure which are not reflected in some instance.  */
  465.   int sentinel;
  466. };

  467. extern int dwarf2_has_info (struct objfile *,
  468.                             const struct dwarf2_debug_sections *);

  469. /* Dwarf2 sections that can be accessed by dwarf2_get_section_info.  */
  470. enum dwarf2_section_enum {
  471.   DWARF2_DEBUG_FRAME,
  472.   DWARF2_EH_FRAME
  473. };

  474. extern void dwarf2_get_section_info (struct objfile *,
  475.                                      enum dwarf2_section_enum,
  476.                                      asection **, const gdb_byte **,
  477.                                      bfd_size_type *);

  478. extern int dwarf2_initialize_objfile (struct objfile *);
  479. extern void dwarf2_build_psymtabs (struct objfile *);
  480. extern void dwarf2_build_frame_info (struct objfile *);

  481. void dwarf2_free_objfile (struct objfile *);

  482. /* From mdebugread.c */

  483. extern void mdebug_build_psymtabs (struct objfile *,
  484.                                    const struct ecoff_debug_swap *,
  485.                                    struct ecoff_debug_info *);

  486. extern void elfmdebug_build_psymtabs (struct objfile *,
  487.                                       const struct ecoff_debug_swap *,
  488.                                       asection *);

  489. /* From minidebug.c.  */

  490. extern bfd *find_separate_debug_file_in_section (struct objfile *);

  491. #endif /* !defined(SYMFILE_H) */