GDB Client
In this topic:
•Configure SSH Connection parameters.
•(optional) Provide the Application path.
•Display the output in the Terminal Window
In case hardware debug connection is not possible on your target, winIDEA can also work as a GDB Client.
On a target, which is running a distribution of GNU/Linux, GDB Server must be installed and configured in order for GDB debugging to work from winIDEA.
Target must be connected to the network and must be reachable over the network from the PC running winIDEA.
Application executable needs to be on target's file system and should be executable. |
You can select the plugin after creating a new project (workspace) and selecting GDB Client from the drop-down menu.
Create a New Workspace and select GDB Client. |
Describe the CPU. |
Some of winIDEA's advanced features need to be aware of the CPU architecture. Open Debug / Configure session / SoCs / Edit.
Configure GDB. |
Open GDB / Options to configure the GDB Client.
Configure Target IP. |
In the Config page configure Target IP, Host type and signals.
Target IP - Configure the Target IP to match the target where the application is executed.
Host type - Select the host:
oLinux - Target where application and GDB server is running GNU/Linux operating system
oST Micro
oUnknown
Use step prediction - This option should be used when GDB Server doesn’t support code stepping. With this option enabled winIDEA takes care of code stepping.
Signals - Signals that can occur in the operating system.
Edit - Open the Signal dialog and configure following setting:
oName - Select a meaningful name.
oCPU stop - GDB stops program execution when signal occurs.
oPass to program - GDB passes the signal to the application.
It is not recommended to change signals SIGINT and SIGTRAP default value, because they are used by the GDB. |
Configure GDB Server. |
To connect to the GDB server, winIDEA needs additional information. Open Server page to provide the details.
Application - Path to application executable on targets file system. This option is relevant only when GDB server is started from winIDEA.
Port - Port number where GDB server is running on target. If you are using winIDEA to start the GDB server, this will be the port that will be used.
Server:
•Already running - GDB Server is already running on target. winIDEA just connects to GDB Server in this case. SSH and Simulator are in this disabled which is indicated in corresponding tabs.
•Start via SSH - GDB Server on target is started by winIDEA over SSH communication protocol. In this case you will need to specify Application Path and SSH Connection parameters, which are described later in this chapter.
•Start simulator executable - GDB Server on target starts with the simulator
The SSH protocol (Secure Shell) is a method for secure remote login from one computer to another. It provides several alternative options for strong authentication and communication protection.
SSH connection is used to start GDB Server on the target from winIDEA remotely. Open SSH page to provide the connection details.
Port - Port number where SSH server is running on target (usually port 22).
User name - User that winIDEA will use to log in to target over SSH and start GDB Server. Selected user should have rights to start GDB Server and execute application on target.
Authentication - Method used for user authentication when winIDEA tries to login to target over SSH.
oNone - No authentication required.
oPassword - winIDEA will use password of a user when connecting to target over SSH. winIDEA will prompt for password when connecting to the target.
oPrivate key - winIDEA will use private key authentication when connecting to target over SSH. winIDEA will prompt for 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 path to private key file used for authentication.
If you haven't provided the Symbol File during configuration of a New Workspace, you should specify the Symbol File via Debug / Configure Session / Applications / Symbol Files. This step provides winIDEA the necessary information for source level debugging and provides the path to the debug symbols.
Note the executable will not be loaded to the target - it is only used to provide symbol information to winIDEA. |
Debugging with GDB Client. |
You should now be ready to debug your application with GDB. Perform a download to load the symbols in winIDEA and start the debug session on the target.
1. Open View / Workspace / Terminal.
2. Click Options button in the Terminal Window toolbar
3. Select Debugger option from the drop-down menu in the Terminal.
|
You should now be ready to debug your application with GDB. Perform a download to load the symbols in winIDEA and start the debug session on the target.
If application doesn’t stop at the application entry point after a reset or download, follow these steps:
1. Open Debug / Configure Session / SoCs.
2. In Startup enable Run until option and select the application entry point function by clicking ''...'' button.
3. Enable Perform these actions also after Debug / CPU Reset option.