2003-04-12 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / symfile.h
index fb5fd175511bc41223e752106b89f3162baf97f1..0e2f1ef096bd740af04ae7181c7360bb63e03beb 100644 (file)
@@ -1,5 +1,6 @@
 /* Definitions for reading symbol files into GDB.
-   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1996, 2000
+   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+   2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 /* This file requires that you first include "bfd.h".  */
 
+/* Opaque declarations.  */
+struct objfile;
+struct obstack;
+struct block;
+
 /* Partial symbols are stored in the psymbol_cache and pointers to them
    are kept in a dynamically grown array that is obtained from malloc and
    grown as necessary via realloc.  Each objfile typically has two of these,
@@ -131,12 +137,12 @@ struct sym_fns
 /* The default version of sym_fns.sym_offsets for readers that don't
    do anything special.  */
 
-extern void
-default_symfile_offsets (struct objfile *objfile, struct section_addr_info *);
+extern void default_symfile_offsets (struct objfile *objfile,
+                                    struct section_addr_info *);
 
 
-extern void
-extend_psymbol_list (struct psymbol_allocation_list *, struct objfile *);
+extern void extend_psymbol_list (struct psymbol_allocation_list *,
+                                struct objfile *);
 
 /* Add any kind of symbol to a psymbol_allocation_list. */
 
@@ -169,8 +175,10 @@ extern void add_symtab_fns (struct sym_fns *);
 
 extern void init_entry_point_info (struct objfile *);
 
-extern void
-syms_from_objfile (struct objfile *, struct section_addr_info *, int, int);
+extern void syms_from_objfile (struct objfile *,
+                               struct section_addr_info *, 
+                               struct section_offsets *, int,
+                               int, int);
 
 extern void new_symfile_objfile (struct objfile *, int, int);
 
@@ -187,8 +195,7 @@ build_section_addr_info_from_section_table (const struct section_table *start,
 
 /* Free all memory allocated by build_section_addr_info_from_section_table. */
 
-extern void
-free_section_addr_info (struct section_addr_info *);
+extern void free_section_addr_info (struct section_addr_info *);
 
 
 extern struct partial_symtab *start_psymtab_common (struct objfile *,
@@ -207,7 +214,7 @@ extern void sort_symtab_syms (struct symtab *);
    (and add a null character at the end in the copy).
    Returns the address of the copy.  */
 
-extern char *obsavestring (char *, int, struct obstack *);
+extern char *obsavestring (const char *, int, struct obstack *);
 
 /* Concatenate strings S1, S2 and S3; return the new string.
    Space is found in the symbol_obstack.  */
@@ -217,18 +224,27 @@ extern char *obconcat (struct obstack *obstackp, const char *, const char *,
 
                        /*   Variables   */
 
-/* whether to auto load solibs at startup time:  0/1. 
-
-   On all platforms, 0 means "don't auto load".
+/* If non-zero, shared library symbols will be added automatically
+   when the inferior is created, new libraries are loaded, or when
+   attaching to the inferior.  This is almost always what users will
+   want to have happen; but for very large programs, the startup time
+   will be excessive, and so if this is a problem, the user can clear
+   this flag and then add the shared library symbols as needed.  Note
+   that there is a potential for confusion, since if the shared
+   library symbols are not loaded, commands like "info fun" will *not*
+   report all the functions that are actually present. */
 
-   On HP-UX, > 0 means a threshhold, in megabytes, of symbol table which will
-   be auto loaded.  When the cumulative size of solib symbol table exceeds
-   this threshhold, solibs' symbol tables will not be loaded.
+extern int auto_solib_add;
 
-   On other platforms, > 0 means, "always auto load".
- */
+/* For systems that support it, a threshold size in megabytes.  If
+   automatically adding a new library's symbol table to those already
+   known to the debugger would cause the total shared library symbol
+   size to exceed this threshhold, then the shlib's symbols are not
+   added.  The threshold is ignored if the user explicitly asks for a
+   shlib to be added, such as when using the "sharedlibrary"
+   command. */
 
-extern int auto_solib_add;
+extern int auto_solib_limit;
 
 /* From symfile.c */
 
@@ -238,12 +254,18 @@ extern struct partial_symtab *allocate_psymtab (char *, struct objfile *);
 
 extern void discard_psymtab (struct partial_symtab *);
 
-extern void find_lowest_section (bfd *, asection *, PTR);
+extern void find_lowest_section (bfd *, asection *, void *);
 
 extern bfd *symfile_bfd_open (char *);
 
+extern int get_section_index (struct objfile *, char *);
+
 /* Utility functions for overlay sections: */
-extern int overlay_debugging;
+extern enum overlay_debugging_state {
+  ovly_off, 
+  ovly_on, 
+  ovly_auto
+} overlay_debugging;
 extern int overlay_cache_invalid;
 
 /* return the "mapped" overlay section  containing the PC */
@@ -273,6 +295,15 @@ extern CORE_ADDR overlay_unmapped_address (CORE_ADDR, asection *);
 /* convert an address in an overlay section (force into VMA range) */
 extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, asection *);
 
+/* Load symbols from a file. */
+extern void symbol_file_add_main (char *args, int from_tty);
+
+/* Clear GDB symbol tables. */
+extern void symbol_file_clear (int from_tty);
+
+extern bfd_byte *symfile_relocate_debug_section (bfd *abfd, asection *sectp,
+                                                bfd_byte *buf);
+
 /* From dwarfread.c */
 
 extern void
@@ -284,6 +315,7 @@ dwarf_build_psymtabs (struct objfile *, int, file_ptr, unsigned int,
 extern int dwarf2_has_info (bfd * abfd);
 
 extern void dwarf2_build_psymtabs (struct objfile *, int);
+extern void dwarf2_build_frame_info (struct objfile *);
 
 /* From mdebugread.c */
 
This page took 0.025956 seconds and 4 git commands to generate.