Partager via


Diagnostic CeDebugX Commands (Compact 2013)

3/26/2014

The primary command for automatic diagnosis is !diagnose all. If you are certain of the nature of the failure, you can call the diagnostic procedures individually to save time. However, there is no further action by the individual diagnostic commands if they do not detect the targeted failure type. Since certain failure types may be related (deadlock/starvation, AV/heap corruption), calling the individual diagnostic procedures is not recommended.

The following table describes the diagnostic commands.

Command

Description

!diagnose all

Runs through all available diagnostic procedures to diagnose a failure of unknown type.

!diagnose exception

Attempts to diagnose an exception, including stack overflows.

!diagnose starvation

Attempts to diagnose thread starvation.

!diagnose deadlock

Attempts to diagnose a deadlock or orphaned critical section, or mutex.

!diagnose heap

Attempts to diagnose heap corruptions.

!diagnose memory

Attempts to identify low-memory conditions.

!diagnose break

Attempts to diagnose a break failure, including exception, memory, heap, deadlock, and starvation.

!diagnose hang

Attempts to diagnose a non-response, including deadlock and starvation.

!diagnose list

Lists all the current positive diagnoses. This command is only valid after !diagnose all has been called.

!diagnose <index>

If multiple diagnoses are made, the !diagnose command displays a list of diagnoses. To view details for individual diagnoses, use this command with the index of the diagnosis displayed by the previous !diagnose command.

Starvation Delta Checks

Thread starvation conditions are not positively identifiable at break time. To obtain a positive diagnosis, you may have to re-enter a run state, wait, and then break into the debugger again.

Note

After continuing execution and breaking, you must enter the !refresh command before any other CeDebugX commands.

If CeDebugX was unable to detect a clear starvation in the first pass, it saves information regarding the current state of the threads that can run and gives you instructions to proceed, as follows:

A starvation condition could be present in the system. Threads of priority X or below seem to be unable to run.

Do the following:

1. Press F5 (GO) in the debugger, wait 30 seconds, and break manually.

2. Execute the !diagnose starvation delta command.

After you follow these instructions, CeDebugX uses the information that it saved during the initial pass and compares it to the new information for the threads that can run. In this way, the command can easily identify potentially spinning threads that may cause starvation.

Stack Overflow

If CeDebugX detects stack overflow, it performs a complete stack evaluation. CeDebugX evaluates each DWORD on the overflowing thread stack as text and compares them to known kernel objects. CeDebugX displays symbols near potential addresses and identifies them as frame pointers.

Stack evaluation information does not display in the Target Control window by default because it can be quite extensive.

The complete stack evaluation is saved in the Stackeval.txt in the extension working directory. See also Files Generated by CeDebugX.

To see a stack evaluation in the Target Control window, use the !stackeval command.

See Also

Reference

CeDebugX