Struct goblin::mach::load_command::ThreadCommand [−][src]
Thread commands contain machine-specific data structures suitable for use in the thread state primitives. The machine specific data structures follow the struct thread_command as follows. Each flavor of machine specific data structure is preceded by an unsigned long constant for the flavor of that data structure, an uint32_t that is the count of longs of the size of the state data structure and then the state data structure follows. This triple may be repeated for many flavors. The constants for the flavors, counts and state data structure definitions are expected to be in the header file <machine/thread_status.h>. These machine specific data structures sizes must be multiples of 4 bytes The cmdsize reflects the total size of the thread_command and all of the sizes of the constants for the flavors, counts and state data structures.
For executable objects that are unix processes there will be one thread_command (cmd == LC_UNIXTHREAD) created for it by the link-editor. This is the same as a LC_THREAD, except that a stack is automatically created (based on the shell’s limit for the stack size). CommandVariant arguments and environment variables are copied onto that stack.
Fields
cmd: u32
LC_THREAD or LC_UNIXTHREAD
cmdsize: u32
total size of this command
flavor: u32
flavor of thread state (but you also need to know the cputype
)
count: u32
number of elements in thread_state
that are valid
thread_state: [u32; 70]
The raw thread state, details of which varies by CPU
Implementations
impl ThreadCommand
[src]
pub fn instruction_pointer(&self, cputype: CpuType) -> Result<u64>
[src]
Trait Implementations
impl Clone for ThreadCommand
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ThreadCommand
[src]
impl Debug for ThreadCommand
[src]
impl<'a> TryFromCtx<'a, Endian, [u8]> for ThreadCommand
[src]
Auto Trait Implementations
impl RefUnwindSafe for ThreadCommand
impl Send for ThreadCommand
impl Sync for ThreadCommand
impl Unpin for ThreadCommand
impl UnwindSafe for ThreadCommand
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,