debugger 1.2.4 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (241) hide show
  1. data/.gitignore +14 -0
  2. data/.travis.yml +0 -1
  3. data/CHANGELOG.md +9 -0
  4. data/Gemfile +3 -0
  5. data/README.md +2 -0
  6. data/Rakefile +3 -55
  7. data/debugger.gemspec +2 -0
  8. data/lib/debugger/version.rb +1 -1
  9. data/lib/ruby-debug-base.rb +3 -1
  10. data/lib/ruby-debug/commands/irb.rb +1 -1
  11. data/lib/ruby-debug/commands/jump.rb +1 -1
  12. data/lib/ruby-debug/commands/method.rb +1 -1
  13. data/lib/ruby-debug/commands/show.rb +1 -1
  14. data/lib/ruby-debug/commands/trace.rb +2 -2
  15. data/lib/ruby-debug/commands/variables.rb +3 -3
  16. data/test/breakpoints_test.rb +365 -0
  17. data/test/conditions_test.rb +76 -0
  18. data/test/continue_test.rb +28 -0
  19. data/test/display_test.rb +141 -0
  20. data/test/edit_test.rb +55 -0
  21. data/test/eval_test.rb +92 -0
  22. data/test/examples/breakpoint1.rb +15 -0
  23. data/test/examples/breakpoint2.rb +7 -0
  24. data/test/examples/conditions.rb +4 -0
  25. data/test/examples/continue.rb +4 -0
  26. data/test/examples/display.rb +5 -0
  27. data/test/examples/edit.rb +3 -0
  28. data/test/examples/edit2.rb +3 -0
  29. data/test/examples/eval.rb +4 -0
  30. data/test/examples/finish.rb +20 -0
  31. data/test/examples/frame.rb +31 -0
  32. data/test/examples/help.rb +2 -0
  33. data/test/examples/info.rb +48 -0
  34. data/test/examples/info2.rb +3 -0
  35. data/test/examples/irb.rb +6 -0
  36. data/test/examples/jump.rb +14 -0
  37. data/test/examples/kill.rb +2 -0
  38. data/test/examples/list.rb +12 -0
  39. data/test/examples/method.rb +15 -0
  40. data/test/examples/post_mortem.rb +19 -0
  41. data/test/examples/quit.rb +2 -0
  42. data/test/examples/reload.rb +6 -0
  43. data/test/examples/restart.rb +6 -0
  44. data/test/examples/save.rb +3 -0
  45. data/test/examples/set.rb +3 -0
  46. data/test/examples/set_annotate.rb +12 -0
  47. data/test/examples/settings.rb +1 -0
  48. data/test/examples/show.rb +2 -0
  49. data/test/examples/source.rb +3 -0
  50. data/test/examples/stepping.rb +21 -0
  51. data/test/examples/thread.rb +32 -0
  52. data/test/examples/tmate.rb +10 -0
  53. data/test/examples/trace.rb +7 -0
  54. data/test/examples/trace_threads.rb +20 -0
  55. data/test/examples/variables.rb +26 -0
  56. data/test/finish_test.rb +48 -0
  57. data/test/frame_test.rb +140 -0
  58. data/test/help_test.rb +50 -0
  59. data/test/info_test.rb +325 -0
  60. data/test/irb_test.rb +81 -0
  61. data/test/jump_test.rb +70 -0
  62. data/test/kill_test.rb +47 -0
  63. data/test/list_test.rb +145 -0
  64. data/test/method_test.rb +70 -0
  65. data/test/post_mortem_test.rb +25 -0
  66. data/test/quit_test.rb +55 -0
  67. data/test/reload_test.rb +43 -0
  68. data/test/restart_test.rb +143 -0
  69. data/test/save_test.rb +92 -0
  70. data/test/set_test.rb +163 -0
  71. data/test/show_test.rb +292 -0
  72. data/test/source_test.rb +44 -0
  73. data/test/stepping_test.rb +118 -0
  74. data/test/support/breakpoint.rb +12 -0
  75. data/test/support/context.rb +14 -0
  76. data/test/support/matchers.rb +67 -0
  77. data/test/support/mocha_extensions.rb +71 -0
  78. data/test/support/processor.rb +7 -0
  79. data/test/support/test_dsl.rb +205 -0
  80. data/test/support/test_interface.rb +66 -0
  81. data/test/test_helper.rb +8 -0
  82. data/test/thread_test.rb +122 -0
  83. data/test/tmate_test.rb +43 -0
  84. data/test/trace_test.rb +154 -0
  85. data/test/variables_test.rb +114 -0
  86. metadata +107 -158
  87. data/test/base/base.rb +0 -71
  88. data/test/base/binding.rb +0 -24
  89. data/test/base/catchpoint.rb +0 -22
  90. data/test/base/load.rb +0 -36
  91. data/test/bp_loop_issue.rb +0 -3
  92. data/test/classes.rb +0 -11
  93. data/test/config.yaml +0 -8
  94. data/test/data/annotate.cmd +0 -29
  95. data/test/data/annotate.right +0 -139
  96. data/test/data/break_bad.cmd +0 -18
  97. data/test/data/break_bad.right +0 -28
  98. data/test/data/break_loop_bug.cmd +0 -5
  99. data/test/data/break_loop_bug.right +0 -15
  100. data/test/data/breakpoints.cmd +0 -38
  101. data/test/data/breakpoints.right +0 -98
  102. data/test/data/catch.cmd +0 -20
  103. data/test/data/catch.right +0 -49
  104. data/test/data/catch2.cmd +0 -19
  105. data/test/data/catch2.right +0 -65
  106. data/test/data/catch3.cmd +0 -11
  107. data/test/data/catch3.right +0 -37
  108. data/test/data/condition.cmd +0 -28
  109. data/test/data/condition.right +0 -65
  110. data/test/data/ctrl.cmd +0 -23
  111. data/test/data/ctrl.right +0 -70
  112. data/test/data/display.cmd +0 -24
  113. data/test/data/display.right +0 -44
  114. data/test/data/dollar-0.right +0 -2
  115. data/test/data/dollar-0a.right +0 -2
  116. data/test/data/dollar-0b.right +0 -2
  117. data/test/data/edit.cmd +0 -12
  118. data/test/data/edit.right +0 -19
  119. data/test/data/emacs_basic.cmd +0 -43
  120. data/test/data/emacs_basic.right +0 -106
  121. data/test/data/enable.cmd +0 -20
  122. data/test/data/enable.right +0 -36
  123. data/test/data/finish.cmd +0 -16
  124. data/test/data/finish.right +0 -31
  125. data/test/data/frame.cmd +0 -26
  126. data/test/data/frame.right +0 -55
  127. data/test/data/help.cmd +0 -20
  128. data/test/data/help.right +0 -21
  129. data/test/data/history.right +0 -7
  130. data/test/data/info-thread.cmd +0 -13
  131. data/test/data/info-thread.right +0 -37
  132. data/test/data/info-var-bug2.cmd +0 -5
  133. data/test/data/info-var-bug2.right +0 -10
  134. data/test/data/info-var.cmd +0 -23
  135. data/test/data/info-var.right +0 -52
  136. data/test/data/info.cmd +0 -21
  137. data/test/data/info.right +0 -65
  138. data/test/data/jump.cmd +0 -16
  139. data/test/data/jump.right +0 -56
  140. data/test/data/jump2.cmd +0 -16
  141. data/test/data/jump2.right +0 -44
  142. data/test/data/linetrace.cmd +0 -6
  143. data/test/data/linetrace.right +0 -23
  144. data/test/data/list.cmd +0 -19
  145. data/test/data/list.right +0 -127
  146. data/test/data/method.cmd +0 -10
  147. data/test/data/method.right +0 -21
  148. data/test/data/methodsig.cmd +0 -10
  149. data/test/data/methodsig.right +0 -20
  150. data/test/data/next.cmd +0 -22
  151. data/test/data/next.right +0 -61
  152. data/test/data/noquit.right +0 -1
  153. data/test/data/output.cmd +0 -6
  154. data/test/data/output.right +0 -31
  155. data/test/data/pm-bug.cmd +0 -7
  156. data/test/data/pm-bug.right +0 -12
  157. data/test/data/post-mortem-next.cmd +0 -8
  158. data/test/data/post-mortem-next.right +0 -14
  159. data/test/data/post-mortem-osx.right +0 -31
  160. data/test/data/post-mortem.cmd +0 -13
  161. data/test/data/post-mortem.right +0 -32
  162. data/test/data/quit.cmd +0 -6
  163. data/test/data/quit.right +0 -0
  164. data/test/data/raise.cmd +0 -11
  165. data/test/data/raise.right +0 -23
  166. data/test/data/save.cmd +0 -34
  167. data/test/data/save.right +0 -59
  168. data/test/data/scope-var.cmd +0 -42
  169. data/test/data/scope-var.right +0 -587
  170. data/test/data/setshow.cmd +0 -56
  171. data/test/data/setshow.right +0 -98
  172. data/test/data/source.cmd +0 -5
  173. data/test/data/source.right +0 -15
  174. data/test/data/stepping.cmd +0 -21
  175. data/test/data/stepping.right +0 -50
  176. data/test/data/test-init-cygwin.right +0 -7
  177. data/test/data/test-init-osx.right +0 -4
  178. data/test/data/test-init.right +0 -5
  179. data/test/data/trace.right +0 -14
  180. data/test/dollar-0.rb +0 -5
  181. data/test/gcd-dbg-nox.rb +0 -30
  182. data/test/gcd-dbg.rb +0 -29
  183. data/test/gcd.rb +0 -18
  184. data/test/helper.rb +0 -142
  185. data/test/info-var-bug.rb +0 -47
  186. data/test/info-var-bug2.rb +0 -2
  187. data/test/jump.rb +0 -14
  188. data/test/jump2.rb +0 -27
  189. data/test/lib/commands/catchpoint_test.rb +0 -28
  190. data/test/lib/commands/unit/regexp.rb +0 -38
  191. data/test/next.rb +0 -18
  192. data/test/null.rb +0 -1
  193. data/test/output.rb +0 -2
  194. data/test/pm-base.rb +0 -17
  195. data/test/pm-bug.rb +0 -3
  196. data/test/pm-catch.rb +0 -12
  197. data/test/pm-catch2.rb +0 -27
  198. data/test/pm-catch3.rb +0 -47
  199. data/test/pm.rb +0 -11
  200. data/test/raise.rb +0 -3
  201. data/test/rdebug-save.1 +0 -7
  202. data/test/runall +0 -12
  203. data/test/scope-var.rb +0 -29
  204. data/test/tdebug.rb +0 -246
  205. data/test/test-annotate.rb +0 -24
  206. data/test/test-break-bad.rb +0 -36
  207. data/test/test-breakpoints.rb +0 -24
  208. data/test/test-catch.rb +0 -24
  209. data/test/test-catch2.rb +0 -24
  210. data/test/test-catch3.rb +0 -24
  211. data/test/test-condition.rb +0 -24
  212. data/test/test-ctrl.rb +0 -51
  213. data/test/test-display.rb +0 -25
  214. data/test/test-dollar-0.rb +0 -39
  215. data/test/test-edit.rb +0 -25
  216. data/test/test-emacs-basic.rb +0 -25
  217. data/test/test-enable.rb +0 -24
  218. data/test/test-finish.rb +0 -33
  219. data/test/test-frame.rb +0 -33
  220. data/test/test-help.rb +0 -54
  221. data/test/test-hist.rb +0 -65
  222. data/test/test-info-thread.rb +0 -31
  223. data/test/test-info-var.rb +0 -46
  224. data/test/test-info.rb +0 -25
  225. data/test/test-init.rb +0 -43
  226. data/test/test-jump.rb +0 -34
  227. data/test/test-list.rb +0 -24
  228. data/test/test-method.rb +0 -33
  229. data/test/test-next.rb +0 -24
  230. data/test/test-output.rb +0 -25
  231. data/test/test-quit.rb +0 -29
  232. data/test/test-raise.rb +0 -24
  233. data/test/test-remote.rb +0 -14
  234. data/test/test-save.rb +0 -30
  235. data/test/test-scope-var.rb +0 -24
  236. data/test/test-setshow.rb +0 -24
  237. data/test/test-source.rb +0 -24
  238. data/test/test-stepping.rb +0 -25
  239. data/test/test-trace.rb +0 -46
  240. data/test/thread1.rb +0 -25
  241. data/test/trunc-call.rb +0 -30
