Table of Contents
Attaching to remote processes
To attach to an existing process on a local or remote machine, use the "Attach to process" command
available in WinGDB menu. The following dialog will appear:

Some of the fields are required:
- Login information: it usually consists of your user account name and the target host name
or IP address. Optionally you can provide also a port number and/or a password. The syntax is
"username[:password]@hostname[:port]" where square brackets denote optional parts.
If you don't specify the port, it will default to 22. If you don't provide the password,
another dialog will appear, prompting you for it:

- Process: select a process from the list. To refresh list of processes available on specified host
use button 'Refresh'. To attach to specified process immediately use mouse double-click.
The "Show processes from all users" check box allows you to choose whether the process list contains
processes from all users, or only for the user which name you specified in the login string.
Also you can set other settings, accessible after clicking the "Advanced settings" button.
The following dialog will appear:

This dialog contains mostly optional settings:
- Byte-order: select Big-Endian or Little-Endian according to platform the attached process
is working on.
- The path to custom initialization script - it is simple text file (more about syntax) which will run
after debugger has been started. It has to be located on local machine.
- Additional source directories for the process. WinGDB will use "dir" GDB command to add these directories.
If you want to add many source directories then separate them with semicolon character (';').
- The debug info directory for the process. WinGDB will use "set debug-file-directory" GDB command to set this directory.
- The shared library prefix for the process. WinGDB will use "set solib-absolute-prefix"
(it is equivalent of "set sysroot" ) GDB command to set this directory.
- The shared library directories for the process. WinGDB will use "set solib-search-path" GDB command to set these directories.
Attaching to remote processes with common Visual Studio 'Attach to Process' window
To attach to an existing process on a remote machine, you can also use the "Attach to process" command
available in menu "Tools". The standard "Attach to process" dialog should appear. In the dialog choose the
"WinGDB" transport and provide login information in the "Qualifier" field.
The format is "username[:password]@hostname[:port]", where square brackets denote optional parts.

The password and the port number are optional. If you don't specify the port, it will default to 22. You
may also omit the password, but in that case another dialog will appear, prompting you for the password:

The "Show processes from all users" check box allows you to choose whether the process list contains
processes from all users, or only for the user which name you specified in the login string.
This option is available only in some editions of Visual Studio. If "WinGDB" transport doesn't
show up on your edition, please use the "Attach to process" command from WinGDB menu instead.
Table of Contents
Copyright (C) 2008-2010 WinGDB.com. All rights reserved.