/* Definitions for symbol file management in GDB.
- Copyright (C) 1992-2014 Free Software Foundation, Inc.
+ Copyright (C) 1992-2015 Free Software Foundation, Inc.
This file is part of GDB.
struct bcache;
struct htab;
-struct symtab;
struct objfile_data;
/* This structure maintains information on a per-objfile basis about the
struct program_space *pspace;
- /* Each objfile points to a linked list of symtabs derived from this file,
- one symtab structure for each compilation unit (source file). Each link
- in the symtab list contains a backpointer to this objfile. */
+ /* List of compunits.
+ These are used to do symbol lookups and file/line-number lookups. */
- struct symtab *symtabs;
+ struct compunit_symtab *compunit_symtabs;
/* Each objfile points to a linked list of partial symtabs derived from
this file, one partial symtab structure for each compilation unit
extern struct objfile *allocate_objfile (bfd *, const char *name, int);
-extern struct gdbarch *get_objfile_arch (struct objfile *);
+extern struct gdbarch *get_objfile_arch (const struct objfile *);
extern int entry_point_address_query (CORE_ADDR *entry_p);
/* Traverse all symtabs in one objfile. */
-#define ALL_OBJFILE_SYMTABS(objfile, s) \
- for ((s) = (objfile) -> symtabs; (s) != NULL; (s) = (s) -> next)
+#define ALL_OBJFILE_FILETABS(objfile, cu, s) \
+ ALL_OBJFILE_COMPUNITS (objfile, cu) \
+ ALL_COMPUNIT_FILETABS (cu, s)
-/* Traverse all primary symtabs in one objfile. */
+/* Traverse all compunits in one objfile. */
-#define ALL_OBJFILE_PRIMARY_SYMTABS(objfile, s) \
- ALL_OBJFILE_SYMTABS ((objfile), (s)) \
- if ((s)->primary)
+#define ALL_OBJFILE_COMPUNITS(objfile, cu) \
+ for ((cu) = (objfile) -> compunit_symtabs; (cu) != NULL; (cu) = (cu) -> next)
/* Traverse all minimal symbols in one objfile. */
/* Traverse all symtabs in all objfiles in the current symbol
space. */
-#define ALL_SYMTABS(objfile, s) \
- ALL_OBJFILES (objfile) \
- ALL_OBJFILE_SYMTABS (objfile, s)
+#define ALL_FILETABS(objfile, ps, s) \
+ ALL_OBJFILES (objfile) \
+ ALL_OBJFILE_FILETABS (objfile, ps, s)
-/* Traverse all symtabs in all objfiles in the current program space,
- skipping included files (which share a blockvector with their
- primary symtab). */
+/* Traverse all compunits in all objfiles in the current program space. */
-#define ALL_PRIMARY_SYMTABS(objfile, s) \
+#define ALL_COMPUNITS(objfile, cu) \
ALL_OBJFILES (objfile) \
- ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
+ ALL_OBJFILE_COMPUNITS (objfile, cu)
/* Traverse all minimal symbols in all objfiles in the current symbol
space. */
void set_objfile_per_bfd (struct objfile *obj);
+/* Return canonical name for OBJFILE.
+ This is the real file name if the file has been opened.
+ Otherwise it is the original name supplied by the user. */
+
const char *objfile_name (const struct objfile *objfile);
+/* Return the (real) file name of OBJFILE if the file has been opened,
+ otherwise return NULL. */
+
+const char *objfile_filename (const struct objfile *objfile);
+
+/* Return the name to print for OBJFILE in debugging messages. */
+
+extern const char *objfile_debug_name (const struct objfile *objfile);
+
/* Set the objfile's notion of the "main" name and language. */
extern void set_objfile_main_name (struct objfile *objfile,