From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31335 invoked by alias); 29 Feb 2008 10:11:28 -0000 Received: (qmail 31326 invoked by uid 22791); 29 Feb 2008 10:11:27 -0000 X-Spam-Check-By: sourceware.org Received: from imx12.toshiba.co.jp (HELO imx12.toshiba.co.jp) (61.202.160.132) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 29 Feb 2008 10:10:50 +0000 Received: from arc11.toshiba.co.jp ([133.199.90.127]) by imx12.toshiba.co.jp with ESMTP id m1TAAlw5015641 for ; Fri, 29 Feb 2008 19:10:47 +0900 (JST) Received: (from root@localhost) by arc11.toshiba.co.jp id m1TAAlKj013809 for gdb-patches@sourceware.org; Fri, 29 Feb 2008 19:10:47 +0900 (JST) Received: from ovp11.toshiba.co.jp [133.199.90.148] by arc11.toshiba.co.jp with ESMTP id VAA13806; Fri, 29 Feb 2008 19:10:47 +0900 Received: from mx11.toshiba.co.jp (localhost [127.0.0.1]) by ovp11.toshiba.co.jp with ESMTP id m1TAAldP017680 for ; Fri, 29 Feb 2008 19:10:47 +0900 (JST) Received: from mx.tjsys.co.jp by toshiba.co.jp id m1TAAkWs028776; Fri, 29 Feb 2008 19:10:46 +0900 (JST) Received: from voltage-out.tjsys.co.jp (voltage-out.tjsys.co.jp [157.79.3.51]) by mx.tjsys.co.jp (8.12.11/8.12.11) with ESMTP id m1TAAjRp010502 for ; Fri, 29 Feb 2008 19:10:45 +0900 (JST) Received: from is-com10 ([157.79.3.71]) by voltage-out.tjsys.co.jp (8.13.1/8.13.1) with SMTP id m1TAAePI011208 for ; Fri, 29 Feb 2008 19:10:40 +0900 Received: from MOSTPCMSS20377 ([157.79.30.246]) by ims.tjsys.co.jp (iPlanet Messaging Server 5.2 HotFix 2.10 (built Dec 26 2005)) with ESMTP id <0JWZ00FDUW9Q6S@ims.tjsys.co.jp> for gdb-patches@sourceware.org; Fri, 29 Feb 2008 19:10:38 +0900 (JST) Date: Fri, 29 Feb 2008 13:48:00 -0000 From: Hidetaka Takano Subject: problem with "info spu signal" command on spu-gdb To: gdb-patches@sourceware.org Message-id: <004b01c87abb$54f75ef0$e11e4f9d@MOSTPCMSS20377> MIME-version: 1.0 X-Mailer: Microsoft Office Outlook 11 Content-type: multipart/mixed; boundary="----=_NextPart_000_004C_01C87B06.C4DF06F0" X-WAuditID: 0802291910380000006644 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: 2008-02/txt/msg00494.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_004C_01C87B06.C4DF06F0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-length: 842 Hello GDB maintainer, I am working on Linux running on Cell/B.E. system. I found a bugs in spu-gdb command "info spu signal". Would you fix this bug? I made a patch for it and I've attached it. Details are as follows: The "info spu signal" command displays wrong type. It almost always returns "Override". Especially, by collaborating Cell IDE Eclipse, the value is quite strange. This problem is caused by what the GDB's internal function "strtoulst()" expects the entry of SPUFS should have the LF code (0x0a) and null (0x00) in its end. The only signal_type doesn't have it. (event_status and event_mask are OK) In order to fix this problem, of course, it is possible to modify the SPUFS. Tentatively I would like GDB to work around it. I will also post this problem report to SPUFS maintainer. Best regard. --- Hidetaka Takano ------=_NextPart_000_004C_01C87B06.C4DF06F0 Content-Type: application/octet-stream; name="fix-info-spu-signal.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="fix-info-spu-signal.diff" Content-length: 2133 diff -urpN src-org/gdb/spu-tdep.c src/gdb/spu-tdep.c=0A= --- src-org/gdb/spu-tdep.c 2008-01-11 22:20:02.000000000 +0900=0A= +++ src/gdb/spu-tdep.c 2008-02-15 10:24:20.000000000 +0900=0A= @@ -1505,16 +1505,18 @@ info_spu_event_command (char *args, int=20=0A= =20=0A= xsnprintf (annex, sizeof annex, "%d/event_status", id);=0A= len =3D target_read (¤t_target, TARGET_OBJECT_SPU, annex,=0A= - buf, 0, sizeof buf);=0A= + buf, 0, (sizeof (buf) - 1));=0A= if (len <=3D 0)=0A= error (_("Could not read event_status."));=0A= + buf[len] =3D '\0';=0A= event_status =3D strtoulst (buf, NULL, 16);=0A= =20=20=0A= xsnprintf (annex, sizeof annex, "%d/event_mask", id);=0A= len =3D target_read (¤t_target, TARGET_OBJECT_SPU, annex,=0A= - buf, 0, sizeof buf);=0A= + buf, 0, (sizeof (buf) - 1));=0A= if (len <=3D 0)=0A= error (_("Could not read event_mask."));=0A= + buf[len] =3D '\0';=0A= event_mask =3D strtoulst (buf, NULL, 16);=0A= =20=20=0A= chain =3D make_cleanup_ui_out_tuple_begin_end (uiout, "SPUInfoEvent");= =0A= @@ -1565,9 +1567,10 @@ info_spu_signal_command (char *args, int=0A= =20=20=20=20=20=0A= xsnprintf (annex, sizeof annex, "%d/signal1_type", id);=0A= len =3D target_read (¤t_target, TARGET_OBJECT_SPU, annex,=0A= - buf, 0, sizeof buf);=0A= + buf, 0, (sizeof (buf) - 1));=0A= if (len <=3D 0)=0A= error (_("Could not read signal1_type."));=0A= + buf[len] =3D '\0';=0A= signal1_type =3D strtoulst (buf, NULL, 16);=0A= =20=0A= xsnprintf (annex, sizeof annex, "%d/signal2", id);=0A= @@ -1582,9 +1585,10 @@ info_spu_signal_command (char *args, int=0A= =20=20=20=20=20=0A= xsnprintf (annex, sizeof annex, "%d/signal2_type", id);=0A= len =3D target_read (¤t_target, TARGET_OBJECT_SPU, annex,=0A= - buf, 0, sizeof buf);=0A= + buf, 0, (sizeof (buf) - 1));=0A= if (len <=3D 0)=0A= error (_("Could not read signal2_type."));=0A= + buf[len] =3D '\0';=0A= signal2_type =3D strtoulst (buf, NULL, 16);=0A= =20=0A= chain =3D make_cleanup_ui_out_tuple_begin_end (uiout, "SPUInfoSignal");= =0A= ------=_NextPart_000_004C_01C87B06.C4DF06F0--