From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24625 invoked by alias); 17 Sep 2013 03:24:33 -0000 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 Received: (qmail 24611 invoked by uid 89); 17 Sep 2013 03:24:33 -0000 Received: from usmamail.tilera.com (HELO USMAMAIL.TILERA.COM) (12.216.194.151) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 17 Sep 2013 03:24:33 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,HELO_MISC_IP,KHOP_THREADED,RCVD_VIA_APNIC autolearn=ham version=3.3.2 X-HELO: USMAMAIL.TILERA.COM Received: from [10.200.0.56] (124.207.145.166) by USMAExch2.tad.internal.tilera.com (10.3.0.33) with Microsoft SMTP Server (TLS) id 14.0.722.0; Mon, 16 Sep 2013 23:24:29 -0400 Message-ID: <5237CB65.4000703@tilera.com> Date: Tue, 17 Sep 2013 03:24:00 -0000 From: Jiong Wang User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Subject: [RFC/TileGX 2/2] fix gdbserver runtime crash References: <50F9148F.3010602@tilera.com> <5237C847.3040908@tilera.com> In-Reply-To: <5237C847.3040908@tilera.com> Content-Type: multipart/mixed; boundary="------------010606070005000009020000" X-SW-Source: 2013-09/txt/msg00483.txt.bz2 --------------010606070005000009020000 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 360 TileGX is always 64bit, ptrace always return 64bit data, tilegx32 is just an ABI. So the regset size should be regnum * 8 instead of regnum * 4. The latter cause gdbserver crash. gdbserver/ChangeLog: * linux-tile-low.c (tile_regsets): Modify the size field as 64bit for each register. please review. thanks. --- Regards, Jiong Tilera Corporation. --------------010606070005000009020000 Content-Type: text/x-patch; name="gdb-02.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gdb-02.patch" Content-length: 531 diff --git a/gdb/gdbserver/linux-tile-low.c b/gdb/gdbserver/linux-tile-low.c index 8963b9a..8efb34e 100644 --- a/gdb/gdbserver/linux-tile-low.c +++ b/gdb/gdbserver/linux-tile-low.c @@ -124,7 +124,7 @@ tile_store_gregset (struct regcache *regcache, const void *buf) static struct regset_info tile_regsets[] = { - { PTRACE_GETREGS, PTRACE_SETREGS, 0, tile_num_regs * 4, + { PTRACE_GETREGS, PTRACE_SETREGS, 0, tile_num_regs * 8, GENERAL_REGS, tile_fill_gregset, tile_store_gregset }, { 0, 0, 0, -1, -1, NULL, NULL } }; --------------010606070005000009020000--