+2015-10-13 Simon Marchi <thundersim@gmail.com>
+
+ * solib-dsbt.c (cmp_name): Constify arguments.
+ * solib-frv.c (cmp_name): Likewise.
+ * solib-svr4.c (svr4_create_solib_event_breakpoints): Likewise.
+ * solib.c (gdb_bfd_lookup_symbol_from_symtab): Likewise.
+ (bfd_lookup_symbol_from_dyn_symtab): Likewise.
+ (gdb_bfd_lookup_symbol): Likewise.
+ * solib.h (gdb_bfd_lookup_symbol): Likewise.
+ (gdb_bfd_lookup_symbol_from_symtab): Likewise.
+
2015-10-12 Andrew Burgess <andrew.burgess@embecosm.com>
* stack.c (parse_frame_specification): Remove message parameter,
/* Helper function for gdb_bfd_lookup_symbol. */
static int
-cmp_name (asymbol *sym, void *data)
+cmp_name (const asymbol *sym, const void *data)
{
return (strcmp (sym->name, (const char *) data) == 0);
}
/* Helper function for gdb_bfd_lookup_symbol. */
static int
-cmp_name (asymbol *sym, void *data)
+cmp_name (const asymbol *sym, const void *data)
{
return (strcmp (sym->name, (const char *) data) == 0);
}
/* Helper function for gdb_bfd_lookup_symbol. */
static int
-cmp_name_and_sec_flags (asymbol *sym, void *data)
+cmp_name_and_sec_flags (const asymbol *sym, const void *data)
{
return (strcmp (sym->name, (const char *) data) == 0
&& (sym->section->flags & (SEC_CODE | SEC_DATA)) != 0);
for (bkpt_namep = solib_break_names; *bkpt_namep != NULL; bkpt_namep++)
{
sym_addr = gdb_bfd_lookup_symbol (tmp_bfd, cmp_name_and_sec_flags,
- (void *) *bkpt_namep);
+ *bkpt_namep);
if (sym_addr != 0)
break;
}
CORE_ADDR
gdb_bfd_lookup_symbol_from_symtab (bfd *abfd,
- int (*match_sym) (asymbol *, void *),
- void *data)
+ int (*match_sym) (const asymbol *,
+ const void *),
+ const void *data)
{
long storage_needed = bfd_get_symtab_upper_bound (abfd);
CORE_ADDR symaddr = 0;
static CORE_ADDR
bfd_lookup_symbol_from_dyn_symtab (bfd *abfd,
- int (*match_sym) (asymbol *, void *),
- void *data)
+ int (*match_sym) (const asymbol *,
+ const void *),
+ const void *data)
{
long storage_needed = bfd_get_dynamic_symtab_upper_bound (abfd);
CORE_ADDR symaddr = 0;
CORE_ADDR
gdb_bfd_lookup_symbol (bfd *abfd,
- int (*match_sym) (asymbol *, void *),
- void *data)
+ int (*match_sym) (const asymbol *, const void *),
+ const void *data)
{
CORE_ADDR symaddr = gdb_bfd_lookup_symbol_from_symtab (abfd, match_sym, data);
/* Look up symbol from both symbol table and dynamic string table. */
extern CORE_ADDR gdb_bfd_lookup_symbol (bfd *abfd,
- int (*match_sym) (asymbol *, void *),
- void *data);
+ int (*match_sym) (const asymbol *,
+ const void *),
+ const void *data);
/* Look up symbol from symbol table. */
extern CORE_ADDR gdb_bfd_lookup_symbol_from_symtab (bfd *abfd,
- int (*match_sym) (asymbol *,
- void *),
- void *data);
+ int (*match_sym)
+ (const asymbol *,
+ const void *),
+ const void *data);
/* Enable or disable optional solib event breakpoints as appropriate. */