From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105989 invoked by alias); 12 Oct 2015 10:16:41 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 105978 invoked by uid 89); 12 Oct 2015 10:16:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f54.google.com Received: from mail-pa0-f54.google.com (HELO mail-pa0-f54.google.com) (209.85.220.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 12 Oct 2015 10:16:34 +0000 Received: by padhy16 with SMTP id hy16so150552111pad.1 for ; Mon, 12 Oct 2015 03:16:33 -0700 (PDT) X-Received: by 10.66.141.70 with SMTP id rm6mr33454028pab.20.1444644993267; Mon, 12 Oct 2015 03:16:33 -0700 (PDT) Received: from E107787-LIN (power-aix.osuosl.org. [140.211.15.154]) by smtp.gmail.com with ESMTPSA id dd4sm17435532pbb.52.2015.10.12.03.16.31 (version=TLS1_2 cipher=AES128-SHA256 bits=128/128); Mon, 12 Oct 2015 03:16:32 -0700 (PDT) From: Yao Qi To: Simon Marchi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH c++ 4/6] gdb_bfd_lookup_symbol: Cast const char* arguments to void* References: <1444624329-4828-1-git-send-email-simon.marchi@polymtl.ca> <1444624329-4828-4-git-send-email-simon.marchi@polymtl.ca> Date: Mon, 12 Oct 2015 10:16:00 -0000 In-Reply-To: <1444624329-4828-4-git-send-email-simon.marchi@polymtl.ca> (Simon Marchi's message of "Mon, 12 Oct 2015 00:32:07 -0400") Message-ID: <86mvvo5r44.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00145.txt.bz2 Simon Marchi writes: > /home/pedro/gdb/mygit/src/gdb/solib-frv.c: In function =E2=80=98int enabl= e_break2()=E2=80=99: > /home/pedro/gdb/mygit/src/gdb/solib-frv.c:622:72: error: invalid conversi= on from =E2=80=98const void*=E2=80=99 to =E2=80=98void*=E2=80=99 [-fpermiss= ive] > addr =3D 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 argume= nt 3 of =E2=80=98CORE_ADDR gdb_bfd_lookup_symbol(bfd*, int (*)(asymbol*, vo= id*), void*)=E2=80=99 [-fpermissive] > extern CORE_ADDR gdb_bfd_lookup_symbol (bfd *abfd, > ^ > > The call in question is: > > addr =3D 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) --=20 Yao (=E9=BD=90=E5=B0=A7)