Previous Up Next

Chapter 8  Epeire

8.1  Introduction

Epeire is a graphical interface to the OCaml debugger, ocamldebug.

Its main features are:

8.2  Invocation

To launch Epeire, use the following command:
epeire [options] [-- program [arguments]]
options are detailed below, program is the name of the program to debug, and arguments are its command line arguments.

By default, Epeire uses the $HOME/.epeirerc configuration file to store options, including the program name and its arguments. So you don't have to give the program name and its arguments if they are already in the configuration file.

A configuration file different from the default one can be specified with the -c option. Other options are:
-I <dir>
Add <dir> to the list of include directories, to search for source files.
-history_size <int>
Set the number of times to keep in the history (default is 30).
-checkpoints_on <true|false>
Select whether the debugger makes checkpoints or not (default is true).
-max_checkpoints_count <int>
Set the maximum number of simultaneously live checkpoints (default is 15).
-checkpoints_big_step <int>
Set the number of events between two checkpoints for long displacements (default is 10000).
-checkpoints_small_step <int>
Set the number of events between two checkpoints for small displacements (default is 1000).
Other options can be set with the File/Settings menu. They are automatically saved in the configuration file (the default one or the one specified by the -c option).

8.3  Using Epeire

See the ocamldebug manual, in the OCaml user manual, for an explanation on using the debugger. The graphical interface should be quite intuitive, but here are some hints.

You can show or hide the various windows, either from the configuration window of with the Display menu.

The console can be shown to type commands like in the ocamldebug tool. You type commands in the entry widget, at the bottom of the console and the result appears in the text widget above. You can use the up and down arrows to walk through the history of commands (even the commands launched from menus or by clicking on buttons).

You can record your commands, using the Misc/Record menu. Use the Misc/Stop recording menu to save your recorded commands in a file. You can execute recorded commands with the Misc/Play menu, which lets you select a file from where commands are read. Adding and removing an identificator in the list of identificators (in the value inspector window) are also recorded and played.

The value inspector window lets you add identificators whose value and type will be always displayed for the current time or stack frame. Use the 'Add' and 'Remove' buttons to add or remove an identificator to the list. You can also click on an identificator in the code window to add it to the list. When an identificator is unbound for the current time, no value is displayed. In the list of identificators, you can double-click on an identificator to browse its value at the current time, in a tree-oriented view. A click on the right button opens a menu to print its type and value or browse its value.

The breakpoints window displays the list of breakpoints. You can add a breakpoint The buttons 'Show' and 'Remove' in the breakpoints window lets you respectively show the code where the breakpoint is located and remove a breakpoint.

The call stack window lets you see the current call stack. The 'Show' and 'Select' buttons lets you respectively show the code corresponding to the selected stack frame and select the stack frame to show the values at this frame.

The code window shows the various files, and hilight the line corresponding to the current time or stack frame. From this window you can add breakpoints and add identificators to the list in the value inspector window, as explained above. If a file is not open and you want to see it, for example to add a breakpoint in it, you can open it with the File/Open source file... menu. Then you select a module and the source file of this module is open in the code window.

The Execution menu offers the commands to run the program. The Program management menu gives access to some commands to load and kill the program, and lets you selects the loading mode. Again, see the ocamldebug manual for more information.


Previous Up Next