regValueNative
Returns a pointer to a register stored in a ThreadContext, preserving the pointer attributes of the context.
Function parameters
Parameters
- thread_context_ptr:*std.debug.ThreadContext
- reg_number:u8
- reg_context:?RegisterContext
Type definitions in this namespace
Types
Tells whether unwinding for this target is supported by the Dwarf standard.
Functions
- supportsUnwinding
- Tells whether unwinding for this target is supported by the Dwarf standard.
- ipRegNum
- Returns `null` for CPU architectures without an instruction pointer register.
- regBytes
- Returns a slice containing the backing storage for `reg_number`.
- regValueNative
- Returns a pointer to a register stored in a ThreadContext, preserving the
Error sets in this namespace
Error Sets
Source
Implementation
pub fn regValueNative(
thread_context_ptr: *std.debug.ThreadContext,
reg_number: u8,
reg_context: ?RegisterContext,
) !*align(1) usize {
const reg_bytes = try regBytes(thread_context_ptr, reg_number, reg_context);
if (@sizeOf(usize) != reg_bytes.len) return error.IncompatibleRegisterSize;
return mem.bytesAsValue(usize, reg_bytes[0..@sizeOf(usize)]);
}