Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: gdb/objfiles.h

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/objc-lang.c ('k') | gdb/objfiles.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/objfiles.h
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index aba179149814928ab88d7638d0a020806420ddf6..01c3aead713119a31a95fe410de59b377016c3d0 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -327,13 +327,13 @@ struct objfile
unsigned num_data;
/* Set of relocation offsets to apply to each section.
- Currently on the objfile_obstack (which makes no sense, but I'm
- not sure it's harming anything).
+ The table is indexed by the_bfd_section->index, thus it is generally
+ as large as the number of sections in the binary.
+ The table is stored on the objfile_obstack.
These offsets indicate that all symbols (including partial and
minimal symbols) which have been read have been relocated by this
- much. Symbols which are yet to be read need to be relocated by
- it. */
+ much. Symbols which are yet to be read need to be relocated by it. */
struct section_offsets *section_offsets;
int num_sections;
@@ -354,12 +354,11 @@ struct objfile
among other things, is used to map pc addresses into sections.
SECTIONS points to the first entry in the table, and
SECTIONS_END points to the first location past the last entry
- in the table. Currently the table is stored on the
- objfile_obstack (which makes no sense, but I'm not sure it's
- harming anything). */
+ in the table. The table is stored on the objfile_obstack.
+ There is no particular order to the sections in this table, and it
+ only contains sections we care about (e.g. non-empty, SEC_ALLOC). */
- struct obj_section
- *sections, *sections_end;
+ struct obj_section *sections, *sections_end;
/* GDB allows to have debug symbols in separate object files. This is
used by .gnu_debuglink, ELF build id note and Mach-O OSO.
@@ -381,7 +380,7 @@ struct objfile
struct objfile *separate_debug_objfile_link;
/* Place to stash various statistics about this objfile. */
- OBJSTATS;
+ OBJSTATS;
/* A linked list of symbols created when reading template types or
function templates. These symbols are not stored in any symbol
@@ -450,7 +449,7 @@ extern int entry_point_address_query (CORE_ADDR *entry_p);
extern CORE_ADDR entry_point_address (void);
-extern int build_objfile_section_table (struct objfile *);
+extern void build_objfile_section_table (struct objfile *);
extern void terminate_minimal_symbol_table (struct objfile *objfile);
@@ -526,6 +525,11 @@ extern void *objfile_data (struct objfile *objfile,
extern struct bfd *gdb_bfd_ref (struct bfd *abfd);
extern void gdb_bfd_unref (struct bfd *abfd);
extern int gdb_bfd_close_or_warn (struct bfd *abfd);
+
+extern 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);
/* Traverse all object files in the current program space.
@@ -557,6 +561,12 @@ extern int gdb_bfd_close_or_warn (struct bfd *abfd);
#define ALL_OBJFILE_SYMTABS(objfile, s) \
for ((s) = (objfile) -> symtabs; (s) != NULL; (s) = (s) -> next)
+/* Traverse all primary symtabs in one objfile. */
+
+#define ALL_OBJFILE_PRIMARY_SYMTABS(objfile, s) \
+ ALL_OBJFILE_SYMTABS ((objfile), (s)) \
+ if ((s)->primary)
+
/* Traverse all minimal symbols in one objfile. */
#define ALL_OBJFILE_MSYMBOLS(objfile, m) \
@@ -579,13 +589,11 @@ extern int gdb_bfd_close_or_warn (struct bfd *abfd);
#define ALL_PRIMARY_SYMTABS(objfile, s) \
ALL_OBJFILES (objfile) \
- ALL_OBJFILE_SYMTABS (objfile, s) \
- if ((s)->primary)
+ ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
#define ALL_PSPACE_PRIMARY_SYMTABS(pspace, objfile, s) \
ALL_PSPACE_OBJFILES (ss, objfile) \
- ALL_OBJFILE_SYMTABS (objfile, s) \
- if ((s)->primary)
+ ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
/* Traverse all minimal symbols in all objfiles in the current symbol
space. */
« no previous file with comments | « gdb/objc-lang.c ('k') | gdb/objfiles.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698