在Delphi 2009中挂钩堆栈跟踪 [英] Hooking a Stacktrace in Delphi 2009
问题描述
Delphi 2009中的异常类收到了一些新功能。其中一些与获取堆栈跟踪有关:
The Exception class in Delphi 2009 received a number of new features. A number of them are related to getting a stacktrace:
- 属性 StackTrace:字符串 读取 GetStackTrace;
- 属性 StackInfo:指针读取 FStackInfo;
- class var GetExceptionStackInfoProc: function (P:PExceptionRecord):指针;
- class var GetStackInfoStringProc:函数(Info:Pointer): string ;
- class var CleanUpStackInfoProc:程序(信息:指针);
- 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.
更新: 有兴趣关于这个的博客文章。
推荐答案
对我来说,这看起来像一个框架,您可以在其中插入自己的堆栈跟踪。我想这可能会在内部使用JCLDebug IDE。也许是为了让用户能够提供madExcept或其他实现。
To me this looks like a framework where you can plug in your own stack tracing. I guess this might be used internally in the IDE with JCLDebug. Perhaps it's intended for users to be able to supply madExcept or another implementation.
这篇关于在Delphi 2009中挂钩堆栈跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!