microsoft/WinDbg-Samples

How is help text added to function aliases?

powercode opened this issue · 1 comments

With

dx -r1 Debugger.State.FunctionAliases

I get

    dflow            [!dflow [<address>]
Shows the instructions of the function containing [<address>] which influence the source operands of that instruction.]
    dis              [!dis [<address>]
Disassembles instructions starting at [<address>] using the data model disassembler.]
    printExceptionStack        <- my function

When registering my own function, it only shows the name of the function.
How can I add help texts?

Regards

Windbg Preview
Debugger client version: 1.2202.7001.0
Debugger engine version: 10.0.22549.1000

The commands descriptions come from the extension gallery manifest.

For example, we have this in the manifest file amd64\OptionalExtensions\DbgModelApiXtn_GalleryManifest.xml:

        <ScriptComponent Name="CodeFlow" Type="Engine" File=".\CodeFlow.js">
            <FunctionAliases>
                <FunctionAlias Name="dflow">
                    <AliasItem>
                        <Syntax>
                            <![CDATA[!dflow [<address>]]]>
                        </Syntax>
                        <Description>
                            <![CDATA[Shows the instructions of the function containing [<address>] which influence the source operands of that instruction.]]>
                        </Description>
                    </AliasItem>
                </FunctionAlias>
                <FunctionAlias Name="dis">
                    <AliasItem>
                        <Syntax>
                            <![CDATA[!dis [<address>]]]>
                        </Syntax>
                        <Description>
                            <![CDATA[Disassembles instructions starting at [<address>] using the data model disassembler.]]>
                        </Description>
                    </AliasItem>
                </FunctionAlias>