Joined: 09 Nov 2014 Posts: 5 Location: Programming Boat
Posted: Wed Aug 03, 2016 9:34 pm Post subject: tracing where you jumped from
Alright so I have been able to find the earliest point of a function by toggling breakpoints until it no longer breaks, but I want to know where it jumped from to that point. Sorry if this is a repost/already talked about, I've tried looking for it.
If it's the start of a subroutine that's called, the return address is at [esp] prior to any stack modification (i.e. push ebp).
If the game is jumping to it instead of calling it and it's in a module, you can dissect that module's code and look at all the jmp / jcc / call instructions referencing it. _________________
I don't know where I'm going, but I'll figure it out when I get there.
Joined: 09 May 2003 Posts: 25796 Location: The netherlands
Posted: Thu Aug 04, 2016 3:05 am Post subject:
if you use kernelmode debug you an use last branch recording
Code:
debug_setLastBranchRecording(boolean): When set the Kernel debugger will try to record the last branch(es) taken before a breakpoint happens
debug_getMaxLastBranchRecord() : Returns the maximum branch record your cpu can store (-1 if none)
debug_getLastBranchRecord(index): Returns the value of the Last Branch Record at the given index (when handling a breakpoint)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum