Sha256: 53ae28221ae57fead653aab130609d438eeeb3f829128f4cbd2dfa490bc96995

Contents?: true

Size: 1.61 KB

Versions: 14

Compression:

Stored size: 1.61 KB

Contents

gcd.rb:4
def gcd(a, b)
# # ********************************************************
# # This tests primarily the condition command.
# # In order to do this we need to run break, and disable
# # ********************************************************
# set debuggertesting on
Currently testing the debugger is on.
# set callstyle last
Frame call-display style is last.
# set autoeval off
autoeval is off.
# break 6 if a > b
Breakpoint 1 file ./gcd.rb, line 6
# info break 
Num Enb What
  1 y   at ./gcd.rb:6 if a > b
# condition 1
# info break 
Num Enb What
  1 y   at ./gcd.rb:6
# break 12
Breakpoint 2 file ./gcd.rb, line 12
# condition 2 1 == a
# # FIXME: should be able to catch error on:
# # condition 2 if 1 == a
# disable 1
# continue
Breakpoint 2 at gcd.rb:12
gcd.rb:12
if a == 1 or b-a == 0
# info break
Num Enb What
  1 n   at ./gcd.rb:6
  2 y   at ./gcd.rb:12 if 1 == a
	breakpoint already hit 1 time
# p a
1
# # Now test trying to enable an invalid breakpoint
# break 6 if a > 
Breakpoint 3 file ./gcd.rb, line 6
*** Expression "a > " syntactically incorrect; breakpoint disabled.
# info break
Num Enb What
  1 n   at ./gcd.rb:6
  2 y   at ./gcd.rb:12 if 1 == a
	breakpoint already hit 1 time
  3 n   at ./gcd.rb:6 if a > 
# enable 3
*** Expression "a > " syntactically incorrect; breakpoint remains disabled.
# info break
Num Enb What
  1 n   at ./gcd.rb:6
  2 y   at ./gcd.rb:12 if 1 == a
	breakpoint already hit 1 time
  3 n   at ./gcd.rb:6 if a > 
# condition 3 a > 5
# enable 3
# info break
Num Enb What
  1 n   at ./gcd.rb:6
  2 y   at ./gcd.rb:12 if 1 == a
	breakpoint already hit 1 time
  3 y   at ./gcd.rb:6 if a > 5
# quit

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
debugger-1.2.4 test/data/condition.right
debugger-1.2.3 test/data/condition.right
debugger-1.2.2 test/data/condition.right
debugger-1.2.1 test/data/condition.right
debugger-1.2.0 test/data/condition.right
debugger-1.1.4 test/data/condition.right
debugger-1.1.3 test/data/condition.right
debugger-1.1.2 test/data/condition.right
debugger-1.1.1 test/data/condition.right
debugger-1.1.0 test/data/condition.right
debugger-1.0.1 test/data/condition.right
debugger-1.0.0 test/data/condition.right
debugger-1.0.0.rc2 test/data/condition.right
debugger-1.0.0.rc1 test/data/condition.right