From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24097 invoked by alias); 17 Sep 2013 13:22:39 -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 24086 invoked by uid 89); 17 Sep 2013 13:22:39 -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 13:22:39 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.3 required=5.0 tests=BAYES_00,GARBLED_BODY,HELO_MISC_IP,KHOP_THREADED autolearn=no version=3.3.2 X-HELO: USMAMAIL.TILERA.COM Received: from [192.168.0.102] (124.193.190.225) by USMAExch2.tad.internal.tilera.com (10.3.0.33) with Microsoft SMTP Server (TLS) id 14.0.722.0; Tue, 17 Sep 2013 09:22:34 -0400 Message-ID: <52385794.1060307@tilera.com> Date: Tue, 17 Sep 2013 13:22: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: Joel Brobecker CC: Subject: Re: [RFC/TileGX 2/2] fix gdbserver runtime crash References: <50F9148F.3010602@tilera.com> <5237C847.3040908@tilera.com> <5237CB65.4000703@tilera.com> <20130917123304.GE3132@adacore.com> <52384D8E.4010009@tilera.com> In-Reply-To: <52384D8E.4010009@tilera.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-09/txt/msg00503.txt.bz2 于 2013/9/17 20:39, Jiong Wang 写道: > 于 2013/9/17 20:33, Joel Brobecker 写道: >>> 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. >> I will trust you on this one, but how did this even work at all >> prior to your change??? > > it's a complicated story and my fault. > > we use Perforce to manage code within the company. This bug is fixed > by Jeff (previous maintainer of TileGX gdb) long time ago in Perforce, > but he > didn't commit it to community. And we mainly test binaries generated > from our Perforce. > > I should be more careful when I check dejagnu test result when submit > to community :) is this OK to commit? > > > >> >>> 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 } >>> }; >> >