@@ -1,3 +0,0 @@
1
- 1.upto(2) {
2
- sleep 0.01
3
- }
data/test/classes.rb DELETED
@@ -1,11 +0,0 @@
1
- class Mine
2
- def initialize
3
- @myvar = 'init'
4
- end
5
- def mymethod(a, b=5, &block)
6
- end
7
- def self.classmeth
8
- end
9
- end
10
- me = Mine.new
11
- metoo = Mine(new)
data/test/config.yaml DELETED
@@ -1,8 +0,0 @@
1
- # Do not commit personal changes here back to the repository. Create
2
- # config.private.yaml which, if exists, is preferred to this one.
3
-
4
- # either should be on the $PATH or use full path
5
- ruby: ruby
6
-
7
- # possibility to specify interpreter parameters
8
- #ruby_params: -w
@@ -1,29 +0,0 @@
1
- # ********************************************************
2
- # This tests annotations
3
- # ********************************************************
4
- set debuggertesting on
5
- set callstyle last
6
- set force off
7
- set annotate 3
8
- # Get into gcd
9
- step 2
10
- # "break" should trigger break annotation
11
- break 10
12
- # "delete" should trigger break annotation
13
- delete 1
14
- # p should not trigger a breakpoint annotation
15
- p a
16
- # "up" should trigger annotations
17
- up
18
- # "b" should trigger like "break"
19
- b 12
20
- # "display" should trigger display annotation
21
- display 1+2
22
- # undisplay should trigger display annotation
23
- undisplay 1
24
- step
25
- # Test error annotations
26
- up 10
27
- frame 100
28
- break bogus:5
29
- quit!
@@ -1,139 +0,0 @@
1
- gcd.rb:4
2
- def gcd(a, b)
3
- # # ********************************************************
4
- # # This tests annotations
5
- # # ********************************************************
6
- # set debuggertesting on
7
- Currently testing the debugger is on.
8
- # set callstyle last
9
- Frame call-display style is last.
10
- # set force off
11
- force-stepping is off.
12
- # set annotate 3
13
- Annotation level is 3
14
- # # Get into gcd
15
- # step 2
16
- starting
17
- stopped
18
- breakpoints
19
- No breakpoints.
20
- 
21
- stack
22
- --> #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6
23
- #1 at line gcd.rb:18
24
- 
25
- variables
26
- a = 3
27
- b = 5
28
- self = main
29
- 
30
- source gcd.rb:6
31
- if a > b
32
- # # "break" should trigger break annotation
33
- # break 10
34
- Breakpoint 1 file ./gcd.rb, line 10
35
- breakpoints
36
- Num Enb What
37
- 1 y at ./gcd.rb:10
38
- 
39
- # # "delete" should trigger break annotation
40
- # delete 1
41
- breakpoints
42
- No breakpoints.
43
- 
44
- # # p should not trigger a breakpoint annotation
45
- # p a
46
- 3
47
- # # "up" should trigger annotations
48
- # up
49
- #1 at line gcd.rb:18
50
- stack
51
- #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6
52
- --> #1 at line gcd.rb:18
53
- 
54
- variables
55
- self = main
56
- 
57
- # # "b" should trigger like "break"
58
- # b 12
59
- Breakpoint 2 file ./gcd.rb, line 12
60
- breakpoints
61
- Num Enb What
62
- 2 y at ./gcd.rb:12
63
- 
64
- # # "display" should trigger display annotation
65
- # display 1+2
66
- 1: 1+2 = 3
67
- display
68
- 1: 1+2 = 3
69
- 
70
- # # undisplay should trigger display annotation
71
- # undisplay 1
72
- display
73
- 
74
- # step
75
- display
76
- 
77
- starting
78
- stopped
79
- breakpoints
80
- Num Enb What
81
- 2 y at ./gcd.rb:12
82
- 
83
- display
84
- 
85
- stack
86
- --> #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:10
87
- #1 at line gcd.rb:18
88
- 
89
- variables
90
- a = 3
91
- b = 5
92
- self = main
93
- 
94
- source gcd.rb:10
95
- return nil if a <= 0
96
- # # Test error annotations
97
- # up 10
98
- error-begin
99
- Adjusting would put us beyond the oldest (initial) frame.
100
- 
101
- display
102
- 
103
- stack
104
- --> #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:10
105
- #1 at line gcd.rb:18
106
- 
107
- variables
108
- a = 3
109
- b = 5
110
- self = main
111
- 
112
- # frame 100
113
- error-begin
114
- Adjusting would put us beyond the oldest (initial) frame.
115
- 
116
- display
117
- 
118
- stack
119
- --> #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:10
120
- #1 at line gcd.rb:18
121
- 
122
- variables
123
- a = 3
124
- b = 5
125
- self = main
126
- 
127
- # break bogus:5
128
- error-begin
129
- No source file named bogus
130
- 
131
- Breakpoint 3 file bogus, line 5
132
- breakpoints
133
- Num Enb What
134
- 2 y at ./gcd.rb:12
135
- 3 y at bogus:5
136
- 
137
- display
138
- 
139
- # quit!
@@ -1,18 +0,0 @@
1
- # ********************************************************
2
- # This tests mostly invalid breakpoints.
3
- # We have some valid ones too.
4
- # ********************************************************
5
- set debuggertesting on
6
- set callstyle last
7
- set autoeval off
8
- # There aren't 100 lines in gcd.rb.
9
- break 100
10
- break gcd.rb:100
11
- # Line one isn't a valid stopping point.
12
- # It is a comment.
13
- break gcd.rb:1
14
- # This line is okay
15
- break gcd.rb:4
16
- # No class Foo.
17
- break Foo.bar
18
- q
@@ -1,28 +0,0 @@
1
- gcd.rb:4
2
- def gcd(a, b)
3
- # # ********************************************************
4
- # # This tests mostly invalid breakpoints.
5
- # # We have some valid ones too.
6
- # # ********************************************************
7
- # set debuggertesting on
8
- Currently testing the debugger is on.
9
- # set callstyle last
10
- Frame call-display style is last.
11
- # set autoeval off
12
- autoeval is off.
13
- # # There aren't 100 lines in gcd.rb.
14
- # break 100
15
- *** There are only 18 lines in file "gcd.rb".
16
- # break gcd.rb:100
17
- *** There are only 18 lines in file "gcd.rb".
18
- # # Line one isn't a valid stopping point.
19
- # # It is a comment.
20
- # break gcd.rb:1
21
- *** Line 1 is not a stopping point in file "gcd.rb".
22
- # # This line is okay
23
- # break gcd.rb:4
24
- Breakpoint 1 file gcd.rb, line 4
25
- # # No class Foo.
26
- # break Foo.bar
27
- *** Unknown class Foo.
28
- # q
@@ -1,5 +0,0 @@
1
- set debuggertesting on
2
- break 2
3
- cont
4
- cont
5
- cont
@@ -1,15 +0,0 @@
1
- bp_loop_issue.rb:1
2
- 1.upto(2) {
3
- # set debuggertesting on
4
- Currently testing the debugger is on.
5
- # break 2
6
- Breakpoint 1 file ./bp_loop_issue.rb, line 2
7
- # cont
8
- Breakpoint 1 at bp_loop_issue.rb:2
9
- bp_loop_issue.rb:2
10
- sleep 0.01
11
- # cont
12
- Breakpoint 1 at bp_loop_issue.rb:2
13
- bp_loop_issue.rb:2
14
- sleep 0.01
15
- # cont
@@ -1,38 +0,0 @@
1
- # ********************************************************
2
- # This tests step, next, continue, disable and
3
- # enable.
4
- # FIXME: break out enable/disable
5
- # ********************************************************
6
- set debuggertesting on
7
- set callstyle last
8
- set autoeval off
9
- break 6
10
- break 10
11
- break 11
12
- continue
13
- where
14
- break Object.gcd
15
- info break
16
- continue
17
- where
18
- info program
19
- c 6
20
- info break
21
- break foo
22
- info break
23
- disable 1
24
- info break
25
- delete 1
26
- # We should see breakpoint 2 but not 1
27
- info break
28
- # We should still be able to access 2
29
- disable 2
30
- disable bar
31
- disable
32
- # We should be able to delete 2
33
- delete 2 3
34
- info break
35
- # Should get a message about having no breakpoints.
36
- disable 1
37
- enable 1
38
- q!
@@ -1,98 +0,0 @@
1
- gcd.rb:4
2
- def gcd(a, b)
3
- # # ********************************************************
4
- # # This tests step, next, continue, disable and
5
- # # enable.
6
- # # FIXME: break out enable/disable
7
- # # ********************************************************
8
- # set debuggertesting on
9
- Currently testing the debugger is on.
10
- # set callstyle last
11
- Frame call-display style is last.
12
- # set autoeval off
13
- autoeval is off.
14
- # break 6
15
- Breakpoint 1 file ./gcd.rb, line 6
16
- # break 10
17
- Breakpoint 2 file ./gcd.rb, line 10
18
- # break 11
19
- *** Line 11 is not a stopping point in file "gcd.rb".
20
- # continue
21
- Breakpoint 1 at gcd.rb:6
22
- gcd.rb:6
23
- if a > b
24
- # where
25
- --> #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6
26
- #1 at line gcd.rb:18
27
- # break Object.gcd
28
- Breakpoint 3 at Object::gcd
29
- # info break
30
- Num Enb What
31
- 1 y at ./gcd.rb:6
32
- breakpoint already hit 1 time
33
- 2 y at ./gcd.rb:10
34
- 3 y at Object:gcd
35
- # continue
36
- Breakpoint 2 at gcd.rb:10
37
- gcd.rb:10
38
- return nil if a <= 0
39
- # where
40
- --> #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:10
41
- #1 at line gcd.rb:18
42
- # info program
43
- Program stopped. It stopped at a breakpoint.
44
- # c 6
45
- Breakpoint 3 at Object:gcd
46
- gcd.rb:4
47
- def gcd(a, b)
48
- # info break
49
- Num Enb What
50
- 1 y at ./gcd.rb:6
51
- breakpoint already hit 1 time
52
- 2 y at ./gcd.rb:10
53
- breakpoint already hit 1 time
54
- 3 y at Object:gcd
55
- breakpoint already hit 1 time
56
- # break foo
57
- *** Invalid breakpoint location: foo.
58
- # info break
59
- Num Enb What
60
- 1 y at ./gcd.rb:6
61
- breakpoint already hit 1 time
62
- 2 y at ./gcd.rb:10
63
- breakpoint already hit 1 time
64
- 3 y at Object:gcd
65
- breakpoint already hit 1 time
66
- # disable 1
67
- # info break
68
- Num Enb What
69
- 1 n at ./gcd.rb:6
70
- breakpoint already hit 1 time
71
- 2 y at ./gcd.rb:10
72
- breakpoint already hit 1 time
73
- 3 y at Object:gcd
74
- breakpoint already hit 1 time
75
- # delete 1
76
- # # We should see breakpoint 2 but not 1
77
- # info break
78
- Num Enb What
79
- 2 y at ./gcd.rb:10
80
- breakpoint already hit 1 time
81
- 3 y at Object:gcd
82
- breakpoint already hit 1 time
83
- # # We should still be able to access 2
84
- # disable 2
85
- # disable bar
86
- Disable breakpoints argument 'bar' needs to be a number.
87
- # disable
88
- *** "disable" must be followed "display", "breakpoints" or breakpoint numbers.
89
- # # We should be able to delete 2
90
- # delete 2 3
91
- # info break
92
- No breakpoints.
93
- # # Should get a message about having no breakpoints.
94
- # disable 1
95
- *** No breakpoints have been set.
96
- # enable 1
97
- *** No breakpoints have been set.
98
- # q!
data/test/data/catch.cmd DELETED
@@ -1,20 +0,0 @@
1
- # ***************************************************
2
- # Test catch
3
- # ***************************************************
4
- set debuggertesting on
5
- set autoeval off
6
- set basename on
7
- info catch
8
- catch ZeroDivisionError off
9
- catch ZeroDivisionError off afdasdf
10
- catch ZeroDivisionError
11
- info catch
12
- catch ZeroDivisionError off
13
- info catch
14
- catch ZeroDivisionError
15
- c
16
- where
17
- jump 6
18
- cont
19
- jump 11
20
- cont
@@ -1,49 +0,0 @@
1
- pm-catch.rb:3
2
- def zero_div
3
- # # ***************************************************
4
- # # Test catch
5
- # # ***************************************************
6
- # set debuggertesting on
7
- Currently testing the debugger is on.
8
- # set autoeval off
9
- autoeval is off.
10
- # set basename on
11
- basename is on.
12
- # info catch
13
- No exceptions set to be caught.
14
- # catch ZeroDivisionError off
15
- *** Catch for exception ZeroDivisionError not found.
16
- # catch ZeroDivisionError off afdasdf
17
- *** Unknown command: "catch ZeroDivisionError off afdasdf". Try "help".
18
- # catch ZeroDivisionError
19
- Catch exception ZeroDivisionError.
20
- # info catch
21
- ZeroDivisionError
22
- # catch ZeroDivisionError off
23
- Catch for exception ZeroDivisionError removed.
24
- # info catch
25
- No exceptions set to be caught.
26
- # catch ZeroDivisionError
27
- Catch exception ZeroDivisionError.
28
- # c
29
- Catchpoint at pm-catch.rb:5: `divided by 0' (ZeroDivisionError)
30
- from ../rdbg.rb:23:in `runner'
31
- from ../rdbg.rb:32:in `<main>'
32
- pm-catch.rb:5
33
- 1/0
34
- # where
35
- --> #0 Object.zero_div at line pm-catch.rb:5
36
- #1 at line pm-catch.rb:9
37
- # jump 6
38
- pm-catch.rb:6
39
- x = 6
40
- # cont
41
- 6
42
- Catchpoint at pm-catch.rb:10: `RuntimeError' (RuntimeError)
43
- from ../rdbg.rb:32:in `<main>'
44
- pm-catch.rb:10
45
- raise RuntimeError
46
- # jump 11
47
- pm-catch.rb:11
48
- x = 3
49
- # cont