Struct process_builder::BuiltProcess
source · pub struct BuiltProcess {
pub process: Process,
pub root_vmar: Vmar,
pub thread: Thread,
pub entry: usize,
pub stack: usize,
pub stack_base: usize,
pub stack_vmo: Vmo,
pub bootstrap: Channel,
pub vdso_base: usize,
pub elf_base: usize,
pub elf_headers: Elf64Headers,
}
Expand description
A container for a fully built but not yet started (as in, its initial thread is not yet running) process, with all related handles and metadata. Output of ProcessBuilder::build().
You can use this struct to start the process with BuiltProcess::start(), which is a simple wrapper around the zx_process_start syscall. You can optionally use the handles and information in this struct to manipulate the process or its address space before starting it, such as when creating a process in a debugger.
Fields§
§process: Process
The newly created process.
root_vmar: Vmar
The root VMAR for the created process.
thread: Thread
The process’s initial thread.
entry: usize
The process’s entry point.
stack: usize
The initial thread’s stack pointer.
stack_base: usize
The base address of the stack for the initial thread.
stack_vmo: Vmo
The VMO of the stack for the initial thread.
bootstrap: Channel
The bootstrap channel, to be passed to the process on start as arg1 in zx_process_start / zx::Process::start.
vdso_base: usize
The base address of the VDSO in the process’s VMAR, to be passed to the process on start as arg2 in zx_process_start / zx::Process::start.
elf_base: usize
The base address where the ELF executable, or the dynamic linker if the ELF was dynamically linked, was loaded in the process’s VMAR.
elf_headers: Elf64Headers
The ELF headers of the main module of the newly created process.
Implementations§
source§impl BuiltProcess
impl BuiltProcess
sourcepub fn start(self) -> Result<Process, ProcessBuilderError>
pub fn start(self) -> Result<Process, ProcessBuilderError>
Start an already built process.
This is a simple wrapper around the zx_process_start syscall that consumes the handles and data in the BuiltProcess struct as needed.