Skip to content

Commit 606fe97

Browse files
committed
Fix timestamp writing
1 parent cf74914 commit 606fe97

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tools/gnatcov/ada-rts/gnatcov_rts-traces-output.adb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,16 @@ package body GNATcov_RTS.Traces.Output is
310310

311311
declare
312312
Timestamp : Interfaces.Unsigned_64 := Exec_Date;
313-
Bytes : Uint8_Array := (1 => 0);
313+
Bytes : Uint8_Array (1 .. 8);
314+
Bytes_Str : String (1 .. 8);
315+
for Bytes_Str'Address use Bytes'Address;
316+
pragma Import (Ada, Bytes_Str);
314317
begin
315318
for I in 1 .. 8 loop
316-
Bytes (1) := Interfaces.Unsigned_8 (Timestamp mod 8);
319+
Bytes (I) := Interfaces.Unsigned_8 (Timestamp mod 8);
317320
Timestamp := Shift_Right (Timestamp, 8);
318-
Write_Bytes (Output, Bytes);
319321
end loop;
322+
Write_Info (Output, Info_Exec_Date, Bytes_Str);
320323
end;
321324

322325
Write_Info (Output, Info_User_Data, User_Data);

0 commit comments

Comments
 (0)