Table of Contents
Debugger settings
There is a number of settings in WinGDB related to the debugger operation. These options
appear on Debug page in various configuration dialogs like Launch, Attach, Examine Core
and Properties. The meaning of options is the same in all cases, although their set
may slightly differ depending on context (e.g. launch or attach). Typically it looks
like this:
The meaning of the options are:
- Process executable path: this should be a full path to the program you want to run. You can also open
a local/remote filesystem browser by pressing the "..." button and select the path. The path
is also meaningful in Attach and Examine Core modes, as GDB needs to extract debug info
from the executable binary.
- Working directory: WinGDB will use "--cd" GDB switch to set this directory.
Used only in Launch mode.
- Command line arguments: WinGDB will use "-exec-arguments" GDB command to set these arguments.
Used only in Launch mode.
- Environment variables: WinGDB will use "set environment" GDB command to set these variables.
Used only in Launch mode.
- Stop in main(): orders the the process to stop at the first instruction of the "main()" function. Otherwise the process
will run until a breakpoint is reached, or the program exits.
- Main function name: allows to use a different function name than main() for the
Stop in main() option.
- Launch gdbserver automatically: enables automatic launch of gdbserver program
on target machine. Meaningful in Indirect and Embedded debugging scenarios.
- Byte-order: select Big-Endian or Little-Endian according to platform which the process will
be launched on.
- Visualizer profile: enables visualizers and selects particular visualizer configuration
(profile). You can find more information on visualizers in this section.
- Load sources from build host: enables a separate host with source files. Use this option when you build your program on one host and debug on another one,
without a copy of the sources. GDB must be also installed on the source host, in the same location as on the debugee host.
Your program must be accessible and debuggable on the source host, also from the same location. The location limitations will be relaxed
in subsequent WinGDB versions. This is alternative mode to gdbserver-based Indirect mode.
- Enable X11 forwarding: see description in this section.
- Launch debugger in 'sudo' environment: when set, WinGDB will launch the GDB process
in a special shell environment using the 'sudo' command. It allows to debug programs
with root privileges without the need to login as root. The 'sudo' command must be
available and properly configured in order to use this option (see man sudo).
WinGDB will supply same password for 'sudo' as for the login session.
Debugger environment settings
The Environment page contains miscellaneous options for configuring the environment,
both on the target and local machine side.
- Debugger path: allows to set custom path or name of GDB debugger.
- Build toolchain paths: allows to set paths to build tools (compiler, linker, make
utility, etc.). Not needed if your tools are already added to the PATH variable.
-
Intercept standard IDE commands: this option specifies how standard Visual Studio
keystrokes like F5 should be handled. When enabled, these hotkeys and menu commands
will launch WinGDB build and debug. When disabled, standard Visual Studio actions
will be performed. You can also set this option to different values in several
project configurations: enable in configurations meant to develop for Linux platforms
and disable in configurations for the Windows platform.
Debugger initialization settings
Another set of options is related to the launch and initialization of the
debugger itself. Those options are located on the Initialization page:
There are a couple of options for initialization scripts. Those are described
in this section.
There is also an option to specify additional command line switches for GDB.
Additional directories settings
On the Directories page, you can specify some optional directories
for debugging session:
- Additional source directories: WinGDB will use "dir" GDB command to add these directories.
If you want to add many source directories then separate them with semicolon character (';').
- Debug info directory: WinGDB will use "set debug-file-directory" GDB command to set this directory.
- Shared library directories: WinGDB will use "set solib-search-path" GDB command to set these directories.
Table of Contents
Copyright (C) 2008-2019 SOFT-ERG. All rights reserved.