Is there any sure fire way to tell what instruction
caused invocation of the current instruction? Specifically, Is there
a register or EBP, ESP offset that one can check to get the addresss
of the instruction that invoked a subroutine?
Here is the scenario:
In a program I am writing, I am hooking the JMP statements to
various sub-routines by replacing the JMP instruction with an
instruction to JMP to my sub-routine. I then call the "real"
sub-routine. I get access before and after the "real" sub-routine so
I can do timings and debug stuff.
Any help would be greatly appreciated.
------------------
R.
caused invocation of the current instruction? Specifically, Is there
a register or EBP, ESP offset that one can check to get the addresss
of the instruction that invoked a subroutine?
Here is the scenario:
In a program I am writing, I am hooking the JMP statements to
various sub-routines by replacing the JMP instruction with an
instruction to JMP to my sub-routine. I then call the "real"
sub-routine. I get access before and after the "real" sub-routine so
I can do timings and debug stuff.
Any help would be greatly appreciated.
------------------
R.
Comment