MCPcopy Create free account
hub / github.com/qilingframework/qiling / stack_read

Method stack_read

qiling/arch/arch.py:77–91  ·  view source on GitHub ↗

Peek the architectural stack at a specified offset from its top, without affecting the top of the stack. Note that this operation violates the FIFO property of the stack and may be used cautiously. Args: offset: offset in bytes from the top of the stack, not nec

(self, offset: int)

Source from the content-addressed store, hash-verified

75 return data
76
77 def stack_read(self, offset: int) -> int:
78 """Peek the architectural stack at a specified offset from its top, without affecting
79 the top of the stack.
80
81 Note that this operation violates the FIFO property of the stack and may be used cautiously.
82
83 Args:
84 offset: offset in bytes from the top of the stack, not necessarily aligned to the
85 native stack item size. the offset may be either positive or netagive, where
86 a 0 value means retrieving the value at the top of the stack
87
88 Returns: the value at the specified address
89 """
90
91 return self.ql.mem.read_ptr(self.regs.arch_sp + offset)
92
93 def stack_write(self, offset: int, value: int) -> None:
94 """Write a value to the architectural stack at a specified offset from its top, without

Callers 8

predictMethod · 0.45
predictMethod · 0.45
__invoke_callbackMethod · 0.45
hook_ZwRaiseExceptionFunction · 0.45
hook_IoCreateDriverFunction · 0.45
emit_stackMethod · 0.45
__get_stack_paramsMethod · 0.45
getReturnAddressMethod · 0.45

Calls 1

read_ptrMethod · 0.80

Tested by

no test coverage detected