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§
- Arch
- An architecture, identified by its endianness and word size
- Context
- The current context, used by most functions for runtime behaviour modification
Enums§
- Bits
- The word size of a given
Arch
- Endianness
- The word endianness of a given
Arch
Constants§
Functions§
- get_
arch - Get the context’s architecture
- get_
bits - Get the context’s word size
- get_
endianess - Get the context’s endianess
- set_
arch - Set the context’s architecture
- set_
bits - Set the context’s word size
- set_
endianess - Set the context’s endianess