Hooking a Stacktrace in Delphi 2009
Posted
by Jim McKeeth
on Stack Overflow
See other posts from Stack Overflow
or by Jim McKeeth
Published on 2008-11-13T09:30:13Z
Indexed on
2010/05/05
18:18 UTC
Read the original article
Hit count: 596
The Exception class in Delphi 2009 received a number of new features. A number of them are related to getting a stacktrace:
- property StackTrace: string *read* GetStackTrace;
- property StackInfo: Pointer read FStackInfo;
- class var GetExceptionStackInfoProc: function (P: PExceptionRecord): Pointer;
- class var GetStackInfoStringProc: function (Info: Pointer): string;
- class var CleanUpStackInfoProc: procedure (Info: Pointer);
Has anyone used these to obtain a stack trace yet? Yeah, I know there are other ways to get a stack trace, but if it is supported natively in the Exception class I would rather leverage that.
Update: There is an interest blog post about this. Covers it in a lot of depth.
© Stack Overflow or respective owner