简体   繁体   中英

How can I obtain a stack trace without using third party components?

I know that I can use components like madExcept, EurekaLog, JclDebug etc. to obtain stack traces. But how can I obtain stack traces without using such components?

The Windows API provides a function that will return stack traces. It is RtlCaptureStackBackTrace .

The will return code addresses rather than function names. If you want to display information like the third party components you mention, then you'll need to do more work. You need access to the information from the map file emitted by the Delphi linker.

有关此示例实现的信息,请参见d:\\ DelphiProjects \\ Libs \\ JCL \\ jcl \\ experts \\ repository \\ ExceptionDialog \\ StandardDialogs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM