WinDBG

Go to Home

Global Flags (GFlags)

Global Flags, or simply gflags, is a configuration tool part of the Debugging Tools For Windows package. It provides both console-mode and a graphical interface (GUI) and can configure the system to collect much more detail from a process, i.e. it instruments the process for debugging. It also instruments the system wide for kernel mode debugging, which requires a reboot.

All gflags configurations are storage in the Registry. System wide settings are located at

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]
"GlobalFlag"=dword:00820502

while each process has an independent key

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Process.exe]
"GlobalFlag"="0x121099f2"

The value storage into the GlobalFlag key, represents an bit setting for the corresponding configuration set. IMPORTANT: Unless you know exactly what are you doing, DO NOT update the registry directly. Instead, use the gflags either from GUI or console to set the registry value and them you can export it.

Although it providers much instrumentations features for system, this page will focus on the process instrumentation (Image File tab in graphical interface).

Now, let’s look at the console mode option, which also provides an overview of the GUI option.

Usage: gflags [option] [ImageName] [+/-Flag]

The options are:

The list of Flags below gives a brief details about the gflags options:

Be careful! Some options will certainly slow down the monitored application. Also, depending on the combination of flags used, the application may not even run!