From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16783 invoked by alias); 24 Apr 2002 12:04:05 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16763 invoked from network); 24 Apr 2002 12:03:59 -0000 Received: from unknown (HELO kerberos.suse.cz) (195.47.106.10) by sources.redhat.com with SMTP; 24 Apr 2002 12:03:59 -0000 Received: from chimera.suse.cz (chimera.suse.cz [10.20.0.2]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id 066B459D354; Wed, 24 Apr 2002 14:03:59 +0200 (CEST) Received: from suse.cz (leviathan.suse.cz [10.20.1.56]) by chimera.suse.cz (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id g3OC3wf25779; Wed, 24 Apr 2002 14:03:58 +0200 X-Authentication-Warning: chimera.suse.cz: Host leviathan.suse.cz [10.20.1.56] claimed to be suse.cz Message-ID: <3CC69F25.3040704@suse.cz> Date: Wed, 24 Apr 2002 05:04:00 -0000 From: Michal Ludvig Organization: SuSE CR User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020417 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Cc: Daniel Jacobowitz Subject: [RFA] gdbserver warnings Content-Type: multipart/mixed; boundary="------------080209060707030707020600" X-SW-Source: 2002-04/txt/msg00927.txt.bz2 This is a multi-part message in MIME format. --------------080209060707030707020600 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Content-length: 880 Hi, Now only two simple issues things in gdbserver to compile cleanly. First patch prevents: linux-low.c: In function `regsets_store_inferior_registers': linux-low.c:424: warning: cast from pointer to integer of different size on x86-64 where sizeof(void*) != sizeof(int). Why did you cast the last argument from pointer to integer? Manpage says it should be a void*... But I didn't test it on other archs... The second one prevents: regcache.h:26: warning: `struct inferior_info' declared inside parameter list 2002-04-24 Michal Ludvig * gdbserver/linux-low.c (regsets_fetch_inferior_registers), (regsets_store_inferior_registers): Removed cast to int from ptrace() calls. * gdbserver/regcache.h: Include server.h. Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * +420 2 9654 5373 * http://www.suse.cz --------------080209060707030707020600 Content-Type: text/plain; name="gdbserver1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gdbserver1.diff" Content-length: 1695 Index: linux-low.c =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/linux-low.c,v retrieving revision 1.15 diff -c -3 -p -r1.15 linux-low.c *** linux-low.c 20 Apr 2002 17:04:09 -0000 1.15 --- linux-low.c 24 Apr 2002 11:53:52 -0000 *************** regsets_fetch_inferior_registers (void) *** 372,378 **** } buf = malloc (regset->size); ! res = ptrace (regset->get_request, inferior_pid, 0, (int) buf); if (res < 0) { if (errno == EIO) --- 372,378 ---- } buf = malloc (regset->size); ! res = ptrace (regset->get_request, inferior_pid, 0, buf); if (res < 0) { if (errno == EIO) *************** regsets_store_inferior_registers (void) *** 421,427 **** buf = malloc (regset->size); regset->fill_function (buf); ! res = ptrace (regset->set_request, inferior_pid, 0, (int) buf); if (res < 0) { if (errno == EIO) --- 421,427 ---- buf = malloc (regset->size); regset->fill_function (buf); ! res = ptrace (regset->set_request, inferior_pid, 0, buf); if (res < 0) { if (errno == EIO) Index: regcache.h =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/regcache.h,v retrieving revision 1.3 diff -c -3 -p -r1.3 regcache.h *** regcache.h 20 Apr 2002 17:22:48 -0000 1.3 --- regcache.h 24 Apr 2002 11:53:52 -0000 *************** *** 21,26 **** --- 21,28 ---- #ifndef REGCACHE_H #define REGCACHE_H + #include + /* Create a new register cache for INFERIOR. */ void create_register_cache (struct inferior_info *inferior); --------------080209060707030707020600--