From patchwork Mon Oct 12 04:32:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 9052 Received: (qmail 75784 invoked by alias); 12 Oct 2015 04:32:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 75551 invoked by uid 89); 12 Oct 2015 04:32:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL, BAYES_00, SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: smtp.electronicbox.net Received: from smtp.electronicbox.net (HELO smtp.electronicbox.net) (96.127.255.83) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Oct 2015 04:32:19 +0000 Received: from simark.lan. (cable-192.222.137.139.electronicbox.net [192.222.137.139]) by smtp.electronicbox.net (Postfix) with ESMTP id 8A214440E7B; Mon, 12 Oct 2015 00:32:17 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH c++ 4/6] gdb_bfd_lookup_symbol: Cast const char* arguments to void* Date: Mon, 12 Oct 2015 00:32:07 -0400 Message-Id: <1444624329-4828-4-git-send-email-simon.marchi@polymtl.ca> In-Reply-To: <1444624329-4828-1-git-send-email-simon.marchi@polymtl.ca> References: <1444624329-4828-1-git-send-email-simon.marchi@polymtl.ca> MIME-Version: 1.0 /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 (enable_break): Add cast. * solib-frv.c (enable_break2): Likewise. --- gdb/solib-dsbt.c | 3 ++- gdb/solib-frv.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/solib-dsbt.c b/gdb/solib-dsbt.c index 3218bbe..f108034 100644 --- a/gdb/solib-dsbt.c +++ b/gdb/solib-dsbt.c @@ -876,7 +876,8 @@ enable_break (void) info->interp_plt_sect_low + bfd_section_size (tmp_bfd, interp_sect); } - addr = gdb_bfd_lookup_symbol (tmp_bfd, cmp_name, "_dl_debug_state"); + addr = gdb_bfd_lookup_symbol (tmp_bfd, + cmp_name, (void *) "_dl_debug_state"); if (addr != 0) { if (solib_dsbt_debug) diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c index 922ee36..db68ea5 100644 --- a/gdb/solib-frv.c +++ b/gdb/solib-frv.c @@ -619,7 +619,8 @@ enable_break2 (void) interp_plt_sect_low + bfd_section_size (tmp_bfd, interp_sect); } - addr = gdb_bfd_lookup_symbol (tmp_bfd, cmp_name, "_dl_debug_addr"); + addr = gdb_bfd_lookup_symbol (tmp_bfd, + cmp_name, (void *) "_dl_debug_addr"); if (addr == 0) {