From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27343 invoked by alias); 28 Nov 2006 16:41:43 -0000 Received: (qmail 27332 invoked by uid 22791); 28 Nov 2006 16:41:42 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 28 Nov 2006 16:41:32 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id kASGfUZ2009234 for ; Tue, 28 Nov 2006 11:41:30 -0500 Received: from pobox.surrey.redhat.com (pobox.surrey.redhat.com [172.16.10.17]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id kASGfSPG024110; Tue, 28 Nov 2006 11:41:29 -0500 Received: from localhost.localdomain.redhat.com (vpn-68-1.surrey.redhat.com [10.32.68.1]) by pobox.surrey.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id kASGfQnm004260; Tue, 28 Nov 2006 16:41:27 GMT To: gdb-patches@sourceware.org CC: kevinb@redhat.com Subject: RFA: Fix compile time warnings building iq2000-tdep.c From: Nick Clifton Date: Tue, 28 Nov 2006 16:41:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 X-SW-Source: 2006-11/txt/msg00317.txt.bz2 Hi Guys, The iq2000 port of GDB currently fails to build on the 6.6 branch and mainline because of compile time warnings triggered in iq2000-tdep.c, (which are now being treated as errors). The patch below fixes them by changing various void* variables into gdb_byte*. May I apply the patch please ? Cheers Nick Clifton gdb/ChangeLog 2006-11-28 Nick Clifton * iq2000-tdep.c: Fix compile time warnings: (iq2000_pointer_to_address): Change type of buf parameter to gdb_byte*. (iq2000_address_to_pointer): Likewise. (iq2000_frame_prev_register): Likewise. (iq2000_extract_return_value): Change type of return_buffer to gdb_byte. (iq2000_return_value): Change type of readbuf and writebuf to gdb_byte. Index: gdb/iq2000-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/iq2000-tdep.c,v retrieving revision 1.2 diff -c -3 -p -r1.2 iq2000-tdep.c *** gdb/iq2000-tdep.c 17 Dec 2005 22:34:01 -0000 1.2 --- gdb/iq2000-tdep.c 28 Nov 2006 16:08:04 -0000 *************** insn_addr_from_ptr (CORE_ADDR ptr) /* ta *** 88,94 **** Convert a target pointer to an address in host (CORE_ADDR) format. */ static CORE_ADDR ! iq2000_pointer_to_address (struct type * type, const void * buf) { enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type)); CORE_ADDR addr = extract_unsigned_integer (buf, TYPE_LENGTH (type)); --- 88,94 ---- Convert a target pointer to an address in host (CORE_ADDR) format. */ static CORE_ADDR ! iq2000_pointer_to_address (struct type * type, const gdb_byte * buf) { enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type)); CORE_ADDR addr = extract_unsigned_integer (buf, TYPE_LENGTH (type)); *************** iq2000_pointer_to_address (struct type * *** 105,111 **** Convert a host-format address (CORE_ADDR) into a target pointer. */ static void ! iq2000_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr) { enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type)); --- 105,111 ---- Convert a host-format address (CORE_ADDR) into a target pointer. */ static void ! iq2000_address_to_pointer (struct type *type, gdb_byte *buf, CORE_ADDR addr) { enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type)); *************** static void *** 395,401 **** iq2000_frame_prev_register (struct frame_info *next_frame, void **this_cache, int regnum, int *optimizedp, enum lval_type *lvalp, CORE_ADDR *addrp, ! int *realnump, void *valuep) { struct iq2000_frame_cache *cache = iq2000_frame_cache (next_frame, this_cache); if (regnum == E_SP_REGNUM && cache->saved_sp) --- 395,401 ---- iq2000_frame_prev_register (struct frame_info *next_frame, void **this_cache, int regnum, int *optimizedp, enum lval_type *lvalp, CORE_ADDR *addrp, ! int *realnump, gdb_byte *valuep) { struct iq2000_frame_cache *cache = iq2000_frame_cache (next_frame, this_cache); if (regnum == E_SP_REGNUM && cache->saved_sp) *************** iq2000_extract_return_value (struct type *** 558,564 **** returned in a register, and if larger than 8 bytes, it is returned in a stack location which is pointed to by the same register. */ ! CORE_ADDR return_buffer; int len = TYPE_LENGTH (type); if (len <= (2 * 4)) --- 558,564 ---- returned in a register, and if larger than 8 bytes, it is returned in a stack location which is pointed to by the same register. */ ! gdb_byte return_buffer; int len = TYPE_LENGTH (type); if (len <= (2 * 4)) *************** iq2000_extract_return_value (struct type *** 592,598 **** static enum return_value_convention iq2000_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, ! void *readbuf, const void *writebuf) { if (iq2000_use_struct_convention (type)) return RETURN_VALUE_STRUCT_CONVENTION; --- 592,598 ---- static enum return_value_convention iq2000_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, ! gdb_byte *readbuf, const gdb_byte *writebuf) { if (iq2000_use_struct_convention (type)) return RETURN_VALUE_STRUCT_CONVENTION;