Difference between revisions of "Sedb"

From Liberty Eiffel Wiki
Jump to navigation Jump to search
 
m (s/LibertyEiffel/Liberty Eiffel/)
 
(24 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  +
[[Category: Tool]]
<div id="wiki1883" style="overflow:auto; height: 1px; ">
 
  +
The Liberty Eiffel debugger is an ''Embedded debugger''. This means that in order to use it, you need to compile your application with a special flag <TT>-sedb</TT>. The executable will then have the debugger inside, you can launch your application the usual way.
[[http://casino.888.web.com casino]]
 
[[http://online-casino.888.web.com online casino]]
 
[[http://casinos.888.web.com casinos]]
 
[[http://online-casinos.888.web.com online casinos]]
 
[[http://casino-games.888.web.com casino games]]
 
[[http://online-casino-gambling.888.web.com online casino gambling]]
 
[[http://casino-gambling.888.web.com casino gambling]]
 
[[http://internet-casino.888.web.com internet casino]]
 
[[http://casino-online.888.web.com casino online]]
 
[[http://casino-on-net.888.web.com casino on net]]
 
[[http://casino-gaming.888.web.com casino gaming]]
 
[[http://casino-gamble.888.web.com casino gamble]]
 
[[http://online-gambling.888.web.com online gambling]]
 
[[http://casino-bonus.888.web.com casino bonus]]
 
[[http://online-casino-bonus.888.web.com online casino bonus]]
 
[[http://internet-gambling.888.web.com internet gambling]]
 
[[http://blackjack.888.web.com blackjack]]
 
[[http://online-blackjack.888.web.com online blackjack]]
 
[[http://blackjack-online.888.web.com blackjack online]]
 
[[http://play-blackjack.888.web.com play blackjack]]
 
[[http://free-blackjack.888.web.com free blackjack]]
 
[[http://roulette.888.web.com roulette]]
 
[[http://online-roulette.888.web.com online roulette]]
 
[[http://casino-roulette.888.web.com casino roulette]]
 
[[http://play-roulette.888.web.com play roulette]]
 
[[http://roulette-online.888.web.com roulette online]]
 
[[http://free-roulette.888.web.com free roulette]]
 
[[http://roulette-wheel.888.web.com roulette wheel]]
 
[[http://slots.888.web.com slots]]
 
[[http://slot-machines.888.web.com slot machines]]
 
[[http://wheel-of-fortune.888.web.com wheel of fortune]]
 
[[http://online-slots.888.web.com online slots]]
 
[[http://free-slots.888.web.com free slots]]
 
[[http://play-slots.888.web.com play slots]]
 
[[http://casino-slot.888.web.com casino slot]]
 
[[http://craps.888.web.com craps]]
 
[[http://online-craps.888.web.com online craps]]
 
[[http://craps-online.888.web.com craps online]]
 
[[http://play-craps.888.web.com play craps]]
 
[[http://free-craps.888.web.com free craps]]
 
[[http://casino-craps.888.web.com casino craps]]
 
[[http://video-poker.888.web.com video poker]]
 
[[http://online-video-poker.888.web.com online video poker]]
 
[[http://play-video-poker.888.web.com play video poker]]
 
[[http://free-video-poker.888.web.com free video poker]]
 
[[http://internet-poker.888.web.com internet poker]]
 
[[http://keno.888.web.com keno]]
 
[[http://online-keno.888.web.com online keno]]
 
 
[[http://poker-rooms-casinos.pokera.web.com poker rooms casinos]]
 
[[http://texas-holdem.pokera.web.com texas holdem]]
 
[[http://world-series-of-poker.pokera.web.com world series of poker]]
 
[[http://free-online-poker.pokera.web.com free online poker]]
 
[[http://online-poker-rooms.pokera.web.com online poker rooms]]
 
[[http://poker-rooms.pokera.web.com poker rooms]]
 
[[http://pacific-poker.pokera.web.com pacific poker]]
 
[[http://empire-poker.pokera.web.com empire poker]]
 
[[http://party-poker.pokera.web.com party poker]]
 
[[http://poker-online.pokera.web.com poker online]]
 
[[http://online-poker.pokera.web.com online poker]]
 
[[http://free-poker.pokera.web.com free poker]]
 
[[http://poker.pokera.web.com poker]]
 
[[http://texas-holdem-poker.pokera.web.com texas holdem poker]]
 
[[http://texas-hold-em-poker.pokera.web.com texas hold em poker]]
 
[[http://free-texas-hold-em.pokera.web.com free texas hold em]]
 
[[http://poker-games.pokera.web.com poker games]]
 
[[http://free-texas-holdem.pokera.web.com free texas holdem]]
 
[[http://texas-holdem.pokera.web.com texas holdem]]
 
[[http://texas-hold-em.pokera.web.com texas hold em]]
 
[[http://online-texas-holdem.pokera.web.com online texas holdem]]
 
[[http://online-texas-hold-em.pokera.web.com online texas hold em]]
 
[[http://play-poker.pokera.web.com play poker]]
 
[[http://play-texas-holdem.pokera.web.com play texas holdem]]
 
 
[[http://www.play-online-casino.de.com/online-poker.html online poker]]
 
[[http://www.play-online-casino.de.com/blackjack.html blackjack]]
 
[[http://www.play-online-casino.de.com/roulette.html roulette]]
 
[[http://www.play-online-casino.de.com/online-slots.html online slots]]
 
[[http://www.play-online-casino.de.com/video-poker.html video poker]]
 
[[http://www.play-online-casino.de.com/keno.html keno]]
 
[[http://www.play-online-casino.de.com/craps.html craps]]
 
[[http://www.play-online-casino.de.com/caribbean-poker.html caribbean poker]]
 
[[http://www.play-online-casino.de.com/baccarat.html baccarat]]
 
[[http://www.play-online-casino.de.com/baccarat.html baccarat]]
 
 
[[http://casino.big.de.com casino]]
 
[[http://online-casino.big.de.com online casino]]
 
[[http://casinos.big.de.com casinos]]
 
[[http://online-casinos.big.de.com online casinos]]
 
[[http://casino-games.big.de.com casino games]]
 
[[http://online-casino-gambling.big.de.com online casino gambling]]
 
[[http://casino-gambling.big.de.com casino gambling]]
 
[[http://internet-casino.big.de.com internet casino]]
 
[[http://casino-online.big.de.com casino online]]
 
[[http://casino-on-net.big.de.com casino on net]]
 
[[http://casino-bonus.big.de.com casino bonus]]
 
[[http://888-casino.big.de.com 888 casino]]
 
[[http://888-pacific-poker.big.de.com 888 pacific poker]]
 
[[http://888-poker.big.de.com 888 poker]]
 
[[http://blackjack.big.de.com blackjack]]
 
[[http://roulette.big.de.com roulette]]
 
[[http://slots.big.de.com slots]]
 
[[http://craps.big.de.com craps]]
 
[[http://video-poker.big.de.com video poker]]
 
[[http://texas-holdem.big.de.com texas holdem]]
 
[[http://free-online-poker.big.de.com free online poker]]
 
[[http://poker-rooms.big.de.com poker rooms]]
 
[[http://pacific-poker.big.de.com pacific poker]]
 
[[http://empire-poker.big.de.com empire poker]]
 
[[http://party-poker.big.de.com party poker]]
 
[[http://poker-online.big.de.com poker online]]
 
[[http://online-poker.big.de.com online poker]]
 
[[http://free-poker.big.de.com free poker]]
 
[[http://poker.big.de.com poker]]
 
[[http://texas-holdem-poker.big.de.com texas holdem poker]]
 
[[http://poker-games.big.de.com poker games]]
 
[[http://free-texas-holdem.big.de.com free texas holdem]]
 
[[http://texas-holdem.big.de.com texas holdem]]
 
 
[[http://www.payday-loan.de.com/payday-loan.html payday loan]]
 
[[http://www.payday-loan.de.com/payday-loan-online.html payday loan online]]
 
[[http://www.payday-loan.de.com/online-payday-loan-no-faxing.html online payday loan no faxing]]
 
[[http://www.payday-loan.de.com/advance-cash-loan-online-payday.html advance cash loan online payday]]
 
[[http://www.payday-loan.de.com/fast-online-payday-loan.html fast online payday loan]]
 
[[http://www.payday-loan.de.com/online-no-fax-payday-loan.html online no fax payday loan]]
 
[[http://www.payday-loan.de.com/instant-online-payday-loan.html instant online payday loan]]
 
[[http://www.payday-loan.de.com/instant-payday-loan-completely-online.html instant payday loan completely online]]
 
[[http://www.payday-loan.de.com/100-loan-online-payday.html 100 loan online payday]]
 
[[http://www.payday-loan.de.com/easy-online-payday-loan.html easy online payday loan]]
 
[[http://www.payday-loan.de.com/advance-loan-online-payday.html advance loan online payday]]
 
[[http://www.payday-loan.de.com/cash-fast-loan-online-payday.html cash fast loan online payday]]
 
[[http://www.payday-loan.de.com/1000-online-payday-loan.html 1000 online payday loan]]
 
[[http://www.payday-loan.de.com/payday-loan-application-online.html payday loan application online]]
 
[[http://www.payday-loan.de.com/online-savings-account-payday-loan.html online savings account payday loan]]
 
[[http://www.payday-loan.de.com/online-payday-loan-instant-approval.html online payday loan instant approval]]
 
[[http://www.payday-loan.de.com/payday-loan-canada-online.html payday loan canada online]]
 
[[http://www.payday-loan.de.com/online-payday-cash-loan.html online payday cash loan]]
 
[[http://www.payday-loan.de.com/best-payday-loan-online.html best payday loan online]]
 
[[http://www.payday-loan.de.com/bad-credit-online-payday-loan.html bad credit online payday loan]]
 
[[http://www.payday-loan.de.com/loan-online-payday-quick.html loan online payday quick]]
 
[[http://www.payday-loan.de.com/cash-advance.html cash advance]]
 
[[http://www.payday-loan.de.com/cash-advance-loan.html cash advance loan]]
 
[[http://www.payday-loan.de.com/online-cash-advance.html online cash advance]]
 
[[http://www.payday-loan.de.com/payday-cash-advance.html payday cash advance]]
 
[[http://www.payday-loan.de.com/no-fax-cash-advance.html no fax cash advance]]
 
[[http://www.payday-loan.de.com/cash-advance-payday-loan.html cash advance payday loan]]
 
[[http://www.payday-loan.de.com/no-faxing-cash-advance.html no faxing cash advance]]
 
[[http://www.payday-loan.de.com/cash-advance-for-your-home.html cash advance for your home]]
 
[[http://www.payday-loan.de.com/instant-cash-advance.html instant cash advance]]
 
[[http://www.payday-loan.de.com/quick-cash-advance.html quick cash advance]]
 
[[http://www.payday-loan.de.com/fast-cash-advance.html fast cash advance]]
 
[[http://www.payday-loan.de.com/national-cash-advance.html national cash advance]]
 
[[http://www.payday-loan.de.com/cash-advance-america.html cash advance america]]
 
[[http://www.payday-loan.de.com/cash-advance-company.html cash advance company]]
 
[[http://www.payday-loan.de.com/cash-advance-now.html cash advance now]]
 
[[http://www.payday-loan.de.com/advance-america-cash-advance.html advance america cash advance]]
 
[[http://www.payday-loan.de.com/cash-in-advance.html cash in advance]]
 
</div>
 
 
 
[[Category:Book]]
 
 
 
The SmartEiffel debugger is an ''Embedded debugger''. This means that, in order to use it, you need to compile your application with a special flag <TT>-sedb</TT>. The executable will then have the debugger inside, you can launch your application the usual way.
 
   
 
Note: <TT>sedb</TT> is only available with [[compile_to_c]] (or [[compile]]).
 
Note: <TT>sedb</TT> is only available with [[compile_to_c]] (or [[compile]]).
Line 179: Line 16:
 
Whatever your choice is, the program will run until the next breakpoint (see below), or until the next <TT>^C</TT>.
 
Whatever your choice is, the program will run until the next breakpoint (see below), or until the next <TT>^C</TT>.
   
The available commands are (by increasing order of step size):
+
The available commands are (in increasing order of step size):
   
 
{|
 
{|
 
|-
 
|-
| <TT>s</TT>&nbsp;
+
|valign="top"| <TT>s</TT>&nbsp;
| Move only one ''step'' forward. This means entering a routine if it is a [[Glossary#Feature|feature]] call.
+
| Move only one ''step'' forward. This means entering a routine if the step is a [[Glossary#Feature|feature]] call.
 
|-
 
|-
| <TT>n</TT>&nbsp;
+
|valign="top"| <TT>n</TT>&nbsp;
| Move only one step forward (next), but without entering a routine (this means that a [[Glossary#Feature|feature]] call is considered being one step).
+
| Move only one step forward (next), but without entering a routine (this means that a [[Glossary#Feature|feature]] call is considered as one step).
 
|-
 
|-
| <TT>f</TT>&nbsp;
+
|valign="top"| <TT>f</TT>&nbsp;
 
| Move to the next routine return (finish).
 
| Move to the next routine return (finish).
 
|-
 
|-
| <TT>c</TT>&nbsp;
+
|valign="top"| <TT>c</TT>&nbsp;
| Move as far as possible (continue), so maybe until the end of the program.
+
| Move as far as possible (continue), perhaps even to the end of the program.
 
|-
 
|-
| <TT>C</TT>&nbsp;
+
|valign="top"| <TT>C</TT>&nbsp;
| Continue until the end of the program, ignoring all breakpoints (static and dynamic ones).
+
| Continue until the end of the program, ignoring all breakpoints (whether static or dynamic).
 
|}
 
|}
   
Line 207: Line 44:
 
{|
 
{|
 
|-
 
|-
| <TT>b</TT>&nbsp;
+
|valign="top"| <TT>b</TT>&nbsp;
 
| Add a dynamic breakpoint. There are many possible criteria, described below. All chosen criteria must be valid to activate the breakpoint.
 
| Add a dynamic breakpoint. There are many possible criteria, described below. All chosen criteria must be valid to activate the breakpoint.
 
|-
 
|-
| <TT>B</TT>&nbsp;
+
|valign="top"| <TT>B</TT>&nbsp;
| Print all dynamical breakpoints.
+
| Print all dynamic breakpoints.
 
|-
 
|-
| <TT>-&lt;num&gt;</TT>&nbsp;
+
|valign="top"| <TT>-&lt;num&gt;</TT>&nbsp;
| Remove a dynamic breakpoint designed by its number. The numbers are printed by the <TT>B</TT> command.
+
| Remove a dynamic breakpoint designated by its number. The numbers are printed by the <TT>B</TT> command.
 
|}
 
|}
   
Line 225: Line 62:
 
=== Specifications of a dynamic breakpoint ===
 
=== Specifications of a dynamic breakpoint ===
   
To set up a dynamic breakpoint, you are able to specify one or more criteria.
+
To set up a dynamic breakpoint, you can specify one or more criteria.
* '''Name''': the name of the method and the class name in which the method is defined, separated by a space, for example <TT>"item STRING"</TT>. You can specify a substring of this name. Thus, if you specify <TT>item</TT> then the program will stop at the beginning of the <TT>item</TT> method of [[library_class:STRING|<TT>STRING</TT>]], but also at the beginning of the one in [[library_class:ARRAY|<TT>ARRAY</TT>]], etc. Similarly, if you specify <TT>STRING</TT> then the program will stop when encountering any method of [[library_class:STRING|<TT>STRING</TT>]], but also of [[library_class:HASHED_DICTIONARY|<TT>HASHED_DICTIONARY</TT>]]<TT>[</TT>[[library_class:STRING|<TT>STRING</TT>]]<TT>, </TT>[[library_class:INTEGER|<TT>INTEGER</TT>]]<TT>]</TT>. You can even be original: I let you guess the behaviour of the <TT>is_</TT> specification :-)
+
* '''Name''': the name of the method and the class name in which the method is defined, separated by a space, for example <TT>"item STRING"</TT>. You can specify a substring of this name. Thus, if you specify <TT>item</TT>, the program will stop at the beginning of the <TT>item</TT> method of [[library_class:STRING|<TT>STRING</TT>]], but also at the beginning of the one in [[library_class:ARRAY|<TT>ARRAY</TT>]], etc. Similarly, if you specify <TT>STRING</TT>, the program will stop when encountering any method of [[library_class:STRING|<TT>STRING</TT>]], but also of [[library_class:HASHED_DICTIONARY|<TT>HASHED_DICTIONARY</TT>]]<TT>[</TT>[[library_class:STRING|<TT>STRING</TT>]]<TT>, </TT>[[library_class:INTEGER|<TT>INTEGER</TT>]]<TT>]</TT>. You can even be original: I will let you guess the behaviour of the <TT>is_</TT> specification :-)
* '''File''': for example, <TT>string.e</TT>. As the file name is applied to the complete path, you can specify <TT>lib/kernel</TT> which will stop at all the methods in the classes of this cluster.
+
* '''File''': for example, <TT>string.e</TT>. As the file name is applied to the complete path, you can specify <TT>lib/kernel</TT> which will stop at all the methods in the classes of that cluster.
* '''Line numbers''': you can specify an interval of lines, for example <TT>[12,13]</TT>.
+
* '''Line numbers''': you can specify a range of lines, for example <TT>[12,13]</TT>.
* '''Execution stack''': this condition allows to track the size of the execution stack (useful for debugging a recursive function for example). For example, you can specify the limit of the stack size to <TT>10</TT>, which will stop the execution when the stack size reaches 10. An optional automatic increment permits the limit to be incremented each time the breakpoint is reached. If you don't use this option, this breakpoint can be good way of track the memory consumption of the stack.
+
* '''Execution stack''': this condition lets you track the size of the execution stack (useful for debugging a recursive function, for example). For instance, you can specify a stack size limit of <TT>10</TT>, which will stop the execution when the stack size reaches 10. An optional automatic increment permits the limit to be incremented each time the breakpoint is reached. If you don't use this option, this breakpoint can be a good way to track the stack's memory consumption.
   
Of course, all these specifications are cumulative: in this case, they must all be true at the same time to activate the breakpoint.
+
Of course, all these specifications are cumulative: they must all be true at the same time to activate the breakpoint.
   
 
== Data printing ==
 
== Data printing ==
Line 239: Line 76:
 
{|
 
{|
 
|-
 
|-
| <TT>e&nbsp;&lt;exp&gt;</TT>&nbsp;
+
|valign="top"| <TT>e&nbsp;&lt;exp&gt;</TT>&nbsp;
 
| Evaluates and prints the result of an expression. '''Note that''' the general Eiffel expressions are not supported.
 
| Evaluates and prints the result of an expression. '''Note that''' the general Eiffel expressions are not supported.
 
|-
 
|-
Line 247: Line 84:
 
* local variables
 
* local variables
 
* a parameter of the current routine
 
* a parameter of the current routine
* the content of the case of a [[library_class:NATIVE_ARRAY|<TT>NATIVE_ARRAY</TT>]] and suffixing by a dot one of its index beginning at zero (for example <TT>storage.2</TT> prints the ''third'' element of <TT>storage</TT>)
+
* the content of an instance of a [[library_class:NATIVE_ARRAY|<TT>NATIVE_ARRAY</TT>]]; suffixing the attribute name with a dot and an index beginning at zero prints the contents of the specified array element. For example <TT>storage.2</TT> prints the ''third'' element of <TT>storage</TT>.
 
* the attributes of these objects, by using the classical notation with dots (for example <TT>my_string.count</TT> or <TT>my_string.storage.4</TT>), recursively
 
* the attributes of these objects, by using the classical notation with dots (for example <TT>my_string.count</TT> or <TT>my_string.storage.4</TT>), recursively
* the result of [[Syntax_diagrams#RoutineBody|<TT>once</TT> functions]] at the condition that they have already been evaluated (i.e. the debugger does not procede to the function call; it only checks the result)
+
* the result of [[Syntax_diagrams#RoutineBody|<TT>once</TT> functions]], provided that they have already been evaluated (i.e. the debugger does not execute the function call; it only checks the result)
 
|-
 
|-
| <TT>p</TT>
+
|valign="top"| <TT>p</TT>
   
 
<TT>p&nbsp;&lt;exp&gt;</TT>&nbsp;
 
<TT>p&nbsp;&lt;exp&gt;</TT>&nbsp;
| Re-evalutes the same expression by suffixing a dot and the expression (if present). This is very useful to chain printing. You can also use the particular expression <TT>..</TT> which goes one level up, <TT>....</TT> which goes two levels up, etc.
+
| Re-evaluates the last expression by suffixing a dot and the expression <TT>&lt;exp&gt;</TT> (if present). This is very useful for chain printing. Instead of a single dot you can also use the notation <TT>..</TT> which goes one level up, <TT>....</TT> which goes two levels up, etc.
 
|-
 
|-
 
|
 
|
Line 278: Line 115:
 
sedb>
 
sedb>
 
|-
 
|-
| <TT>.</TT>&nbsp;
+
|valign="top"| <TT>.</TT>&nbsp;
| Print the current frame; that is the content of local variables of the current routine.
+
| Print the current frame; that is the content of the local variables of the current routine.
 
|-
 
|-
| <TT>u</TT>&nbsp;
+
|valign="top"| <TT>u</TT>&nbsp;
| Goes up in the stack (i.e. goes to the caller). This means that the ''current routine'' becomes the calling routine. Note that the <TT>e</TT>, <TT>p</TT> and <TT>.</TT> commands follow the current routine.
+
| Goes up in the stack (i.e. goes to the caller). This means that the calling routine becomes the ''current routine''. Note that the <TT>e</TT>, <TT>p</TT> and <TT>.</TT> commands follow the current routine.
 
|-
 
|-
| <TT>d</TT>&nbsp;
+
|valign="top"| <TT>d</TT>&nbsp;
 
| Goes down in the stack (opposite of <TT>u</TT>).
 
| Goes down in the stack (opposite of <TT>u</TT>).
 
|-
 
|-
| <TT>S</TT>&nbsp;
+
|valign="top"| <TT>S</TT>&nbsp;
 
| Prints the execution stack. There are two printing modes:
 
| Prints the execution stack. There are two printing modes:
 
* compact mode which only prints the name of the file and executed routine; an asterisk indicates the current routine
 
* compact mode which only prints the name of the file and executed routine; an asterisk indicates the current routine
Line 297: Line 134:
 
{|
 
{|
 
|-
 
|-
| <TT>q</TT>&nbsp;
+
|valign="top"| <TT>q</TT>&nbsp;
| Quits the debugger; the programm will be stopped. You can also use <TT>Q</TT> which doesn't ask for confirmation.
+
| Quits the debugger; the program will be stopped. You can also use <TT>Q</TT> which doesn't ask for confirmation.
 
|-
 
|-
| <TT>h</TT>
+
|valign="top"| <TT>h</TT>
   
 
<TT>?</TT>&nbsp;
 
<TT>?</TT>&nbsp;
 
| Prints help.
 
| Prints help.
 
|-
 
|-
| <TT>H</TT>&nbsp;
+
|valign="top"| <TT>H</TT>&nbsp;
 
| Prints detailed help.
 
| Prints detailed help.
 
|-
 
|-
| <TT>G</TT>&nbsp;
+
|valign="top"| <TT>G</TT>&nbsp;
| Runs the [[GarbageCollector|garbage collector]], if it's present.
+
| Runs the [[Garbage_collector|garbage collector]], if it is present.
 
|-
 
|-
| <TT>T</TT>&nbsp;
+
|valign="top"| <TT>T</TT>&nbsp;
| Changes the trace mode, if it's present (flag <TT>-trace</TT> when compiling). If the mode is active, the file <TT>trace.se</TT> fills up (very quickly!)
+
| Changes the trace mode, if it is present (flag <TT>-trace</TT> when compiling). If the mode is active, the file <TT>trace.se</TT> fills up (very quickly!)
 
|-
 
|-
| ''Return''&nbsp;
+
|valign="top"| ''Return''&nbsp;
 
| Re-executes the last command.
 
| Re-executes the last command.
 
|}
 
|}

Latest revision as of 20:48, 26 June 2016

The Liberty Eiffel debugger is an Embedded debugger. This means that in order to use it, you need to compile your application with a special flag -sedb. The executable will then have the debugger inside, you can launch your application the usual way.

Note: sedb is only available with compile_to_c (or compile).

The debugger offers powerful commands which allows you to examine the bowels of your program:

  • commands to control execution,
  • commands to set or unset breakpoints,
  • commands to print your data,
  • other various commands.

Execution control

These commands allow your program to execute. You can either run step by step or make bigger strides, or even force execution until the end.

Whatever your choice is, the program will run until the next breakpoint (see below), or until the next ^C.

The available commands are (in increasing order of step size):

s  Move only one step forward. This means entering a routine if the step is a feature call.
n  Move only one step forward (next), but without entering a routine (this means that a feature call is considered as one step).
f  Move to the next routine return (finish).
c  Move as far as possible (continue), perhaps even to the end of the program.
C  Continue until the end of the program, ignoring all breakpoints (whether static or dynamic).

Breakpoints

There are two kinds of breakpoints:

  • those explicitly placed in the code, with the instruction sedb_breakpoint,
  • those dynamically placed in the debugger. To modify dynamic breakpoints, you can use the following commands:
b  Add a dynamic breakpoint. There are many possible criteria, described below. All chosen criteria must be valid to activate the breakpoint.
B  Print all dynamic breakpoints.
-<num>  Remove a dynamic breakpoint designated by its number. The numbers are printed by the B command.

The sedb_breakpoint instruction

The sedb_breakpoint instruction is defined in ANY. It places a static breakpoint directly in the Eiffel source. This command does nothing if the program is not compiled with the -sedb flag.

These breakpoints cannot be removed by the -<num> command. The only way to ignore them is to use the C command (continue until the end of the program).

Specifications of a dynamic breakpoint

To set up a dynamic breakpoint, you can specify one or more criteria.

  • Name: the name of the method and the class name in which the method is defined, separated by a space, for example "item STRING". You can specify a substring of this name. Thus, if you specify item, the program will stop at the beginning of the item method of STRING, but also at the beginning of the one in ARRAY, etc. Similarly, if you specify STRING, the program will stop when encountering any method of STRING, but also of HASHED_DICTIONARY[STRING, INTEGER]. You can even be original: I will let you guess the behaviour of the is_ specification :-)
  • File: for example, string.e. As the file name is applied to the complete path, you can specify lib/kernel which will stop at all the methods in the classes of that cluster.
  • Line numbers: you can specify a range of lines, for example [12,13].
  • Execution stack: this condition lets you track the size of the execution stack (useful for debugging a recursive function, for example). For instance, you can specify a stack size limit of 10, which will stop the execution when the stack size reaches 10. An optional automatic increment permits the limit to be incremented each time the breakpoint is reached. If you don't use this option, this breakpoint can be a good way to track the stack's memory consumption.

Of course, all these specifications are cumulative: they must all be true at the same time to activate the breakpoint.

Data printing

The following commands allow to print the data of your program:

e <exp>  Evaluates and prints the result of an expression. Note that the general Eiffel expressions are not supported.
Only the following can be printed:
  • Current
  • local variables
  • a parameter of the current routine
  • the content of an instance of a NATIVE_ARRAY; suffixing the attribute name with a dot and an index beginning at zero prints the contents of the specified array element. For example storage.2 prints the third element of storage.
  • the attributes of these objects, by using the classical notation with dots (for example my_string.count or my_string.storage.4), recursively
  • the result of once functions, provided that they have already been evaluated (i.e. the debugger does not execute the function call; it only checks the result)
p

p <exp> 

Re-evaluates the last expression by suffixing a dot and the expression <exp> (if present). This is very useful for chain printing. Instead of a single dot you can also use the notation .. which goes one level up, .... which goes two levels up, etc.
Example of the use of e and p :
sedb> e Current
STD_OUTPUT#0x807ab00
        [ filter = Void
          buffer_position = 0
          buffer = NATIVE_ARRAY[CHARACTER]#0x806c030
          capacity = 4096
        ]
sedb> e buffer
NATIVE_ARRAY[CHARACTER]#0x806c030
sedb> p.0
(sedb) e buffer.0
'H'
sedb> p..1
(sedb) e buffer.1
'e'
sedb> p....buffer_position
(sedb) e buffer_position
0
sedb>
.  Print the current frame; that is the content of the local variables of the current routine.
u  Goes up in the stack (i.e. goes to the caller). This means that the calling routine becomes the current routine. Note that the e, p and . commands follow the current routine.
d  Goes down in the stack (opposite of u).
S  Prints the execution stack. There are two printing modes:
  • compact mode which only prints the name of the file and executed routine; an asterisk indicates the current routine
  • complete mode which prints the entire stack, with all frames (as the printed stack when a program crashes outside sedb).

Various commands

q  Quits the debugger; the program will be stopped. You can also use Q which doesn't ask for confirmation.
h

? 

Prints help.
H  Prints detailed help.
G  Runs the garbage collector, if it is present.
T  Changes the trace mode, if it is present (flag -trace when compiling). If the mode is active, the file trace.se fills up (very quickly!)
Return  Re-executes the last command.