Previous: Customizing the Debugger, Up: Debugging


11.9 Upgrading from GVD to GPS

This section is intended for users already familiar with GVD, in order to help them transitioning to GPS. If you have not used GVD, you may want to skip this section.

This section outlines the differences between GVD and GPS, and also lists some of the advantages of GPS compared to GVD.

11.9.1 Command Line Switches

The following command line switches related to debugging are available in GPS:

--debug
Automatically start a debug session, as done by GVD. You can also specify a program name and its arguments, so this option replaces the --pargs and executable-file arguments in GVD.
--debugger
Equivalent to the same GVD option, with the difference that arguments can be specified as well, replacing the --dargs option.
--target
Same as in GVD.

For example, the equivalent of the following command line using a sh-like shell would be:

     $ gvd --debugger=gdb-5 executable --pargs 1 2 3

would be

     $ gps --debug="executable 1 2 3" --debugger=gdb-5
--traceon=GVD.OUT
This switch replaces the –log-level=4 option that was used to get the full log of the communications between GVD and the underlying debugger.

11.9.2 Menu Items

All the debugger-related menus in GVD can be found under the 'Debug' menu in GPS, with the following mapping:

File->xxx
available under Debug->Debug->xxx
Program->xxx
available under Debug->xxx
Data->xxx
available under Debug->Data->xxx

The menu File->New Debugger... is replaced by the combination of the menu Debug->Initialize and the project properties, available under Project->Edit Project Properties where you can similarly specify your Debugger Host (called Tools Host), your Program Host, the Protocol used by the underlying debugger to communicate with the target, and the name of the debugger. To conveniently switch between multiple debugger configurations, we recommend to use a scenario variable and set different properties based on the value of this variable. See Scenarios and Configuration Variables and Working in a Cross Environment for more details.

11.9.3 Tool Bar Buttons

GPS provides by default fewer debugger buttons than GVD, because some buttons are actually not used very often, and others have been merged. In addition, it will be possible in the future to completely configure the GPS tool bar.

Run
Menu Debug->Run... (<F2>)
Start
Start/Continue button
Step
Step button
Stepi
Menu Debug->Step Instruction (<Shift-F5>)
Next
Next button
Nexti
Menu Debug->Next Instruction (<Shift-F6>)
Finish
Finish button
Cont
Start/Continue button
Up
Up button
Down
Down button
Interrupt
Menu Debug->Interrupt (<Control-Backslash>)

11.9.4 Key Short Cuts

The same key shortcuts have been kept by default between GVD and GPS except for the Interrupt menu, which is now <Control-Backslash> instead of <Esc>.

11.9.5 Contextual Menus

All the debugger-related contextual menus can now be found under the Debug sub-menu.

The only difference is the contextual menu Show used to display the assembly dump of the current code. It is replaced by the menu Debug->Data->Assembly, see The Assembly Window for more details.

11.9.6 File Explorer

The file explorer provided in GVD is replaced by the Project View and the File View in GPS.

When using the --debug command line switch and no explicit project file, GPS will automatically create a project file in a way very similar to what GVD does to display its file explorer, and available under the Project View.

In addition, the File View gives access to any file in your file system, even if it is not available as part of the debug information.

11.9.7 Advantages of GPS

The advantages when using GPS instead of GVD can be classified in two main categories: when not using project files, and when using them.

When not using project files, you get access to the following advantages in GPS:

When using project files, you will get, in addition to the advantages listed above: