[Line]
This page is not finished yet

About the SmartEiffel Debugger

The SmartEiffel debugger is an embedded debugger. It means that to use it, you must compile your application with the special command option -sedb. The generated executable is then equipped with the debugger, you just have to start it as you would without it.

The debugger offers many powerful commands, that let you look into the guts of your program:

Execution commands
Those commands are meant to make your program advance; either walk step by step, or by greater strides, or run until its end. Whatever command you choose, the program will run at most to the next breakpoint (
see below) or till you press ^C. The available commands are:
s Make a single step; if it involves entering into another routine (it's a feature call), then so be it.
n Make a single step, without entering into any other routine (it means that a feature call is seen as a single step).
f Stride to the end of the current routine.
c Run till the next breakpoint, or till the end.
Breakpoints
Note that the breakpoints in the code (marked by the pseudo-instruction sedb_breakpoint) are heeded; they work as manually-added breakpoints. Here are the commands to manage manually-added breakpoints:
b Add a breakpoint. There are many possibilities, among which you can choose a subset to define. All the criteria you choose must be met for the breakpoint to be activated.

The possible criteria are described below.

B Display all the manually-added breakpoints.
<num> Removes the breakpoint designed by its number (you can see that number by the 'B' command).

When setting a breakpoint, the possible criteria are:

Here is how sedb_breakpoint works:

The feature sedb_breakpoint defined in class GENERAL can be used to set a breakpoint directly in your Eiffel source file. Keep in mind that you must recompile your system each time some Eiffel source file is modified. Thus each time you add a sedb_breakpoint call to some Eiffel source file you must recompile your code first. Also note that a sedb_breakpoint is always enabled even when the corresponding source file is not traced (see ACE file mode).

Data display

The following commands allow you to look at the data of your program:

<exp> Evaluates and displays the result of an expression. Note that currently only object attributes can be displayed (general Eiffel expression are not supported).

What you can do is:

  • display either Current or any local variable or parameter of the current routine;
  • display any attribute of the above objects, using the standard Eiffel dotted expression (e.g. e my_string.count);
  • display any element of a NATIVE_ARRAY, using a special notation: a dot followed by the offset of the object you want to display (e.g. e my_string.storage.4);
  • recursively string dotted expressions (like in the above example, or even more complex expressions).
Note: the 'e' command is available since SmartEiffel 1.1 beta 3.
. Display the current frame.
u Up in the stack (go to the caller). Note that the 'e' expressions follow the "current frame" (you can display Current and so on of that frame).
d Down in the stack (go back to the callee). Note that the 'e' expressions follow the "current frame" (you can display Current and so on of that frame).
S Display the whole stack (compact mode or not).
Other commands
q Quits the debugger (the program will be stopped). You can use 'Q' to bypass the confirmation.
h Display some help. You can follow that 'h' by a second letter to have help on the following topics:
  • a: all topics
  • e: "executing" topic
  • b: "breakpoints" topic
  • d: "data-display" topic
  • m: "miscellaneous" topic
Note: you can use '?' instead of 'h'.
H Display some more help. Answer "yes" at each question if you want details.
G Run the Garbage Collector.
T Switch to the trace.se file mode.
Enter Repeat the last command.

[Line]
Copyright © Dominique COLNET and Suzanne COLLIN - <SmartEiffel@loria.fr>
Last modified: Thu May 1 17:58:51 CEST 2003