This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH c++ 4/6] gdb_bfd_lookup_symbol: Cast const char* arguments to void*
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 12 Oct 2015 11:16:27 +0100
- Subject: Re: [PATCH c++ 4/6] gdb_bfd_lookup_symbol: Cast const char* arguments to void*
- Authentication-results: sourceware.org; auth=none
- References: <1444624329-4828-1-git-send-email-simon dot marchi at polymtl dot ca> <1444624329-4828-4-git-send-email-simon dot marchi at polymtl dot ca>
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 (éå)