This page is not finished yet
|
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 |
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 |
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:
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:
e <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:
Note: the 'e' command is available since SmartEiffel 1.1 beta 3.
- 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).
. 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: Note: you can use '?' instead of 'h'.
- a: all topics
- e: "executing" topic
- b: "breakpoints" topic
- d: "data-display" topic
- m: "miscellaneous" topic
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.
Copyright © Dominique COLNET and Suzanne COLLIN -
<SmartEiffel@loria.fr>
Last modified: Thu May 1 17:58:51 CEST 2003