/* Definitions for symbol file management in GDB.
- Copyright (C) 1992-2013 Free Software Foundation, Inc.
+ Copyright (C) 1992-2014 Free Software Foundation, Inc.
This file is part of GDB.
struct entry_info
{
- /* The relocated value we should use for this objfile entry point. */
+ /* The unrelocated value we should use for this objfile entry point. */
CORE_ADDR entry_point;
+ /* The index of the section in which the entry point appears. */
+ int the_bfd_section_index;
+
/* Set to 1 iff ENTRY_POINT contains a valid value. */
unsigned entry_point_p : 1;
+
+ /* Set to 1 iff this object was initialized. */
+ unsigned initialized : 1;
};
/* Sections in an objfile. The section offsets are stored in the
name, and the second is the demangled name or just a zero byte
if the name doesn't demangle. */
struct htab *demangled_names_hash;
+
+ /* The per-objfile information about the entry point, the scope (file/func)
+ containing the entry point, and the scope of the user's main() func. */
+
+ struct entry_info ei;
+
+ /* The name and language of any "main" found in this objfile. The
+ name can be NULL, which means that the information was not
+ recorded. */
+
+ const char *name_of_main;
+ enum language language_of_main;
};
/* Master structure for keeping track of each file from which
struct objfile *next;
- /* The object file's name, tilde-expanded and absolute. This
- pointer is never NULL. This does not have to be freed; it is
+ /* The object file's original name as specified by the user,
+ made absolute, and tilde-expanded. However, it is not canonicalized
+ (i.e., it has not been passed through gdb_realpath).
+ This pointer is never NULL. This does not have to be freed; it is
guaranteed to have a lifetime at least as long as the objfile. */
char *original_name;
const struct sym_fns *sf;
- /* The per-objfile information about the entry point, the scope (file/func)
- containing the entry point, and the scope of the user's main() func. */
-
- struct entry_info ei;
-
/* Per objfile data-pointers required by other GDB modules. */
REGISTRY_FIELDS;
extern void put_objfile_before (struct objfile *, struct objfile *);
-extern void objfile_to_front (struct objfile *);
-
extern void add_separate_debug_objfile (struct objfile *, struct objfile *);
extern void unlink_objfile (struct objfile *);
extern void objfiles_changed (void);
+extern int is_addr_in_objfile (CORE_ADDR addr, const struct objfile *objfile);
+
/* This operation deletes all objfile entries that represent solibs that
weren't explicitly loaded by the user, via e.g., the add-symbol-file
command. */
const char *objfile_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,
+ const char *name, enum language lang);
+
#endif /* !defined (OBJFILES_H) */