GDB Client
In this topic:
•SSH
If a hardware debug connection is not possible on your Target, winIDEA can also work as a GDB Client.
•GDB Client
•Target running a distribution of GNU/Linux
•Target connected to the network and reachable from the PC running winIDEA
•winIDEA version 9.21.271.1.188886 or later
•(optional) GDB Server installed and configured (recommended same version of GDB and GDB Server)
An application executable needs to be on the Target's file system and should be executable. |
Open GDB | Options.
This page allows you to configure GDB settings. More information is provided by the in-line help.
Path to GDB - Path to the GDB Client executable file.
GDB connects to gdbserver - Select when running your program by a gdbserver, or when using a simulator, i.e. QEMU, to open a gdbserver port for you.
Configure - Click to configure additional connection settings in the dialog.
GDB Arguments - Additional arguments to the GDB executable. The default argument is --interpreter=mi.
Executable Path - Set when the program is running on a different machine than winIDEA (available when selecting Remote (SSH) as Debug Location).
Files can be downloaded to the remote target/computer either via SSH or the gdb-gdbserver connection. The specific files, target directory and permissions can be set in Debug | Configure Session | SoC | Program Files | <file> with the Load into target file system option. To transfer files to the remote target/computer the session needs to be started with a Download.
Process Configuration
Target's CWD - Specify the working directory if different to the one for the target program.
On this page you can configure the Secure Shell protocol (SSH). SSH is a method for secure remote log in from one computer to another, it provides several alternative options for strong authentication and communication protection.
Target IP - Target IP address.
Target port - Port number where the SSH server is running on Target (usually port 22).
Username - Name that winIDEA will use to log in to Target over SSH and start the GDB Server. The selected username should have the rights to start the GDB Server and execute the application on Target.
Authentification - Method used for user authentication when winIDEA tries to log in to Target over SSH.
•None - No authentication required.
•Password - winIDEA will use a password when connecting to the Target over SSH. winIDEA will prompt for the password when connecting to the Target.
•Private key - winIDEA will use private key authentication when connecting to Target over SSH. winIDEA will prompt for a private key pass phrase when connecting to the Target.
Private key path - This option is relevant when using private key for authentication. Set this to the path to the private key file used for authentication.
Launch configuration is optional and it can be configured via Debug | Configure Session | Launches | Add Launch.
Configure advanced options on this page, like setting response and stop timeouts.
A watchpoint pauses the execution of a program when the value of a specified variable or expression changes. Watchpoints are used to monitor data changes in memory. They are particularly useful when you need to track down where and how a variable is being modified in a program, which can be critical for debugging issues like unexpected variable changes, memory corruption, or race conditions.
Open GDB | Watchpoints.
Add - Click the button to add watchpoints from the Watchpoint configuration dialog:
Evaluate - Select watchpoint type:
•Address - Type in the address and size.
•Symbol - Select the Symbol by clicking the "..." button.
•Symbol Address - Select the Symbol Address by clicking the "..." button.
Type - Select access type: Read, Read-Write (RW), Write.
Condition - Each time the watchpoint is passed the expression (if present) will be evaluated, and if true, it will count as one hit. Once the number specified in the Hit count is reached, the watchpoint will be triggered, and the program execution will be stopped.
This guide explains the procedure to configure your winIDEA Workspace to work as a GDB Client.
Create a New Workspace and select GDB Client. |
Follow the Wizard. |
Open GDB | Options and configure. |
Perform Download and start debugging. |
•QEMU