Reputation: 23
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?
Upvotes: 0
Views: 474
Reputation: 612934
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.
Upvotes: 3
Reputation: 16045
See d:\DelphiProjects\Libs\JCL\jcl\experts\repository\ExceptionDialog\StandardDialogs for the example implementation of this.
Upvotes: 2