CallerAddr Routine |
Unit
TestFramework
Declaration
Function CallerAddr: Pointer;
Description
Used internally by the framework. Don't use directly. Implementation
function CallerAddr :Pointer; assembler; const CallerIP = $4; asm push 4 push ebp call IsBadReadPtr test eax,eax jne @@Error mov eax, [ebp].CallerIP sub eax, 5 // 5 bytes for call push eax push 4 push ebx call IsBadReadPtr test eax,eax pop eax je @@Finish @@Error: xor eax, eax @@Finish: End; |
|