pub enum DebugAgentRequest {
Connect {
socket: Socket,
responder: DebugAgentConnectResponder,
},
GetAttachedProcesses {
iterator: ServerEnd<AttachedProcessIteratorMarker>,
control_handle: DebugAgentControlHandle,
},
AttachTo {
pattern: String,
type_: FilterType,
options: FilterOptions,
responder: DebugAgentAttachToResponder,
},
GetProcessInfo {
options: GetProcessInfoOptions,
iterator: ServerEnd<ProcessInfoIteratorMarker>,
responder: DebugAgentGetProcessInfoResponder,
},
GetMinidumps {
options: MinidumpOptions,
iterator: ServerEnd<MinidumpIteratorMarker>,
responder: DebugAgentGetMinidumpsResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: DebugAgentControlHandle,
method_type: MethodType,
},
}
Variants§
Connect
Hand the DebugAgent a socket that connects it to the debugger. This will return ZX_ERR_ALREADY_BOUND if a connection already exists. When the socket is closed, the DebugAgent will exit.
GetAttachedProcesses
Iterator over all processes that this agent is attached to. Note this is not the same as the set of installed filters, but rather the set of filters that matched and were later successfully attached.
AttachTo
Use the given filter to attach to any existing or subsequently created components. This method will return the number of matches that were present at the time of calling this method. All attached processes will be detached when this agent is destroyed.
|filter| will be inspected for validity, with corresponding errors returned. If the filter is invalid, no attaches will occur and the filter will not be installed.
|num_matches| will contain the number of matches that were found immediately upon filter installation if there was no error, that is, the number of processes immediately within (or recursively in this realm, if the option is specified) this component’s corresponding job. Note that filters may be installed before any components are actually resolved and matched, so this number may be 0. This return value may be safely ignored.
Invalid filters will return an error, see Filter above for details on how to construct a filter.
GetProcessInfo
The given server_end of the iterator will iterate over all threads, of all attached processes. The options parameter may be passed to filter the already attached processes and to express interest in what should be yielded by the iterator. Including a filter is recommended if DebugAgent is attached to a large number of processes. Note that this filter will not cause any new processes to be attached and will not be saved after this method returns. It is purely to reduce the bounds of the iterator. The threads will be suspended for the duration of information capture, which could be interrupted by other system processes, see |ProcessInfoIterator| for an example.
Fields
options: GetProcessInfoOptions
iterator: ServerEnd<ProcessInfoIteratorMarker>
responder: DebugAgentGetProcessInfoResponder
GetMinidumps
Collect minidumps for all attached processes. |options| may contain a filter to reduce the number of minidumps that are yielded by the iterator.
Fields
options: MinidumpOptions
iterator: ServerEnd<MinidumpIteratorMarker>
responder: DebugAgentGetMinidumpsResponder
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: DebugAgentControlHandle
method_type: MethodType
Implementations§
Source§impl DebugAgentRequest
impl DebugAgentRequest
pub fn into_connect(self) -> Option<(Socket, DebugAgentConnectResponder)>
pub fn into_get_attached_processes( self, ) -> Option<(ServerEnd<AttachedProcessIteratorMarker>, DebugAgentControlHandle)>
pub fn into_attach_to( self, ) -> Option<(String, FilterType, FilterOptions, DebugAgentAttachToResponder)>
pub fn into_get_process_info( self, ) -> Option<(GetProcessInfoOptions, ServerEnd<ProcessInfoIteratorMarker>, DebugAgentGetProcessInfoResponder)>
pub fn into_get_minidumps( self, ) -> Option<(MinidumpOptions, ServerEnd<MinidumpIteratorMarker>, DebugAgentGetMinidumpsResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL