EXT_ANALYSIS_PLUGIN callback function (extsfns.h)

When you write an Analysis Extension, you must implement an EXT_ANALYSIS_PLUGIN exported as (_EFN_Analyze). When the !analyze debugger command runs, it calls your _EFN_Analyze in each phase, so that you can participate in the analysis.

The WINAPI (__stdcall) calling convention is required. No exceptions (noexcept) should leave the function.

Syntax

EXT_ANALYSIS_PLUGIN ExtAnalysisPlugin;

HRESULT ExtAnalysisPlugin(
  [in] PDEBUG_CLIENT4 Client,
  [in] FA_EXTENSION_PLUGIN_PHASE CallPhase,
  [in] PDEBUG_FAILURE_ANALYSIS2 pAnalysis
)
{...}

Parameters

[in] Client

A pointer to an IDebugClient4 interface. Use this interface to access the debugger. Use QueryInterface to access other Debugger interfaces, such as the Legacy (IDebug*), Debug Host (IDebugHost*), Data Model (IDataModel*), etc., interfaces.

[in] CallPhase

A value in the FA_EXTENSION_PLUGIN_PHASE enumeration that specifies which phase of the analysis is currently in progress. Analysis phases include initialization, stack analysis, pre-bucketing, and post-bucketing.

[in] pAnalysis

A pointer to a IDebugFailureAnalysis2 interface. Use this interface to Get/Set properties of the analysis. Use QueryInterface to access other !analyze interfaces.

Return value

S_OK – A change was made.

S_FALSE – No changes were made.

E_* - An error occurred. !analyze will report the error via Key/Value using a Key string of Plugin.Exception."Phase"."DLL" and Value string of the HRESULT in “0x%08x” format.

Requirements

Requirement Value
Target Platform Desktop
Header extsfns.h

See also

Writing Custom Analysis Debugger Extension

Writing an Analysis Extension Plug-in to Extend !analyze