class ComponentManager
Defined at line 25 of file ../../src/developer/debug/debug_agent/component_manager.h
This class manages launching and monitoring Fuchsia components. It is a singleton owned by the
DebugAgent.
Public Methods
void ComponentManager (SystemInterface * system_interface)
ComponentManager needs |SystemInterface::GetParentJobKoid| for |FindComponentInfo|.
Defined at line 28 of file ../../src/developer/debug/debug_agent/component_manager.h
std::vector<debug_ipc::ComponentInfo> FindComponentInfo (zx_koid_t job_koid)
Find the component information if the job is the root job of an ELF component.
const std::map<std::string, debug_ipc::ComponentInfo> & GetNonElfComponentInfo ()
Returns the current set of component information in the system that is not associated with an
ELF process - e.g. it doesn't have a job or a process to key the lookup off of.
void ~ComponentManager ()
Defined at line 30 of file ../../src/developer/debug/debug_agent/component_manager.h
std::vector<debug_ipc::ComponentInfo> FindComponentInfo (const ProcessHandle & process)
Find the component information if the process runs in the context of a component.
Defined at line 44 of file ../../src/developer/debug/debug_agent/component_manager.cc
std::optional<debug_ipc::ComponentInfo> FindComponentInfoByMoniker (const std::string & moniker)
Finds the component info that matches the given moniker or url. Note that there may be multiple
components that match the same url, but there will never be multiple matches for a full
component moniker.
Defined at line 65 of file ../../src/developer/debug/debug_agent/component_manager.cc
std::vector<debug_ipc::ComponentInfo> FindComponentInfoByUrl (const std::string & url)
Defined at line 79 of file ../../src/developer/debug/debug_agent/component_manager.cc
void SetDebugAgent (DebugAgent * debug_agent)
Set the debug_agent. ComponentManager needs a debug_agent to notify component starting and
exiting events.
debug::Status LaunchComponent (std::string url)
Launches the component.
debug::Status LaunchTest (std::string url, std::optional<std::string> realm, std::vector<std::string> case_filters)
Launches a test.
bool OnProcessStart (const ProcessHandle & process, StdioHandles * out_stdio, std::string * process_name_override)
Notification that a process has started.
If the process starts because of a |LaunchComponent|, this function will fill in the given
stdio handles and return true.
If it was not a component launch, returns false (the caller normally won't know if a launch is
a component without asking us, so it isn't necessarily an error).
|process_name_override| allows the component manager to override the process name observed
by the client and is optional.