问题
From some clearer understanding from Win64 exception stack walking not displaying entries, I would like to be able retrieve all the entries from the Win64 exception table - including any run-time additions by the API calls RtlAddFunctionTable and RtlInstallFunctionTableCallback.
Is this possible from Delphi?
回答1:
From:
RtlVirtualUnwind(UNW_FLAG_NHANDLER,
LImageBase,
LContext.Rip,
LRuntimeFunction,
LContext,
HandlerData,
EstablisherFrame,
NvContext);
The HandlerData pointer contains compiler/language specific information about the exception table. If you reverse some details from System.pas, in particular the methods _DelphiExceptionHandler and FindOnExceptionDescEntry, it is possible to figure out what each entry is for - the details are against the TExcScope record definition in System.pas.
来源:https://stackoverflow.com/questions/14254193/retrieving-all-the-entries-in-the-win64-exception-table