Debugging Tools for Windows

ExtKnownStructMethod

The ExtKnownStructMethod callback method is called by the engine to format an instance of a structure for output on a single line.

typedef void
  (ExtExtension::*ExtKnownStructMethod)(
    IN PCSTR  TypeName,
    IN ULONG  Flags,
    IN ULONG64  Offset
    )

Parameters

TypeName
Specifies the name of the type of the structure pointed to by Offset. This is the same as the TypeName field of the ExtKnownStruct structure used to register this callback method.
Flags
Specifies bit flags that indicate how the output should be formatted. Currently, this is set to DEBUG_KNOWN_STRUCT_GET_SINGLE_LINE_OUTPUT, which indicates that the output should be formatted for output on a single line.
Offset
Specifies the location in the target's memory of the instance of the structure to be formatted for output.

Return Value

None

Comments

The debugger engine expects the output to be formatted for printing on a single line, hence it does not expect the formatted structure to have any line breaks.

The formatted output from this method should be placed in the buffer m_AppendBuffer — a member of ExtExtension.

Instances of this callback method are registered with the engine by using an instance of the ExtKnownStruct structure that is placed into the array m_KnownStructs (a member of ExtExtension) by the Initialize method. The ExtKnownStruct structure also specifies the name of the type of structure this method formats.

When the debugger engine calls a known structure method, it wraps the call in a try / except block. This protects the engine from some types of bugs in the extension code; but, because the extension calls are executed in the same thread as the engine, they can still cause it to crash.

Requirements

Headers: Defined in Engextcpp.hpp. Include Engextcpp.hpp.

See Also

ExtExtension, ExtKnownStruct, Initialize

Build machine: CAPEBUILD