21.1.5 Features for Debugging MS Windows PE Executables
MS-Windows programs that call
SetConsoleMode to switch off the
special meaning of the Ctrl-C keystroke cannot be interrupted
by typing C-c. For this reason, gdb on MS-Windows
supports C-<BREAK> as an alternative interrupt key
sequence, which can be used to interrupt the debuggee even if it
There are various additional Cygwin-specific commands, described in this section. Working with DLLs that have no debugging symbols is described in Non-debug DLL Symbols.
- This is a prefix of MS Windows-specific commands which print
information about the target system and important OS structures.
info w32 selector
- This command displays information returned by
the Win32 API
GetThreadSelectorEntryfunction. It takes an optional argument that is evaluated to a long value to give the information about this given selector. Without argument, this command displays information about the six segment registers.
info w32 thread-information-block
- This command displays thread specific information stored in the
Thread Information Block (readable on the X86 CPU family using
$fsselector for 32-bit programs and
$gsfor 64-bit programs).
- This is a Cygwin-specific alias of
- This command loads symbols from a dll similarly to add-sym command but without the need to specify a base address.
- If mode is
on, gdb will break on exceptions that happen inside the Cygwin DLL. If mode is
off, gdb will delay recognition of exceptions, and may ignore some exceptions which seem to be caused by internal Cygwin DLL “bookkeeping”. This option is meant primarily for debugging the Cygwin DLL itself; the default value is
offto avoid annoying gdb users with false
- Displays whether gdb will break on exceptions that happen inside the Cygwin DLL itself.
- If mode is
onthe debuggee will be started in a new console on next start. If mode is
off, the debuggee will be started in the same console as the debugger.
- Displays whether a new console is used when the debuggee is started.
- This boolean value controls whether the debuggee should start a new group or stay in the same group as the debugger. This affects the way the Windows OS handles Ctrl-C.
- Displays current value of new-group boolean.
- This boolean value adds debug output concerning kernel events related
to the debuggee seen by the debugger. This includes events that
signal thread and process creation and exit, DLL loading and
unloading, console interrupts, and debugging messages produced by the
- This boolean value adds debug output concerning execute events (such as resume thread) seen by the debugger.
- This boolean value adds debug output concerning exceptions in the debuggee seen by the debugger.
- This boolean value adds debug output concerning debuggee memory reads and writes by the debugger.
- This boolean values specifies whether the debuggee is called via a shell or directly (default value is on).
- Displays if the debuggee will be started with a shell.