Link to home
Start Free TrialLog in
Avatar of RobMarsh
RobMarsh

asked on

How to walk the call stack?

I want to be able to generate within a procedure the call stack that got us there. Knowing the logical addresses of the callers on the stack will do -- I don't need (yet) to get the procedure names or such like.
ASKER CERTIFIED SOLUTION
Avatar of mheacock
mheacock

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RobMarsh
RobMarsh

ASKER

I worked something out myself through brute force and ignorance rather than insight. the function below called from within a procedure gives you the address of the caller of the procedure in a form that works with the IDE's Search|Find Error utility.

function GetCaller: pointer;
asm
  MOV  EAX, , [EBP+8]
  SUB   EAX,, 4
end;

Thanks,
RobMarsh