Share via


Threads Window (Windows CE 5.0)

Send Feedback

The Threads window shows the threads, or paths of execution, within a process.

The Threads window provides different information if the debugger is running or if it is at a debug stop or breakpoint.

When the Debugger Is Running

The following types of information are displayed in the Threads window when the debugger is running.

  • hThread
    Displays the handle to the thread.

  • Thread State
    Displays one of the following thread states.

    Value Thread State Description
    Running Thread is running The thread is running.
    Runnabl Thread is able to run The thread can run and will do so when the OS reaches the next time slice at that thread's priority.
    Blockd Thread is blocked The thread is blocked on a resource, which can be one or more events, mutexes, or critical sections.
    Suspnd Thread is suspended The thread was suspended by a call to the SuspendThread function.
    Sleepg Thread is sleeping The thread called the Sleep function.
    Sl/Blk Thread is blocked and sleeping The thread is blocked on a resource, which can be one or more events, mutexes, or critical sections, and the thread has called the Sleep function.
  • Access Key
    Displays the access key for the current thread.

    This field is not valid for the currently running thread.

    If the thread is inside a program static library (PSL), the access key includes permission bits for the owner process and the PSL process.

  • hCurProc
    Displays the handle of the process that created the thread.

  • CurPrio
    Displays the priority for the thread, which is the priority the process is running at.

    Typically, the base priority and current priority are the same value.

  • BasePrio
    Displays the base priority of the thread, which is the priority at which the process runs if no inversion is occurring.

  • KernelTime
    The amount of CPU time spent by the thread in kernel mode.

    KernelTime starts from the beginning of the creation of the thread until the current snapshot is taken.

  • UserTime
    The amount of CPU time the thread used in user mode.

    UserTime starts from the beginning of the creation of the thread until the current snapshot is taken.

If the Debugger Is at a Debug Stop or Breakpoint

The following types of information are displayed in the Threads window when the debugger has stopped debugging.

  • hThread
    Displays the handle to the thread.

  • pThread
    Displays the pointer to the thread.

  • RunState
    Displays the state of the thread. This is analogous to ThreadState when the debugger is running.

    RunState can be Dying, Dead, Buried, Slpg (sleeping), Awak (awake), Rung (running), Runab (able to run), RunBlkd (able to run, but blocked), RunNeeds (needs to run)

  • InfoStatus
    Displays the following information about the status of the thread.

    InfoStatus Thread status
    Umode Thread is in User mode.
    Kmode Thread is in Kernel mode.
    StkFlt Thread has a stack fault.
    UsrBlkd Thread is blocked by a user call.
    Profd Thread is being profiled.
  • WaitState
    State of the waiting loop.

    WaitState can be Signaled, Processing, or Blocked.

  • AccessKey
    Displays the access key for the current thread.

    This field is not valid for the currently running thread.

    If the thread is inside a program static library (PSL), the access key includes permission bits for the owner process and the PSL process.

  • HCurProcIn
    Displays the handle of the process that created the thread.

  • HOwnerProc
    Displays the handle to the process that owns the thread.

  • CurPrio
    Displays the current priority for the thread, which is the priority the process is running at.

    Typically, the base priority and current priority are the same value.

  • BasePrio
    Displays the base priority of the thread, which is the priority at which the process runs if no inversion is occurring.

  • KernelTime
    Displays the elapsed kernel time.

  • UserTime
    Displays the elapsed user time.

  • Quantum
    Displays the quantum for this thread.

  • Quantuleft
    Displays the quantum left for this thread.

  • SleepCount
    Displays the thread sleep count and pending sleep count on WaitForMultiple.

  • SuspendCount
    Displays the thread suspend count.

  • TlsPtr
    Displays the thread local storage (TLS) pointer.

    TLS is a Win32 mechanism that allows multiple threads of a process to store data that is unique for each thread.

  • LastError
    Displays the last error that occurred for that thread.

    This is set by SetLastError and retrieved using GetLastError.

  • StackBase
    Displays the base address of the stack.

  • StkLowBnd
    Displays the lower bound of the committed stack base.

  • CreatTimeH
    Displays the High DWORD for the 64-bit timestamp of the thread creation time.

  • CreatTimeL
    Displays the Low DWORD for the 64-bit timestamp of the thread creation time.

  • Context menu
    Right-click the window to bring up the context menu.

    Some items on this menu are also available as toolbar buttons.

    This menu contains the following functions:

    Item Description
    Refresh Deletes all entries in the window, allowing only current entries to appear.
    Auto Refresh on Step Refreshes the window as you step through a process.

    Select to turn on or off.

    Expand All Callstacks Displays the callstack information for each thread.
    Collapse All Callstacks Hides the callstack information for each thread.
    Log Formats and moves all data in this window to the Log tab of the Output window.
    Auto Log on Step Moves data in this window to the Output window after each debugging step.

    Select to turn on or off.

    Selecting Auto Log on Step also turns on Auto Refresh on Step. You can turn Auto Refresh on Step off manually at any time.

    Open in Call Stack Window Opens the Call Stack Window for the selected process and thread.
    Docking View Switches the active window from docking to nondocking mode.
    • Docking mode. When a window is in docking mode, a check mark appears.

      You can dock the window to the border of the main Platform Builder window, or you can change the window to a floating window that can be moved outside the main Platform Builder window.

      To change the window to a floating window, hold the CTRL key and click on the frame of the window that you select.

      This window can be redocked at any time.

    • Nondocking mode. If the window is in nondocking mode, it appears only inside the main Platform Builder window and cannot be docked.
    Close Closes the Threads window.

See Also

Call Stack Window

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.