File: sedb.txt

package info (click to toggle)
smarteiffel 1.1-11
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 12,288 kB
  • ctags: 40,785
  • sloc: ansic: 35,791; lisp: 4,036; sh: 1,783; java: 895; ruby: 613; python: 209; makefile: 115; csh: 78; cpp: 50
file content (158 lines) | stat: -rw-r--r-- 8,003 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
                                   [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:
     * commands that control [1]the execution,
     * commands that set or reset [2]breakpoints,
     * commands that allow to [3]display data,
     * and some [4]other commands.

   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 ([5]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:
     * Name  indication:  The  name  information  of  the debugging stack
       contains  information about the name of the routine called as well
       as  the  base  class  where  this  routine  is  defined.  The name
       indication  of  the breakpoint can be any substring to be searched
       within the name information of the stack. For example, if the name
       indication  is "item", the execution would stop in feature item of
       STRING  but  also  in  feature  item  of ARRAY, in feature item of
       DICTIONARY,   etc.  If  the  name  indication  is  "item  STRING",
       execution would stop only in routine item defined in class STRING.
       Also  note  that  the  name  indication  can be any substring. For
       example, if the name indication is "is_", the execution would stop
       in  is_empty, is_integer, is_real, etc. As another example, if the
       name  indication  is "STRI", the execution would stop at any place
       in  classes  STRING,  ARRAY[STRING],  DICTIONARY[STRING,FOO], etc.
       Finally,  also  note  that the "invariant" string is used when the
       execution  is in the class invariant of some class, hence allowing
       you to spot all class invariant execution.
     * File  indication:  If  you  want  to  stop each time the execution
       reaches  the  string.e  file  class,  it can be achieved easily by
       setting  the  file indication to "string.e". Because the file name
       indication  is  applied  on  the  whole path of the file, the file
       indication  allows you to filter more than a simple file name. For
       example,  if  the  file  indication is "lib/kernel", the execution
       would  stop  each  time  execution reaches some code in the kernel
       cluster of the SmartEiffel library.
     * Line  range:  The  line range information allows you to select the
       line  range  to  be  considered.  For  example,  to stop each time
       execution  reaches  line 12 or 13 in some file, just enter [12,13]
       as a line range.
     * Stack  limit:  The  stack  limit condition allows you to watch the
       stack  size  during  execution.  (This  is  useful  to  debug  bad
       recursive  calls.) For example, a stack limit of 10 would stop the
       execution  as  soon  as  the stack size reaches this 10 limit. The
       automatic  incrementation  option  causes  the  stack-limit  to be
       incremented  each  time  the  corresponding  breakpoint matches. A
       breakpoint  composed  only  of a single stack limit condition is a
       perfect watch dog of stack memory consumption.

   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:

 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:
           * 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 -
                         [6]<SmartEiffel@loria.fr>
                Last modified: Thu May 1 17:58:51 CEST 2003

References

   1. file://localhost/users/miro/colnet/SmartEiffel/man/sedb.html#execution
   2. file://localhost/users/miro/colnet/SmartEiffel/man/sedb.html#breakpoints
   3. file://localhost/users/miro/colnet/SmartEiffel/man/sedb.html#data-display
   4. file://localhost/users/miro/colnet/SmartEiffel/man/sedb.html#other
   5. file://localhost/users/miro/colnet/SmartEiffel/man/sedb.html#breakpoints
   6. mailto:SmartEiffel@loria.fr