From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17757 invoked by alias); 24 Sep 2010 01:39:40 -0000 Received: (qmail 17749 invoked by uid 22791); 24 Sep 2010 01:39:39 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from p12018-ipbffx02marunouchi.tokyo.ocn.ne.jp (HELO mail.pizzafactory.jp) (222.147.75.18) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Sep 2010 01:39:32 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.pizzafactory.jp (Postfix) with ESMTP id 3D28B6189548; Fri, 24 Sep 2010 10:40:13 +0900 (JST) Received: from mail.pizzafactory.jp ([127.0.0.1]) by localhost (ldap.monami-software.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IrUyJwpGRSqM; Fri, 24 Sep 2010 10:40:12 +0900 (JST) Received: from [192.168.0.12] (unknown [192.168.0.12]) by mail.pizzafactory.jp (Postfix) with ESMTP id 9A57E618953D; Fri, 24 Sep 2010 10:40:12 +0900 (JST) Subject: Re: [commit/rx sim] Fix a "Cycle count not updated!" abort Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Masaki Muranaka In-Reply-To: <20100923163939.30023897@mesquite.lan> Date: Fri, 24 Sep 2010 11:25:00 -0000 Cc: gdb-patches@sourceware.org Content-Transfer-Encoding: 7bit Message-Id: <07CF7725-C966-407A-ACBF-FA7EA6618B3F@monami-software.com> References: <20100923163939.30023897@mesquite.lan> To: Kevin Buettner X-IsSubscribed: yes 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: 2010-09/txt/msg00428.txt.bz2 Hello, Kevin. > * rx.c (decode_opcode): Declare `rx' as unsigned. it should be `tx'? On 2010/09/24, at 8:39, Kevin Buettner wrote: > I've commited the patch below. > > In rx.c, the RXO_suntil case contains the following line: > > cycles (3 + 3 * (tx / 4) + 3 * (tx % 4)); > > If tx (which DJ tells me is the transaction count) is -1, that > expression reduces to 0 which ends up meaning that the operation in > question took 0 cycles. This causes a sanity check at the top of the > loop to fail printing the message: > > Cycle count not updated! id RXO_suntil > > The simulator aborts when this happens. > > DJ agrees that negative tx values make no sense, leading to the > patch below. > > With this patch in place, I'm able to run the gdb.base/break.exp > test program to completion. Without it, it aborts in the midst > of executing the print statement. > > I still see a number of failures when running gdb.base/break.exp > though. I'll address those in the next patch. > > Kevin > > sim/rx/ChangeLog: > > * rx.c (decode_opcode): Declare `rx' as unsigned. > > Index: rx.c > =================================================================== > RCS file: /cvs/src/src/sim/rx/rx.c,v > retrieving revision 1.6 > diff -u -p -r1.6 rx.c > --- rx.c 29 Jul 2010 18:41:28 -0000 1.6 > +++ rx.c 23 Sep 2010 23:25:38 -0000 > @@ -878,7 +878,7 @@ decode_opcode () > unsigned long long prev_cycle_count; > #endif > #ifdef CYCLE_ACCURATE > - int tx; > + unsigned int tx; > #endif > > #ifdef CYCLE_STATS > >