From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22560 invoked by alias); 28 Jul 2003 06:45:25 -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 22548 invoked from network); 28 Jul 2003 06:45:22 -0000 Received: from unknown (HELO mail02.idc.renesas.com) (202.234.163.13) by sources.redhat.com with SMTP; 28 Jul 2003 06:45:22 -0000 Received: from mail02.idc.renesas.com ([127.0.0.1]) by mail02.idc.renesas.com with ESMTP id h6S6jK1Q001092 for ; Mon, 28 Jul 2003 15:45:20 +0900 (JST) Received: from guardian01.idc.renesas.com ([172.20.8.132]) by mail02.idc.renesas.com with ESMTP id h6S6jJUO001089; Mon, 28 Jul 2003 15:45:19 +0900 (JST) Received: (from root@localhost) by guardian01.idc.renesas.com with id h6S6jJR5025606; Mon, 28 Jul 2003 15:45:19 +0900 (JST) Received: from unknown [172.20.8.68] by guardian01.idc.renesas.com with SMTP id RAA25605 ; Mon, 28 Jul 2003 15:45:19 +0900 Received: from mta01.idc.renesas.com (localhost [127.0.0.1]) by mta01.idc.renesas.com with ESMTP id h6S6jH4G015999; Mon, 28 Jul 2003 15:45:18 +0900 (JST) Received: from rnsmtp01.hoku_r.renesas.com ([10.145.246.51]) by mta01.idc.renesas.com with ESMTP id h6S6jHZV015996; Mon, 28 Jul 2003 15:45:17 +0900 (JST) Received: from mrkaisv.hoku.renesas.com ([10.145.105.245]) by rnsmtp01.hoku_r.renesas.com (8.9.3/3.7W) with ESMTP id PAA11386; Mon, 28 Jul 2003 15:45:17 +0900 (JST) Received: from KEI (unknown [10.145.105.81]) by mrkaisv.hoku.renesas.com (Postfix) with SMTP id BE8CF798AD2; Mon, 28 Jul 2003 15:45:16 +0900 (JST) Message-ID: <013d01c354d4$2c955550$5169910a@KEI> From: "Kei Sakamoto" To: "Andrew Cagney" Cc: References: <007701c341d0$5d44aa50$5169910a@KEI> <02ec01c3477c$8ddf3c00$5169910a@KEI> <3F1C35C6.4010603@redhat.com> <01fc01c3500e$7800d2f0$5169910a@KEI> <3F23FCC9.9040908@redhat.com> Subject: Re: [PATCH] revised m32r target Date: Mon, 28 Jul 2003 06:45:00 -0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_013A_01C3551F.9C3CC000" X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-SW-Source: 2003-07/txt/msg00489.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_013A_01C3551F.9C3CC000 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit Content-length: 1940 > Can you try configuring/building with: > > --enable-gdb-build-warnings=,-Werror > > (all targets should configure/build with that) I'm seeing the warnings: > > m32r-tdep.c: In function `m32r_store_return_value': > m32r-tdep.c:289: warning: pointer of type `void *' used in arithmetic > m32r-rom.c: In function `m32r_upload_command': > m32r-rom.c:466: warning: `hostent' might be used uninitialized in this > function > > Can you please try to reproduce / fix this. I fixed them and attached a patch file. 2003-07-28 Kei Sakamoto * m32r-rom.c (m32r_upload_command): Use hostent only when gethostname succeeds, in order to avoid a compilation warning. * m32r-tdep.c (m32r_store_return_value): Add a cast to remove a compiler warning. > BTW, for the ChangeLog I checked in: > > 2003-07-27 Andrew Cagney > > Patch from 2003-07-22 Kei Sakamoto : > * m32r-tdep.c (m32r_memory_insert_breakpoint): Fix code style - > operator at start and not end of line. > (decode_prologue): Ditto. > (m32r_frame_unwind_cache, m32r_unwind_sp, m32r_unwind_pc): Use > frame_unwind_register_unsigned instead of > frame_unwind_unsigned_register. > (m32r_read_pc): Use regcache_cooked_read_unsigned instead of > read_register. > (m32r_push_dummy_call): Use register_size instead of > REGISTER_RAW_SIZE. > (m32r_frame_sniffer): Replace m32r_frame_p. > (m32r_gdbarch_init): Call frame_unwind_append_sniffer. > * m32r-rom.c (report_transfer_performance): Delete extern > declaration. > (m32r_load, m32r_upload_command): Use print_transfer_performance > instead of report_transfer_performance. > (_initialize_m32r_rom): Use add_setshow_cmd instead of add_set_cmd > / add_show_from_set. > > > as it better states what was changed. Thank you. This is much better than mine. === Kei Sakamoto Renesas Technology Corp. sakamoto.kei@renesas.com ------=_NextPart_000_013A_01C3551F.9C3CC000 Content-Type: application/octet-stream; name="diffs" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="diffs" Content-length: 1482 diff -Naur src.orig/gdb/m32r-rom.c src/gdb/m32r-rom.c=0A= --- src.orig/gdb/m32r-rom.c Mon Jul 28 00:38:16 2003=0A= +++ src/gdb/m32r-rom.c Mon Jul 28 15:04:54 2003=0A= @@ -492,16 +492,18 @@=0A= buf[0] =3D 0;=0A= gethostname (buf, sizeof (buf));=0A= if (buf[0] !=3D 0)=0A= - hostent =3D gethostbyname (buf);=0A= - if (hostent !=3D 0)=0A= {=0A= + hostent =3D gethostbyname (buf);=0A= + if (hostent !=3D 0)=0A= + {=0A= #if 1=0A= - memcpy (&inet_addr.s_addr, hostent->h_addr,=0A= - sizeof (inet_addr.s_addr));=0A= - server_addr =3D (char *) inet_ntoa (inet_addr);=0A= + memcpy (&inet_addr.s_addr, hostent->h_addr,=0A= + sizeof (inet_addr.s_addr));=0A= + server_addr =3D (char *) inet_ntoa (inet_addr);=0A= #else=0A= - server_addr =3D (char *) inet_ntoa (hostent->h_addr);=0A= + server_addr =3D (char *) inet_ntoa (hostent->h_addr);=0A= #endif=0A= + }=0A= }=0A= if (server_addr =3D=3D 0) /* failed? */=0A= error=0A= diff -Naur src.orig/gdb/m32r-tdep.c src/gdb/m32r-tdep.c=0A= --- src.orig/gdb/m32r-tdep.c Mon Jul 28 00:38:16 2003=0A= +++ src/gdb/m32r-tdep.c Mon Jul 28 15:05:26 2003=0A= @@ -286,7 +286,7 @@=0A= =20=0A= if (len > 4)=0A= {=0A= - regval =3D extract_unsigned_integer (valbuf + 4, len - 4);=0A= + regval =3D extract_unsigned_integer ((char *) valbuf + 4, len - 4);= =0A= regcache_cooked_write_unsigned (regcache, RET1_REGNUM + 1, regval);= =0A= }=0A= }=0A= ------=_NextPart_000_013A_01C3551F.9C3CC000--