This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [commit/rx sim] Fix a "Cycle count not updated!" abort


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
> 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]