次の方法で共有


Debugger Extension Commands (Windows Embedded CE 6.0)

1/5/2010

Debugger extension DLLs enable you to create debugging commands tailored to your specific needs. Extension DLLs are loaded and managed through Target Control debugger extension commands; Target Control also provides access to the custom commands defined by your DLL.

In addition to supporting customized commands provided by a debugger extension, Target Control supports shell commands that you can use for debugging and diagnosis. For more information about the shell commands, see Target Control Debugging Commands.

Using debugger extension commands is similar to the use of commands for the kernel debugger. A debugger extension command is an entry point into a DLL called by the debugger. For more information, see Debugger Extension Development.

The following code example shows the syntax that invokes a command in a debugger extension.

![filename.]extension [arguments]

In the syntax, do not include the .dll extension in the file name. You can include a path with the file name, but the default limit on the length of the string is 255 characters.

The following table shows commands that you use to load and manage debugger extension DLLs.

Syntax Command Description

![dll.]cmd args…

Execute Extension

Locate and execute cmd in dll named dll.

.chain

Display search chain

Displays the list of debugger extensions in the search chain.

.listext

List

Lists names of all loaded debugger extensions.

.loadext <dll>

Load extension

Load user extension named dll.

.setdll <dllname>

Set extension

Sets the user extension to dllname

.unload <dllname>

Unload extension

Unload user extension dllname.

.unloadall

Unload all

Unloads all loaded extension DLLs.

If an extension DLL is not already loaded, the debugger loads the extension DLL by calling the LoadLibrary function. After the debugger loads the extension DLL, it calls the GetProcAddress function to locate the name of the command in the extension DLL. The name of the command is case-sensitive and must be entered exactly as it appears in the .def file for the extension DLL.

If you do not specify a file name when you run a debugger extension command, the debugger searches the loaded extension DLLs for the command.

When an extension DLL is unloaded, it is removed from the search chain. When an extension DLL is loaded, it is added to the beginning of the search chain.

To promote a DLL to the top of the search chain, use the .setdll command.

To display a list of loaded extension DLLs and the current search chain, use the .chain command.

If you attempt to run a command that is not in a loaded extension DLL, an Export not found message appears.

See Also

Tasks

Loading a Debugging Extension

Other Resources

Debugger Extensions