Skip to content

Commit 381d1cb

Browse files
committed
Merge branch 'eyraud/gnaamp' into 'master'
Fix timestamp writing See merge request eng/das/cov/gnatcoverage!838 For eng/das/cov/gnatcoverage#256
2 parents 5554c57 + eec351e commit 381d1cb

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,20 @@ package body GNATcov_RTS.Traces.Output is
305305
begin
306306
Write_Header (Output);
307307
Write_Info (Output, Info_Program_Name, Program_Name);
308-
Write_Info (Output, Info_Exec_Date, String'(1 .. 8 => 'A'));
308+
309+
-- Write the exec date
310+
311+
declare
312+
Timestamp : Interfaces.Unsigned_64 := Exec_Date;
313+
Bytes : Uint8_Array := (1 => 0);
314+
begin
315+
for I in 1 .. 8 loop
316+
Bytes (1) := Interfaces.Unsigned_8 (Timestamp mod 8);
317+
Timestamp := Shift_Right (Timestamp, 8);
318+
Write_Bytes (Output, Bytes);
319+
end loop;
320+
end;
321+
309322
Write_Info (Output, Info_User_Data, User_Data);
310323
Write_Info (Output, Info_End, "");
311324
for I in Buffers_Groups'Range loop

0 commit comments

Comments
 (0)