From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4109 invoked by alias); 2 Nov 2005 14:52:46 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 4084 invoked by uid 22791); 2 Nov 2005 14:52:42 -0000 Received: from fra-del-02.spheriq.net (HELO fra-del-02.spheriq.net) (195.46.51.98) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 02 Nov 2005 14:52:42 +0000 Received: from fra-out-01.spheriq.net (fra-out-01.spheriq.net [195.46.51.129]) by fra-del-02.spheriq.net with ESMTP id jA2EqbBK007941 for ; Wed, 2 Nov 2005 14:52:37 GMT Received: from fra-cus-02.spheriq.net (fra-cus-02.spheriq.net [195.46.51.38]) by fra-out-01.spheriq.net with ESMTP id jA2EqaCe005670 for ; Wed, 2 Nov 2005 14:52:36 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by fra-cus-02.spheriq.net with ESMTP id jA2EqYac000631 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Wed, 2 Nov 2005 14:52:35 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 54FE9DA43 for ; Wed, 2 Nov 2005 14:52:34 +0000 (GMT) Received: by zeta.dmz-eu.st.com (STMicroelectronics, from userid 60012) id B6730474A6; Wed, 2 Nov 2005 14:55:26 +0000 (GMT) Received: from zeta.dmz-eu.st.com (localhost [127.0.0.1]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4DBC175969 for ; Wed, 2 Nov 2005 14:55:26 +0000 (UTC) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 45CD847371 for ; Wed, 2 Nov 2005 14:55:25 +0000 (GMT) Received: from [164.129.15.13] (terrorhawk.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.5.8-GR) with ESMTP id CFL00862 (AUTH "andrew stubbs"); Wed, 2 Nov 2005 14:52:31 GMT Message-ID: <4368D237.8040704@st.com> Date: Wed, 02 Nov 2005 15:25:00 -0000 From: Andrew STUBBS User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: PATCH: Build sh-elf with -Werror Content-Type: multipart/mixed; boundary="------------060204070809050702020601" X-O-Spoofed: Not Scanned X-O-General-Status: No X-O-Spam1-Status: Not Scanned X-O-Spam2-Status: Not Scanned X-O-URL-Status: Not Scanned X-O-Virus1-Status: No X-O-Virus2-Status: Not Scanned X-O-Virus3-Status: No X-O-Virus4-Status: No X-O-Virus5-Status: Not Scanned X-O-Image-Status: Not Scanned X-O-Attach-Status: Not Scanned X-SpheriQ-Ver: 4.1.07 X-SW-Source: 2005-11/txt/msg00037.txt.bz2 This is a multi-part message in MIME format. --------------060204070809050702020601 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 535 Hi all, Following my recent mistake with the -batch-silent patch I thought I had better check I hadn't missed anything else due to my forgetting '--enable-gdb-build-warnings=,-Werror'. I found that I had not, but that the sh-elf debugger wouldn't build due to pre-existing problems. I guess nobody is interested in sh-elf or everybody forgets Werror. The attached patch fixes the problems. Note that monitor.c actually did build because it is never built with Werror, but not all the warnings were unavoidable. Andrew Stubbs --------------060204070809050702020601 Content-Type: text/plain; name="remove_warnings.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="remove_warnings.patch" Content-length: 7120 2005-11-02 Andrew Stubbs * monitor.c (monitor_xfer_memory): Change char to gdb_byte. (monitor_insert_breakpoint): Likewise. (monitor_remove_breakpoint): Likewise. * remote-e7000.c (e7000_xfer_inferior_memory): Likewise. * sh-tdep.c (sh_return_value_nofpu): Change void to gdb_byte. (sh_return_value_fpu): Likewise. (sh_pseudo_register_read): Likewise. (sh_pseudo_register_write): Likewise. (sh_frame_prev_register): Likewise. * sh64-tdep.c (sh64_extract_return_value): Change char to gdb_byte. (sh64_return_value): Change void to gdb_byte. (sh64_pseudo_register_read): Likewise. (sh64_pseudo_register_write): Likewise. (sh64_frame_prev_register): Likewise. Index: src/gdb/monitor.c =================================================================== --- src.orig/gdb/monitor.c 2005-02-18 18:58:56.000000000 +0000 +++ src/gdb/monitor.c 2005-11-02 14:09:31.000000000 +0000 @@ -80,13 +80,13 @@ static ptid_t monitor_wait (ptid_t ptid, static void monitor_fetch_registers (int regno); static void monitor_store_registers (int regno); static void monitor_prepare_to_store (void); -static int monitor_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, +static int monitor_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write, struct mem_attrib *attrib, struct target_ops *target); static void monitor_files_info (struct target_ops *ops); -static int monitor_insert_breakpoint (CORE_ADDR addr, char *shadow); -static int monitor_remove_breakpoint (CORE_ADDR addr, char *shadow); +static int monitor_insert_breakpoint (CORE_ADDR addr, gdb_byte *shadow); +static int monitor_remove_breakpoint (CORE_ADDR addr, gdb_byte *shadow); static void monitor_kill (void); static void monitor_load (char *file, int from_tty); static void monitor_mourn_inferior (void); @@ -1982,7 +1982,7 @@ monitor_read_memory (CORE_ADDR memaddr, unused. */ static int -monitor_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, +monitor_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write, struct mem_attrib *attrib, struct target_ops *target) { int res; @@ -2038,7 +2038,7 @@ monitor_mourn_inferior (void) /* Tell the monitor to add a breakpoint. */ static int -monitor_insert_breakpoint (CORE_ADDR addr, char *shadow) +monitor_insert_breakpoint (CORE_ADDR addr, gdb_byte *shadow) { int i; const unsigned char *bp; @@ -2072,7 +2072,7 @@ monitor_insert_breakpoint (CORE_ADDR add /* Tell the monitor to remove a breakpoint. */ static int -monitor_remove_breakpoint (CORE_ADDR addr, char *shadow) +monitor_remove_breakpoint (CORE_ADDR addr, gdb_byte *shadow) { int i; Index: src/gdb/remote-e7000.c =================================================================== --- src.orig/gdb/remote-e7000.c 2005-05-01 20:58:54.000000000 +0100 +++ src/gdb/remote-e7000.c 2005-11-02 14:10:25.000000000 +0000 @@ -1478,7 +1478,7 @@ fast_but_for_the_pause_e7000_read_inferi Returns the number of bytes transferred. */ static int -e7000_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len, +e7000_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write, struct mem_attrib *attrib, struct target_ops *target) { Index: src/gdb/sh-tdep.c =================================================================== --- src.orig/gdb/sh-tdep.c 2005-11-02 13:36:09.000000000 +0000 +++ src/gdb/sh-tdep.c 2005-11-02 13:56:23.000000000 +0000 @@ -1286,7 +1286,7 @@ sh_store_return_value_fpu (struct type * static enum return_value_convention sh_return_value_nofpu (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, - void *readbuf, const void *writebuf) + gdb_byte *readbuf, const gdb_byte *writebuf) { if (sh_use_struct_convention (0, type)) return RETURN_VALUE_STRUCT_CONVENTION; @@ -1300,7 +1300,7 @@ sh_return_value_nofpu (struct gdbarch *g static enum return_value_convention sh_return_value_fpu (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, - void *readbuf, const void *writebuf) + gdb_byte *readbuf, const gdb_byte *writebuf) { if (sh_use_struct_convention (0, type)) return RETURN_VALUE_STRUCT_CONVENTION; @@ -1936,7 +1936,7 @@ dr_reg_base_num (int dr_regnum) static void sh_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, - int reg_nr, void *buffer) + int reg_nr, gdb_byte *buffer) { int base_regnum, portion; char temp_buffer[MAX_REGISTER_SIZE]; @@ -1975,7 +1975,7 @@ sh_pseudo_register_read (struct gdbarch static void sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, - int reg_nr, const void *buffer) + int reg_nr, const gdb_byte *buffer) { int base_regnum, portion; char temp_buffer[MAX_REGISTER_SIZE]; @@ -2328,7 +2328,7 @@ static void sh_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) + int *realnump, gdb_byte *valuep) { struct sh_frame_cache *cache = sh_frame_cache (next_frame, this_cache); Index: src/gdb/sh64-tdep.c =================================================================== --- src.orig/gdb/sh64-tdep.c 2005-05-02 16:23:37.000000000 +0100 +++ src/gdb/sh64-tdep.c 2005-11-02 14:02:11.000000000 +0000 @@ -1228,9 +1228,9 @@ sh64_extract_return_value (struct type * { /* return value stored in DR0_REGNUM */ DOUBLEST val; - char buf[8]; + gdb_byte buf[8]; - regcache_cooked_read (regcache, DR0_REGNUM, &buf); + regcache_cooked_read (regcache, DR0_REGNUM, buf); if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE) floatformat_to_doublest (&floatformat_ieee_double_littlebyte_bigword, @@ -1313,7 +1313,7 @@ sh64_store_return_value (struct type *ty static enum return_value_convention sh64_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, - void *readbuf, const void *writebuf) + gdb_byte *readbuf, const gdb_byte *writebuf) { if (sh64_use_struct_convention (type)) return RETURN_VALUE_STRUCT_CONVENTION; @@ -1575,7 +1575,7 @@ sh64_register_convert_to_raw (struct typ static void sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, - int reg_nr, void *buffer) + int reg_nr, gdb_byte *buffer) { int base_regnum; int portion; @@ -1744,7 +1744,7 @@ sh64_pseudo_register_read (struct gdbarc static void sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, - int reg_nr, const void *buffer) + int reg_nr, const gdb_byte *buffer) { int base_regnum, portion; int offset; @@ -2290,7 +2290,7 @@ static void sh64_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) + int *realnump, gdb_byte *valuep) { struct sh64_frame_cache *cache = sh64_frame_cache (next_frame, this_cache); --------------060204070809050702020601--