Browse Source

fix the computation of the trace offset

Cédric Augonnet 15 years ago
parent
commit
89890c1716
1 changed files with 2 additions and 1 deletions
  1. 2 1
      tools/fxt-tool.c

+ 2 - 1
tools/fxt-tool.c

@@ -871,7 +871,8 @@ int main(int argc, char **argv)
 		/* Compute the offset */
 		/* Compute the offset */
 		for (inputfile = 0; inputfile < ninputfiles; inputfile++)
 		for (inputfile = 0; inputfile < ninputfiles; inputfile++)
 		{
 		{
-			offsets[inputfile] = (sync_k_exists[inputfile]?start_k[inputfile]:(M-sync_k[inputfile]));
+			offsets[inputfile] = sync_k_exists[inputfile]?
+						(sync_k[inputfile]-M):start_k[inputfile];
 		}
 		}
 
 
 		/* generate the Paje trace for the different files */
 		/* generate the Paje trace for the different files */