/src/tools/interpreter/debugger/liberty_interpreter_debugger_steps.e
http://github.com/tybor/Liberty · Specman e · 89 lines · 63 code · 12 blank · 14 comment · 6 complexity · 1e2d97e8124b5a131a516eea70305297 MD5 · raw file
- -- This file is part of Liberty Eiffel.
- --
- -- Liberty Eiffel is free software: you can redistribute it and/or modify
- -- it under the terms of the GNU General Public License as published by
- -- the Free Software Foundation, version 3 of the License.
- --
- -- Liberty Eiffel is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warranty of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>.
- --
- class LIBERTY_INTERPRETER_DEBUGGER_STEPS
- create {LIBERTY_INTERPRETER_DEBUGGER}
- make
- feature {LIBERTY_INTERPRETER}
- after (a_count: like count) is
- require
- a_count > 0
- do
- count := a_count
- ensure
- count = a_count
- end
- at_call_entry is
- do
- count := entry_count
- ensure
- count = entry_count
- end
- at_call_exit is
- do
- count := exit_count
- ensure
- count = exit_count
- end
- step is
- do
- if count > 0 then
- count := count - 1
- if count = 0 then
- interpreter.break
- end
- end
- end
- feature {LIBERTY_INTERPRETER_FEATURE_CALL}
- enter_call is
- do
- if count = entry_count then
- interpreter.break
- end
- end
- exit_call is
- do
- if count = exit_count then
- interpreter.break
- end
- end
- feature {}
- make (a_interpreter: like interpreter) is
- require
- a_interpreter /= Void
- do
- interpreter := a_interpreter
- ensure
- interpreter = a_interpreter
- end
- interpreter: LIBERTY_INTERPRETER
- count: INTEGER
- entry_count: INTEGER is -13
- exit_count: INTEGER is -31
- invariant
- interpreter /= Void
- count >= 0 or else count = entry_count or else count = exit_count
- end -- class LIBERTY_INTERPRETER_DEBUGGER_STEPS