I am just not sure if we should go the route of
struct objfile * -> const struct objfile *
or the other way of:
const struct objfile * -> struct objfile *
Normally const adding is better but here I do not see much useful to have any
struct objfile * const and then it just causes pointer compatibility problems.
On Wed, 03 Dec 2014 18:18:44 +0100, Doug Evans wrote:
struct objfile is one case where I've decided to just leave the const
out and not worry about it.
gdb/ChangeLog
2014-12-05 Jan Kratochvil <
[email protected]>
Remove const from struct objfile *.
* solib-darwin.c, solib-spu.c, solib-svr4.c, solib.c, solist.h,
symtab.c, symtab.h: In these files.
+
+ Remove const from struct objfile *.
+ * solib-darwin.c, solib-spu.c, solib-svr4.c, solib.c, solist.h,
+ symtab.c, symtab.h: In these files.
+
* MAINTAINERS (Write After Approval): Add "Andreas From"
}
\f
static struct symbol *
-darwin_lookup_lib_symbol (const struct objfile *objfile,
+darwin_lookup_lib_symbol (struct objfile *objfile,
const char *name,
const domain_enum domain)
{
/* Lookup global symbol in a SPE executable. */
static struct symbol *
-spu_lookup_lib_symbol (const struct objfile *objfile,
+spu_lookup_lib_symbol (struct objfile *objfile,
const char *name,
const domain_enum domain)
{
the main executable. */
static struct symbol *
-elf_lookup_lib_symbol (const struct objfile *objfile,
+elf_lookup_lib_symbol (struct objfile *objfile,
const char *name,
const domain_enum domain)
{
the library-specific handler if it is installed for the current target. */
struct symbol *
-solib_global_lookup (const struct objfile *objfile,
+solib_global_lookup (struct objfile *objfile,
const char *name,
const domain_enum domain)
{
unsigned o_flags, char **temp_pathname);
/* Hook for looking up global symbols in a library-specific way. */
- struct symbol * (*lookup_lib_global_symbol) (const struct objfile *objfile,
+ struct symbol * (*lookup_lib_global_symbol) (struct objfile *objfile,
const char *name,
const domain_enum domain);
extern struct target_so_ops *current_target_so_ops;
/* Handler for library-specific global symbol lookup in solib.c. */
-struct symbol *solib_global_lookup (const struct objfile *objfile,
+struct symbol *solib_global_lookup (struct objfile *objfile,
const char *name,
const domain_enum domain);
/* See symtab.h. */
struct symbol *
-lookup_global_symbol_from_objfile (const struct objfile *main_objfile,
+lookup_global_symbol_from_objfile (struct objfile *main_objfile,
const char *name,
const domain_enum domain)
{
- const struct objfile *objfile;
+ struct objfile *objfile;
for (objfile = main_objfile;
objfile;
if (sym)
{
block_found = block;
- return fixup_symbol_section (sym, (struct objfile *)objfile);
+ return fixup_symbol_section (sym, objfile);
}
}
- sym = lookup_symbol_via_quick_fns ((struct objfile *) objfile,
- GLOBAL_BLOCK, name, domain);
+ sym = lookup_symbol_via_quick_fns (objfile, GLOBAL_BLOCK, name, domain);
if (sym)
return sym;
}
if necessary. */
extern struct symbol *
- lookup_global_symbol_from_objfile (const struct objfile *main_objfile,
+ lookup_global_symbol_from_objfile (struct objfile *main_objfile,
const char *name,
const domain_enum domain);