1+ //! Houses the types that are directly sent across the IPC channels.
2+
3+ /// An IPC request sent by the child process to the parent.
4+ ///
5+ /// The sender for this channel should live on the child process.
6+ #[ derive( serde:: Serialize , serde:: Deserialize , Debug , Clone ) ]
7+ pub ( super ) enum TraceRequest {
8+ /// Requests that tracing begins. Following this being sent, the child must
9+ /// wait to receive a `Confirmation` on the respective channel and then
10+ /// `raise(SIGSTOP)`.
11+ ///
12+ /// To avoid possible issues while allocating memory for IPC channels, ending
13+ /// the tracing is instead done via `raise(SIGUSR1)`.
14+ StartFfi ( super :: StartFfiInfo ) ,
15+ /// Manually overrides the code that the supervisor will return upon exiting.
16+ /// Once set, it is permanent. This can be called again to change the value.
17+ OverrideRetcode ( i32 ) ,
18+ }
19+
20+ /// A marker type confirming that the supervisor has received the request to begin
21+ /// tracing and is now waiting for a `SIGSTOP`.
22+ ///
23+ /// The sender for this channel should live on the parent process.
24+ #[ derive( serde:: Serialize , serde:: Deserialize , Debug ) ]
25+ pub ( super ) struct Confirmation ;
26+
27+ /// The final results of an FFI trace, containing every relevant event detected
28+ /// by the tracer. Sent by the supervisor.
29+ ///
30+ /// The sender for this channel should live on the parent process.
31+ #[ derive( serde:: Serialize , serde:: Deserialize , Debug ) ]
32+ pub struct MemEvents {
33+ /// An ordered list of memory accesses that occurred. These should be assumed
34+ /// to be overcautious; that is, if the size of an access is uncertain it is
35+ /// pessimistically rounded up, and if the type (read/write/both) is uncertain
36+ /// it is reported as whatever would be safest to assume; i.e. a read + maybe-write
37+ /// becomes a read + write, etc.
38+ pub acc_events : Vec < super :: AccessEvent > ,
39+ }
0 commit comments