Add simple Debug_Trace code for printing statements while debugging
This commit is contained in:
parent
32fff8bf41
commit
cb33969847
|
@ -64,11 +64,21 @@ package body Epoll is
|
|||
return Created_Hub;
|
||||
end Create;
|
||||
|
||||
|
||||
procedure Validate_Hub (H : in Hub) is
|
||||
begin
|
||||
Debug_Trace (H, "Entering Validate_Hub");
|
||||
if H.Epoll_Fd < 0 then
|
||||
raise Hub_Invalid;
|
||||
end if;
|
||||
end Validate_Hub;
|
||||
|
||||
|
||||
procedure Debug_Trace (H : in Hub; Line : in String) is
|
||||
begin
|
||||
if not H.Debug then
|
||||
return;
|
||||
end if;
|
||||
end Debug_Trace;
|
||||
|
||||
end Epoll;
|
||||
|
|
|
@ -38,10 +38,12 @@ package Epoll is
|
|||
type Hub is tagged record
|
||||
Epoll_Fd : C.int := -1;
|
||||
Should_Continue : Boolean := True;
|
||||
Debug : Boolean := False;
|
||||
Callbacks : Callback_Registry.Vector;
|
||||
end record;
|
||||
|
||||
procedure Validate_Hub (H: in Hub);
|
||||
procedure Debug_Trace (H: in Hub; Line : in String);
|
||||
|
||||
subtype EPOLL_CTL_OPS is C.unsigned;
|
||||
EPOLL_CTL_ADD : constant EPOLL_CTL_OPS := 1;
|
||||
|
|
Loading…
Reference in New Issue