aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2015-10-13 12:40:01 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2015-10-13 12:42:35 -0400
commit3953f15ce4b4154e9fd7951424fedac0170ab59c (patch)
tree8f28ff7aa2ad9fbed7ad99a3372c8b85ecf34996 /gdb/solib.h
parent01f573ad8aa539f972e2fef8a10ef290e042e24c (diff)
downloadgdb-3953f15ce4b4154e9fd7951424fedac0170ab59c.zip
gdb-3953f15ce4b4154e9fd7951424fedac0170ab59c.tar.gz
gdb-3953f15ce4b4154e9fd7951424fedac0170ab59c.tar.bz2
Constify arguments of gdb_bfd_lookup_symbol and related functions
Fixes this error: /home/pedro/gdb/mygit/src/gdb/solib-frv.c: In function ‘int enable_break2()’: /home/pedro/gdb/mygit/src/gdb/solib-frv.c:622:72: error: invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive] addr = gdb_bfd_lookup_symbol (tmp_bfd, cmp_name, "_dl_debug_addr"); ^ In file included from /home/pedro/gdb/mygit/src/gdb/solib-frv.c:23:0: /home/pedro/gdb/mygit/src/gdb/solib.h:82:18: error: initializing argument 3 of ‘CORE_ADDR gdb_bfd_lookup_symbol(bfd*, int (*)(asymbol*, void*), void*)’ [-fpermissive] extern CORE_ADDR gdb_bfd_lookup_symbol (bfd *abfd, ^ The call in question is: addr = gdb_bfd_lookup_symbol (tmp_bfd, cmp_name, "_dl_debug_addr"); gdb/ChangeLog: * 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.
Diffstat (limited to 'gdb/solib.h')
-rw-r--r--gdb/solib.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/solib.h b/gdb/solib.h
index 336971d..165df9c 100644
--- a/gdb/solib.h
+++ b/gdb/solib.h
@@ -80,15 +80,17 @@ extern int libpthread_name_p (const char *name);
/* 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. */