Expand description
The global (to a given thread) context. Used to set global settings which are used internally by several functions.
Examples
use pwn::{context, I386};
use pwn::Bits::ThirtyTwo;
context::set_arch(I386);
assert_eq!(context::get_arch(), I386);
assert_eq!(context::get_bits(), ThirtyTwo)
Warning
context
is local to each thread. Context values may need to be re-set when using multi-threaded code.
Structs
An architecture, identified by its endianness and word size
The current context, used by most functions for runtime behaviour modification
Enums
The word endianness of a given Arch
Constants
Functions
Get the context’s architecture
Get the context’s word size
Get the context’s endianess
Set the context’s architecture
Set the context’s word size
Set the context’s endianess