1 ------------------------------------------------------------------------------
3 -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
5 -- S Y S T E M . T R A C E S . S E N D --
9 -- Copyright (C) 2001 Free Software Foundation, Inc. --
11 -- GNARL is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNARL; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
20 -- MA 02111-1307, USA. --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
32 ------------------------------------------------------------------------------
34 -- This version is for VxWorks targets.
36 -- Trace information is sent to WindView using the wvEvent function.
38 -- Note that wvEvent is from the VxWorks API.
40 -- When adding a new event, just give an Id to then event, and then modify
41 -- the WindView events database.
43 -- Refer to WindView User's Guide for more details on how to add new events
44 -- to the events database.
50 -- This procedure formats the string, maps the event Id to an Id
51 -- recognized by WindView, and send the event using wvEvent
53 separate (System
.Traces
.Format
)
54 procedure Send_Trace
(Id
: Trace_T
; Info
: String) is
58 Buffer
: System
.Address
;
60 pragma Import
(C
, Wv_Event
, "wvEvent");
62 Info_Trace
: String_Trace
;
66 Info_Trace
:= Format_Trace
(Info
);
69 when M_Accept_Complete
=> Id_Event
:= 30000;
70 when M_Select_Else
=> Id_Event
:= 30001;
71 when M_RDV_Complete
=> Id_Event
:= 30002;
72 when M_Call_Complete
=> Id_Event
:= 30003;
73 when M_Delay
=> Id_Event
:= 30004;
74 when E_Kill
=> Id_Event
:= 30005;
75 when E_Missed
=> Id_Event
:= 30006;
76 when E_Timeout
=> Id_Event
:= 30007;
78 when W_Call
=> Id_Event
:= 30010;
79 when W_Accept
=> Id_Event
:= 30011;
80 when W_Select
=> Id_Event
:= 30012;
81 when W_Completion
=> Id_Event
:= 30013;
82 when W_Delay
=> Id_Event
:= 30014;
83 when WT_Select
=> Id_Event
:= 30015;
84 when WT_Call
=> Id_Event
:= 30016;
85 when WT_Completion
=> Id_Event
:= 30017;
86 when WU_Delay
=> Id_Event
:= 30018;
88 when PO_Call
=> Id_Event
:= 30020;
89 when POT_Call
=> Id_Event
:= 30021;
90 when PO_Run
=> Id_Event
:= 30022;
91 when PO_Lock
=> Id_Event
:= 30023;
92 when PO_Unlock
=> Id_Event
:= 30024;
93 when PO_Done
=> Id_Event
:= 30025;
95 when T_Create
=> Id_Event
:= 30030;
96 when T_Activate
=> Id_Event
:= 30031;
97 when T_Abort
=> Id_Event
:= 30032;
98 when T_Terminate
=> Id_Event
:= 30033;
100 -- Unrecognized events are given the special Id_Event value 29999
102 when others => Id_Event
:= 29999;
106 Wv_Event
(Id_Event
, Info_Trace
'Address, Max_Size
);