This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH c++ 4/6] gdb_bfd_lookup_symbol: Cast const char* arguments to void*


Simon Marchi <simon.marchi@polymtl.ca> writes:

> /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");

Hi Simon,
Did you consider the possibility that changing argument 'data' type to
'const void *'? like this,

CORE_ADDR
gdb_bfd_lookup_symbol (bfd *abfd,
		       int (*match_sym) (asymbol *, void *),
		       const void *data)

-- 
Yao (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]