[+const,1/2] Add const to many struct objfile *
Commit Message
2014-12-03 Jan Kratochvil <jan.kratochvil@redhat.com>
Add const to struct objfile *.
* minsyms.c, minsyms.h, symtab.c, symtab.h: In these files.
@@ -404,7 +404,7 @@ lookup_minimal_symbol_text (const char *name, struct objfile *objf)
struct minimal_symbol *
lookup_minimal_symbol_by_pc_name (CORE_ADDR pc, const char *name,
- struct objfile *objf)
+ const struct objfile *objf)
{
struct objfile *objfile;
struct minimal_symbol *msymbol;
@@ -206,7 +206,7 @@ struct bound_minimal_symbol lookup_minimal_symbol_solib_trampoline
symbol that matches, or NULL if no match is found. */
struct minimal_symbol *lookup_minimal_symbol_by_pc_name
- (CORE_ADDR, const char *, struct objfile *);
+ (CORE_ADDR, const char *, const struct objfile *);
/* Search through the minimal symbol table for each objfile and find
the symbol whose address is the largest address that is still less
@@ -1061,7 +1061,7 @@ expand_symtab_containing_pc (CORE_ADDR pc, struct obj_section *section)
void
fixup_section (struct general_symbol_info *ginfo,
- CORE_ADDR addr, struct objfile *objfile)
+ CORE_ADDR addr, const struct objfile *objfile)
{
struct minimal_symbol *msym;
@@ -1141,7 +1141,7 @@ fixup_section (struct general_symbol_info *ginfo,
}
struct symbol *
-fixup_symbol_section (struct symbol *sym, struct objfile *objfile)
+fixup_symbol_section (struct symbol *sym, const struct objfile *objfile)
{
CORE_ADDR addr;
@@ -1561,7 +1561,7 @@ lookup_global_symbol_from_objfile (const struct objfile *main_objfile,
if (sym)
{
block_found = block;
- return fixup_symbol_section (sym, (struct objfile *)objfile);
+ return fixup_symbol_section (sym, objfile);
}
}
@@ -1580,8 +1580,9 @@ lookup_global_symbol_from_objfile (const struct objfile *main_objfile,
static symbols. */
static struct symbol *
-lookup_symbol_in_objfile_symtabs (struct objfile *objfile, int block_index,
- const char *name, const domain_enum domain)
+lookup_symbol_in_objfile_symtabs (const struct objfile *objfile,
+ int block_index, const char *name,
+ const domain_enum domain)
{
struct compunit_symtab *cust;
@@ -1426,7 +1426,7 @@ extern CORE_ADDR skip_prologue_using_sal (struct gdbarch *gdbarch,
CORE_ADDR func_addr);
extern struct symbol *fixup_symbol_section (struct symbol *,
- struct objfile *);
+ const struct objfile *);
/* Symbol searching */
/* Note: struct symbol_search, search_symbols, et.al. are declared here,
@@ -1484,7 +1484,7 @@ extern struct symbol *
int producer_is_realview (const char *producer);
void fixup_section (struct general_symbol_info *ginfo,
- CORE_ADDR addr, struct objfile *objfile);
+ CORE_ADDR addr, const struct objfile *objfile);
/* Look up objfile containing BLOCK. */