jets 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/Gemfile.lock +1 -1
  4. data/lib/jets/builders/code_builder.rb +1 -0
  5. data/lib/jets/builders/gem_replacer.rb +1 -0
  6. data/lib/jets/version.rb +1 -1
  7. data/vendor/lambdagem/CHANGELOG.md +3 -0
  8. data/vendor/lambdagem/Gemfile.lock +3 -3
  9. data/vendor/lambdagem/README.md +0 -4
  10. data/vendor/lambdagem/lib/lambdagem.rb +2 -0
  11. data/vendor/lambdagem/lib/lambdagem/base.rb +2 -0
  12. data/vendor/lambdagem/lib/lambdagem/extract/base.rb +6 -6
  13. data/vendor/lambdagem/lib/lambdagem/extract/gem.rb +6 -5
  14. data/vendor/lambdagem/lib/lambdagem/extract/ruby.rb +4 -3
  15. data/vendor/lambdagem/lib/lambdagem/util.rb +30 -0
  16. data/vendor/lambdagem/lib/lambdagem/version.rb +1 -1
  17. metadata +3 -140
  18. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/extensions/x86_64-linux/2.5.0-static/byebug-10.0.0/byebug/byebug.so +0 -0
  19. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/extensions/x86_64-linux/2.5.0-static/byebug-10.0.0/gem.build_complete +0 -0
  20. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/extensions/x86_64-linux/2.5.0-static/byebug-10.0.0/gem_make.out +0 -19
  21. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/LICENSE +0 -23
  22. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/exe/byebug +0 -6
  23. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/ext/byebug/Makefile +0 -263
  24. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/ext/byebug/breakpoint.c +0 -517
  25. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/ext/byebug/breakpoint.o +0 -0
  26. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/ext/byebug/byebug.c +0 -905
  27. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/ext/byebug/byebug.h +0 -143
  28. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/ext/byebug/byebug.o +0 -0
  29. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/ext/byebug/byebug.so +0 -0
  30. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/ext/byebug/context.c +0 -673
  31. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/ext/byebug/context.o +0 -0
  32. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/ext/byebug/extconf.rb +0 -12
  33. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/ext/byebug/locker.c +0 -96
  34. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/ext/byebug/locker.o +0 -0
  35. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/ext/byebug/threads.c +0 -230
  36. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/ext/byebug/threads.o +0 -0
  37. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug.rb +0 -3
  38. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/attacher.rb +0 -48
  39. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/breakpoint.rb +0 -111
  40. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/byebug.so +0 -0
  41. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/command.rb +0 -111
  42. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/command_list.rb +0 -34
  43. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands.rb +0 -39
  44. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/break.rb +0 -116
  45. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/catch.rb +0 -82
  46. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/condition.rb +0 -57
  47. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/continue.rb +0 -50
  48. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/debug.rb +0 -38
  49. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/delete.rb +0 -57
  50. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/disable.rb +0 -33
  51. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/disable/breakpoints.rb +0 -42
  52. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/disable/display.rb +0 -43
  53. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/display.rb +0 -66
  54. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/down.rb +0 -45
  55. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/edit.rb +0 -68
  56. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/enable.rb +0 -33
  57. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/enable/breakpoints.rb +0 -42
  58. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/enable/display.rb +0 -43
  59. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/finish.rb +0 -57
  60. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/frame.rb +0 -57
  61. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/help.rb +0 -64
  62. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/history.rb +0 -39
  63. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/info.rb +0 -37
  64. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/info/breakpoints.rb +0 -67
  65. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/info/display.rb +0 -51
  66. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/info/file.rb +0 -82
  67. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/info/line.rb +0 -35
  68. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/info/program.rb +0 -49
  69. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/interrupt.rb +0 -34
  70. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/irb.rb +0 -52
  71. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/kill.rb +0 -47
  72. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/list.rb +0 -159
  73. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/method.rb +0 -53
  74. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/next.rb +0 -40
  75. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/pry.rb +0 -43
  76. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/quit.rb +0 -42
  77. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/restart.rb +0 -64
  78. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/save.rb +0 -72
  79. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/set.rb +0 -79
  80. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/show.rb +0 -45
  81. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/source.rb +0 -42
  82. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/step.rb +0 -40
  83. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/thread.rb +0 -34
  84. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/thread/current.rb +0 -37
  85. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/thread/list.rb +0 -43
  86. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/thread/resume.rb +0 -47
  87. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/thread/stop.rb +0 -43
  88. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/thread/switch.rb +0 -46
  89. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/tracevar.rb +0 -57
  90. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/undisplay.rb +0 -52
  91. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/untracevar.rb +0 -36
  92. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/up.rb +0 -45
  93. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/var.rb +0 -37
  94. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/var/all.rb +0 -41
  95. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/var/args.rb +0 -39
  96. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/var/const.rb +0 -51
  97. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/var/global.rb +0 -37
  98. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/var/instance.rb +0 -39
  99. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/var/local.rb +0 -39
  100. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/commands/where.rb +0 -53
  101. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/context.rb +0 -157
  102. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/core.rb +0 -114
  103. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/errors.rb +0 -29
  104. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/frame.rb +0 -185
  105. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/helpers/bin.rb +0 -47
  106. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/helpers/eval.rb +0 -126
  107. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/helpers/file.rb +0 -63
  108. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/helpers/frame.rb +0 -75
  109. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/helpers/parse.rb +0 -77
  110. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/helpers/path.rb +0 -40
  111. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/helpers/reflection.rb +0 -19
  112. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/helpers/string.rb +0 -36
  113. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/helpers/thread.rb +0 -67
  114. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/helpers/toggle.rb +0 -64
  115. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/helpers/var.rb +0 -54
  116. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/history.rb +0 -130
  117. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/interface.rb +0 -146
  118. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/interfaces/local_interface.rb +0 -44
  119. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/interfaces/remote_interface.rb +0 -50
  120. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/interfaces/script_interface.rb +0 -32
  121. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/interfaces/test_interface.rb +0 -67
  122. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/option_setter.rb +0 -95
  123. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/printers/base.rb +0 -69
  124. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/printers/plain.rb +0 -44
  125. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/printers/texts/base.yml +0 -115
  126. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/printers/texts/plain.yml +0 -33
  127. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/processors/command_processor.rb +0 -173
  128. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/processors/control_processor.rb +0 -24
  129. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/processors/post_mortem_processor.rb +0 -18
  130. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/processors/script_processor.rb +0 -49
  131. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/remote.rb +0 -85
  132. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/remote/client.rb +0 -55
  133. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/remote/server.rb +0 -47
  134. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/runner.rb +0 -198
  135. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/setting.rb +0 -79
  136. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/settings/autoirb.rb +0 -29
  137. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/settings/autolist.rb +0 -29
  138. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/settings/autopry.rb +0 -29
  139. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/settings/autosave.rb +0 -17
  140. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/settings/basename.rb +0 -16
  141. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/settings/callstyle.rb +0 -20
  142. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/settings/fullpath.rb +0 -16
  143. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/settings/histfile.rb +0 -20
  144. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/settings/histsize.rb +0 -20
  145. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/settings/linetrace.rb +0 -22
  146. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/settings/listsize.rb +0 -21
  147. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/settings/post_mortem.rb +0 -27
  148. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/settings/savefile.rb +0 -20
  149. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/settings/stack_on_error.rb +0 -15
  150. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/settings/width.rb +0 -20
  151. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/source_file_formatter.rb +0 -71
  152. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/subcommands.rb +0 -54
  153. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/version.rb +0 -8
  154. data/vendor/lambdagem/bundled/gems/ruby/2.5.0/specifications/byebug-10.0.0.gemspec +0 -39
@@ -1,23 +0,0 @@
1
- Copyright (c) David Rodríguez <deivid.rodriguez@gmail.com>
2
- All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without
5
- modification, are permitted provided that the following conditions
6
- are met:
7
- 1. Redistributions of source code must retain the above copyright
8
- notice, this list of conditions and the following disclaimer.
9
- 2. Redistributions in binary form must reproduce the above copyright
10
- notice, this list of conditions and the following disclaimer in the
11
- documentation and/or other materials provided with the distribution.
12
-
13
- THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
14
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16
- ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
17
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19
- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23
- SUCH DAMAGE.
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "byebug/runner"
5
-
6
- Byebug::Runner.new.run
@@ -1,263 +0,0 @@
1
-
2
- SHELL = /bin/sh
3
-
4
- # V=0 quiet, V=1 verbose. other values don't work.
5
- V = 0
6
- Q1 = $(V:1=)
7
- Q = $(Q1:0=@)
8
- ECHO1 = $(V:1=@ :)
9
- ECHO = $(ECHO1:0=@ echo)
10
- NULLCMD = :
11
-
12
- #### Start of system configuration section. ####
13
-
14
- srcdir = .
15
- topdir = /var/task/bundled/rbenv/versions/2.5.0/include/ruby-2.5.0
16
- hdrdir = $(topdir)
17
- arch_hdrdir = /var/task/bundled/rbenv/versions/2.5.0/include/ruby-2.5.0/x86_64-linux
18
- PATH_SEPARATOR = :
19
- VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
20
- prefix = $(DESTDIR)/var/task/bundled/rbenv/versions/2.5.0
21
- rubysitearchprefix = $(rubylibprefix)/$(sitearch)
22
- rubyarchprefix = $(rubylibprefix)/$(arch)
23
- rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
24
- exec_prefix = $(prefix)
25
- vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
26
- sitearchhdrdir = $(sitehdrdir)/$(sitearch)
27
- rubyarchhdrdir = $(rubyhdrdir)/$(arch)
28
- vendorhdrdir = $(rubyhdrdir)/vendor_ruby
29
- sitehdrdir = $(rubyhdrdir)/site_ruby
30
- rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
31
- vendorarchdir = $(vendorlibdir)/$(sitearch)
32
- vendorlibdir = $(vendordir)/$(ruby_version)
33
- vendordir = $(rubylibprefix)/vendor_ruby
34
- sitearchdir = $(DESTDIR)./.gem.20180129-3007-vsab69
35
- sitelibdir = $(DESTDIR)./.gem.20180129-3007-vsab69
36
- sitedir = $(rubylibprefix)/site_ruby
37
- rubyarchdir = $(rubylibdir)/$(arch)
38
- rubylibdir = $(rubylibprefix)/$(ruby_version)
39
- sitearchincludedir = $(includedir)/$(sitearch)
40
- archincludedir = $(includedir)/$(arch)
41
- sitearchlibdir = $(libdir)/$(sitearch)
42
- archlibdir = $(libdir)/$(arch)
43
- ridir = $(datarootdir)/$(RI_BASE_NAME)
44
- mandir = $(datarootdir)/man
45
- localedir = $(datarootdir)/locale
46
- libdir = $(exec_prefix)/lib
47
- psdir = $(docdir)
48
- pdfdir = $(docdir)
49
- dvidir = $(docdir)
50
- htmldir = $(docdir)
51
- infodir = $(datarootdir)/info
52
- docdir = $(datarootdir)/doc/$(PACKAGE)
53
- oldincludedir = $(DESTDIR)/usr/include
54
- includedir = $(prefix)/include
55
- localstatedir = $(prefix)/var
56
- sharedstatedir = $(prefix)/com
57
- sysconfdir = $(prefix)/etc
58
- datadir = $(datarootdir)
59
- datarootdir = $(prefix)/share
60
- libexecdir = $(exec_prefix)/libexec
61
- sbindir = $(exec_prefix)/sbin
62
- bindir = $(exec_prefix)/bin
63
- archdir = $(rubyarchdir)
64
-
65
-
66
- CC = gcc
67
- CXX = g++
68
- LIBRUBY = $(LIBRUBY_A)
69
- LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
70
- LIBRUBYARG_SHARED = -Wl,-rpath,$(libdir) -L$(libdir)
71
- LIBRUBYARG_STATIC = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static
72
- empty =
73
- OUTFLAG = -o $(empty)
74
- COUTFLAG = -o $(empty)
75
- CSRCFLAG = $(empty)
76
-
77
- RUBY_EXTCONF_H =
78
- cflags = $(optflags) $(debugflags) $(warnflags)
79
- cxxflags = $(optflags) $(debugflags) $(warnflags)
80
- optflags = -O3
81
- debugflags = -ggdb3
82
- warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wno-maybe-uninitialized
83
- CCDLFLAGS = -fPIC
84
- CFLAGS = $(CCDLFLAGS) $(cflags) $(ARCH_FLAG)
85
- INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
86
- DEFS =
87
- CPPFLAGS = -I/var/task/bundled/rbenv/versions/2.5.0/include $(DEFS) $(cppflags)
88
- CXXFLAGS = $(CCDLFLAGS) $(cxxflags) $(ARCH_FLAG)
89
- ldflags = -L. -L/var/task/bundled/rbenv/versions/2.5.0/lib -fstack-protector -rdynamic -Wl,-export-dynamic
90
- dldflags = -L/var/task/bundled/rbenv/versions/2.5.0/lib -Wl,--compress-debug-sections=zlib
91
- ARCH_FLAG =
92
- DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
93
- LDSHARED = $(CC) -shared
94
- LDSHAREDXX = $(CXX) -shared
95
- AR = ar
96
- EXEEXT =
97
-
98
- RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
99
- RUBY_SO_NAME = ruby
100
- RUBYW_INSTALL_NAME =
101
- RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
102
- RUBYW_BASE_NAME = rubyw
103
- RUBY_BASE_NAME = ruby
104
-
105
- arch = x86_64-linux
106
- sitearch = $(arch)
107
- ruby_version = 2.5.0
108
- ruby = $(bindir)/$(RUBY_BASE_NAME)
109
- RUBY = $(ruby)
110
- ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
111
-
112
- RM = rm -f
113
- RM_RF = $(RUBY) -run -e rm -- -rf
114
- RMDIRS = rmdir --ignore-fail-on-non-empty -p
115
- MAKEDIRS = /bin/mkdir -p
116
- INSTALL = /usr/bin/install -c
117
- INSTALL_PROG = $(INSTALL) -m 0755
118
- INSTALL_DATA = $(INSTALL) -m 644
119
- COPY = cp
120
- TOUCH = exit >
121
-
122
- #### End of system configuration section. ####
123
-
124
- preload =
125
- libpath = . $(libdir)
126
- LIBPATH = -L. -L$(libdir) -Wl,-rpath,$(libdir)
127
- DEFFILE =
128
-
129
- CLEANFILES = mkmf.log
130
- DISTCLEANFILES =
131
- DISTCLEANDIRS =
132
-
133
- extout =
134
- extout_prefix =
135
- target_prefix = /byebug
136
- LOCAL_LIBS =
137
- LIBS = -lpthread -lgmp -ldl -lcrypt -lm -lc
138
- ORIG_SRCS = breakpoint.c byebug.c context.c locker.c threads.c
139
- SRCS = $(ORIG_SRCS)
140
- OBJS = breakpoint.o byebug.o context.o locker.o threads.o
141
- HDRS = $(srcdir)/byebug.h
142
- LOCAL_HDRS =
143
- TARGET = byebug
144
- TARGET_NAME = byebug
145
- TARGET_ENTRY = Init_$(TARGET_NAME)
146
- DLLIB = $(TARGET).so
147
- EXTSTATIC =
148
- STATIC_LIB =
149
-
150
- TIMESTAMP_DIR = .
151
- BINDIR = $(bindir)
152
- RUBYCOMMONDIR = $(sitedir)$(target_prefix)
153
- RUBYLIBDIR = $(sitelibdir)$(target_prefix)
154
- RUBYARCHDIR = $(sitearchdir)$(target_prefix)
155
- HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
156
- ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
157
- TARGET_SO_DIR =
158
- TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
159
- CLEANLIBS = $(TARGET_SO)
160
- CLEANOBJS = *.o *.bak
161
-
162
- all: $(DLLIB)
163
- static: $(STATIC_LIB)
164
- .PHONY: all install static install-so install-rb
165
- .PHONY: clean clean-so clean-static clean-rb
166
-
167
- clean-static::
168
- clean-rb-default::
169
- clean-rb::
170
- clean-so::
171
- clean: clean-so clean-static clean-rb-default clean-rb
172
- -$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
173
-
174
- distclean-rb-default::
175
- distclean-rb::
176
- distclean-so::
177
- distclean-static::
178
- distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
179
- -$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
180
- -$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
181
- -$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
182
-
183
- realclean: distclean
184
- install: install-so install-rb
185
-
186
- install-so: $(DLLIB) $(TIMESTAMP_DIR)/.sitearchdir.-.byebug.time
187
- $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
188
- clean-static::
189
- -$(Q)$(RM) $(STATIC_LIB)
190
- install-rb: pre-install-rb do-install-rb install-rb-default
191
- install-rb-default: pre-install-rb-default do-install-rb-default
192
- pre-install-rb: Makefile
193
- pre-install-rb-default: Makefile
194
- do-install-rb:
195
- do-install-rb-default:
196
- pre-install-rb-default:
197
- @$(NULLCMD)
198
- $(TIMESTAMP_DIR)/.sitearchdir.-.byebug.time:
199
- $(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
200
- $(Q) $(TOUCH) $@
201
-
202
- site-install: site-install-so site-install-rb
203
- site-install-so: install-so
204
- site-install-rb: install-rb
205
-
206
- .SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
207
-
208
- .cc.o:
209
- $(ECHO) compiling $(<)
210
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
211
-
212
- .cc.S:
213
- $(ECHO) translating $(<)
214
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
215
-
216
- .mm.o:
217
- $(ECHO) compiling $(<)
218
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
219
-
220
- .mm.S:
221
- $(ECHO) translating $(<)
222
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
223
-
224
- .cxx.o:
225
- $(ECHO) compiling $(<)
226
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
227
-
228
- .cxx.S:
229
- $(ECHO) translating $(<)
230
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
231
-
232
- .cpp.o:
233
- $(ECHO) compiling $(<)
234
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
235
-
236
- .cpp.S:
237
- $(ECHO) translating $(<)
238
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
239
-
240
- .c.o:
241
- $(ECHO) compiling $(<)
242
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
243
-
244
- .c.S:
245
- $(ECHO) translating $(<)
246
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
247
-
248
- .m.o:
249
- $(ECHO) compiling $(<)
250
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
251
-
252
- .m.S:
253
- $(ECHO) translating $(<)
254
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
255
-
256
- $(TARGET_SO): $(OBJS) Makefile
257
- $(ECHO) linking shared-object byebug/$(DLLIB)
258
- -$(Q)$(RM) $(@)
259
- $(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
260
-
261
-
262
-
263
- $(OBJS): $(HDRS) $(ruby_headers)
@@ -1,517 +0,0 @@
1
- #include "byebug.h"
2
-
3
- #ifdef _WIN32
4
- #include <ctype.h>
5
- #endif
6
-
7
- #if defined DOSISH
8
- #define isdirsep(x) ((x) == '/' || (x) == '\\')
9
- #else
10
- #define isdirsep(x) ((x) == '/')
11
- #endif
12
-
13
- static VALUE cBreakpoint;
14
- static int breakpoint_max;
15
-
16
- static ID idEval;
17
-
18
- static VALUE
19
- eval_expression(VALUE args)
20
- {
21
- return rb_funcall2(rb_mKernel, idEval, 2, RARRAY_PTR(args));
22
- }
23
-
24
- /*
25
- * call-seq:
26
- * breakpoint.enabled? -> bool
27
- *
28
- * Returns +true+ if breakpoint is enabled, false otherwise.
29
- */
30
- static VALUE
31
- brkpt_enabled(VALUE self)
32
- {
33
- breakpoint_t *breakpoint;
34
-
35
- Data_Get_Struct(self, breakpoint_t, breakpoint);
36
- return breakpoint->enabled;
37
- }
38
-
39
- /*
40
- * call-seq:
41
- * breakpoint.enabled = true | false
42
- *
43
- * Enables or disables breakpoint.
44
- */
45
- static VALUE
46
- brkpt_set_enabled(VALUE self, VALUE enabled)
47
- {
48
- breakpoint_t *breakpoint;
49
-
50
- Data_Get_Struct(self, breakpoint_t, breakpoint);
51
- return breakpoint->enabled = enabled;
52
- }
53
-
54
- /*
55
- * call-seq:
56
- * breakpoint.expr -> string
57
- *
58
- * Returns a conditional expression which indicates when this breakpoint should
59
- * be activated.
60
- */
61
- static VALUE
62
- brkpt_expr(VALUE self)
63
- {
64
- breakpoint_t *breakpoint;
65
-
66
- Data_Get_Struct(self, breakpoint_t, breakpoint);
67
- return breakpoint->expr;
68
- }
69
-
70
- /*
71
- * call-seq:
72
- * breakpoint.expr = string | nil
73
- *
74
- * Sets or unsets the conditional expression which indicates when this
75
- * breakpoint should be activated.
76
- */
77
- static VALUE
78
- brkpt_set_expr(VALUE self, VALUE expr)
79
- {
80
- breakpoint_t *breakpoint;
81
-
82
- Data_Get_Struct(self, breakpoint_t, breakpoint);
83
- breakpoint->expr = NIL_P(expr) ? expr : StringValue(expr);
84
- return expr;
85
- }
86
-
87
- /*
88
- * call-seq:
89
- * breakpoint.hit_condition -> symbol
90
- *
91
- * Returns the hit condition of the breakpoint: +nil+ if it is an
92
- * unconditional breakpoint, or :greater_or_equal, :equal or :modulo otherwise
93
- */
94
- static VALUE
95
- brkpt_hit_condition(VALUE self)
96
- {
97
- breakpoint_t *breakpoint;
98
-
99
- Data_Get_Struct(self, breakpoint_t, breakpoint);
100
- switch (breakpoint->hit_condition)
101
- {
102
- case HIT_COND_GE:
103
- return ID2SYM(rb_intern("greater_or_equal"));
104
- case HIT_COND_EQ:
105
- return ID2SYM(rb_intern("equal"));
106
- case HIT_COND_MOD:
107
- return ID2SYM(rb_intern("modulo"));
108
- case HIT_COND_NONE:
109
- default:
110
- return Qnil;
111
- }
112
- }
113
-
114
- /*
115
- * call-seq:
116
- * breakpoint.hit_condition = symbol
117
- *
118
- * Sets the hit condition of the breakpoint which must be one of the following
119
- * values:
120
- *
121
- * +nil+ if it is an unconditional breakpoint, or
122
- * :greater_or_equal(:ge), :equal(:eq), :modulo(:mod)
123
- */
124
- static VALUE
125
- brkpt_set_hit_condition(VALUE self, VALUE value)
126
- {
127
- breakpoint_t *breakpoint;
128
- ID id_value;
129
-
130
- Data_Get_Struct(self, breakpoint_t, breakpoint);
131
- id_value = rb_to_id(value);
132
-
133
- if (rb_intern("greater_or_equal") == id_value || rb_intern("ge") == id_value)
134
- breakpoint->hit_condition = HIT_COND_GE;
135
- else if (rb_intern("equal") == id_value || rb_intern("eq") == id_value)
136
- breakpoint->hit_condition = HIT_COND_EQ;
137
- else if (rb_intern("modulo") == id_value || rb_intern("mod") == id_value)
138
- breakpoint->hit_condition = HIT_COND_MOD;
139
- else
140
- rb_raise(rb_eArgError, "Invalid condition parameter");
141
- return value;
142
- }
143
-
144
- /*
145
- * call-seq:
146
- * breakpoint.hit_count -> int
147
- *
148
- * Returns the number of times this breakpoint has been hit.
149
- */
150
- static VALUE
151
- brkpt_hit_count(VALUE self)
152
- {
153
- breakpoint_t *breakpoint;
154
-
155
- Data_Get_Struct(self, breakpoint_t, breakpoint);
156
- return INT2FIX(breakpoint->hit_count);
157
- }
158
-
159
- /*
160
- * call-seq:
161
- * breakpoint.hit_value -> int
162
- *
163
- * Returns the hit value of the breakpoint, namely, a value to build a
164
- * condition on the number of hits of the breakpoint.
165
- */
166
- static VALUE
167
- brkpt_hit_value(VALUE self)
168
- {
169
- breakpoint_t *breakpoint;
170
-
171
- Data_Get_Struct(self, breakpoint_t, breakpoint);
172
- return INT2FIX(breakpoint->hit_value);
173
- }
174
-
175
- /*
176
- * call-seq:
177
- * breakpoint.hit_value = int
178
- *
179
- * Sets the hit value of the breakpoint. This allows the user to set conditions
180
- * on the number of hits to enable/disable the breakpoint.
181
- */
182
- static VALUE
183
- brkpt_set_hit_value(VALUE self, VALUE value)
184
- {
185
- breakpoint_t *breakpoint;
186
-
187
- Data_Get_Struct(self, breakpoint_t, breakpoint);
188
- breakpoint->hit_value = FIX2INT(value);
189
- return value;
190
- }
191
-
192
- /*
193
- * call-seq:
194
- * breakpoint.id -> int
195
- *
196
- * Returns the id of the breakpoint.
197
- */
198
- static VALUE
199
- brkpt_id(VALUE self)
200
- {
201
- breakpoint_t *breakpoint;
202
-
203
- Data_Get_Struct(self, breakpoint_t, breakpoint);
204
- return INT2FIX(breakpoint->id);
205
- }
206
-
207
- /*
208
- * call-seq:
209
- * breakpoint.pos -> string or int
210
- *
211
- * Returns the position of this breakpoint, either a method name or a line
212
- * number.
213
- */
214
- static VALUE
215
- brkpt_pos(VALUE self)
216
- {
217
- breakpoint_t *breakpoint;
218
-
219
- Data_Get_Struct(self, breakpoint_t, breakpoint);
220
- if (breakpoint->type == BP_METHOD_TYPE)
221
- return rb_str_new2(rb_id2name(breakpoint->pos.mid));
222
- else
223
- return INT2FIX(breakpoint->pos.line);
224
- }
225
-
226
- /*
227
- * call-seq:
228
- * breakpoint.source -> string
229
- *
230
- * Returns the source file of the breakpoint.
231
- */
232
- static VALUE
233
- brkpt_source(VALUE self)
234
- {
235
- breakpoint_t *breakpoint;
236
-
237
- Data_Get_Struct(self, breakpoint_t, breakpoint);
238
- return breakpoint->source;
239
- }
240
-
241
- static void
242
- mark_breakpoint(breakpoint_t *breakpoint)
243
- {
244
- rb_gc_mark(breakpoint->source);
245
- rb_gc_mark(breakpoint->expr);
246
- }
247
-
248
- static VALUE
249
- brkpt_create(VALUE klass)
250
- {
251
- breakpoint_t *breakpoint = ALLOC(breakpoint_t);
252
-
253
- return Data_Wrap_Struct(klass, mark_breakpoint, xfree, breakpoint);
254
- }
255
-
256
- static VALUE
257
- brkpt_initialize(VALUE self, VALUE source, VALUE pos, VALUE expr)
258
- {
259
- breakpoint_t *breakpoint;
260
-
261
- Data_Get_Struct(self, breakpoint_t, breakpoint);
262
-
263
- breakpoint->type = FIXNUM_P(pos) ? BP_POS_TYPE : BP_METHOD_TYPE;
264
- if (breakpoint->type == BP_POS_TYPE)
265
- breakpoint->pos.line = FIX2INT(pos);
266
- else
267
- breakpoint->pos.mid = SYM2ID(pos);
268
-
269
- breakpoint->id = ++breakpoint_max;
270
- breakpoint->source = StringValue(source);
271
- breakpoint->enabled = Qtrue;
272
- breakpoint->expr = NIL_P(expr) ? expr : StringValue(expr);
273
- breakpoint->hit_count = 0;
274
- breakpoint->hit_value = 0;
275
- breakpoint->hit_condition = HIT_COND_NONE;
276
-
277
- return Qnil;
278
- }
279
-
280
- static int
281
- filename_cmp_impl(VALUE source, char *file)
282
- {
283
- char *source_ptr, *file_ptr;
284
- long s_len, f_len, min_len;
285
- long s, f;
286
- int dirsep_flag = 0;
287
-
288
- s_len = RSTRING_LEN(source);
289
- f_len = strlen(file);
290
- min_len = s_len < f_len ? s_len : f_len;
291
-
292
- source_ptr = RSTRING_PTR(source);
293
- file_ptr = file;
294
-
295
- for (s = s_len - 1, f = f_len - 1;
296
- s >= s_len - min_len && f >= f_len - min_len; s--, f--)
297
- {
298
- if ((source_ptr[s] == '.' || file_ptr[f] == '.') && dirsep_flag)
299
- return 1;
300
- if (isdirsep(source_ptr[s]) && isdirsep(file_ptr[f]))
301
- dirsep_flag = 1;
302
- #ifdef DOSISH_DRIVE_LETTER
303
- else if (s == 0)
304
- return (toupper(source_ptr[s]) == toupper(file_ptr[f]));
305
- #endif
306
- else if (source_ptr[s] != file_ptr[f])
307
- return 0;
308
- }
309
- return 1;
310
- }
311
-
312
- static int
313
- filename_cmp(VALUE source, char *file)
314
- {
315
- #ifdef _WIN32
316
- return filename_cmp_impl(source, file);
317
- #else
318
- #ifdef PATH_MAX
319
- char path[PATH_MAX + 1];
320
-
321
- path[PATH_MAX] = 0;
322
- return filename_cmp_impl(source, realpath(file, path) != NULL ? path : file);
323
- #else
324
- char *path;
325
- int result;
326
-
327
- path = realpath(file, NULL);
328
- result = filename_cmp_impl(source, path == NULL ? file : path);
329
- free(path);
330
- return result;
331
- #endif
332
- #endif
333
- }
334
-
335
- static int
336
- classname_cmp(VALUE name, VALUE klass)
337
- {
338
- VALUE mod_name;
339
- VALUE class_name = NIL_P(name) ? rb_str_new2("main") : name;
340
-
341
- if (NIL_P(klass))
342
- return 0;
343
-
344
- mod_name = rb_mod_name(klass);
345
- return (!NIL_P(mod_name) && rb_str_cmp(class_name, mod_name) == 0);
346
- }
347
-
348
- static int
349
- check_breakpoint_by_hit_condition(VALUE rb_breakpoint)
350
- {
351
- breakpoint_t *breakpoint;
352
-
353
- if (NIL_P(rb_breakpoint))
354
- return 0;
355
-
356
- Data_Get_Struct(rb_breakpoint, breakpoint_t, breakpoint);
357
- breakpoint->hit_count++;
358
-
359
- if (Qtrue != breakpoint->enabled)
360
- return 0;
361
-
362
- switch (breakpoint->hit_condition)
363
- {
364
- case HIT_COND_NONE:
365
- return 1;
366
- case HIT_COND_GE:
367
- {
368
- if (breakpoint->hit_count >= breakpoint->hit_value)
369
- return 1;
370
- break;
371
- }
372
- case HIT_COND_EQ:
373
- {
374
- if (breakpoint->hit_count == breakpoint->hit_value)
375
- return 1;
376
- break;
377
- }
378
- case HIT_COND_MOD:
379
- {
380
- if (breakpoint->hit_count % breakpoint->hit_value == 0)
381
- return 1;
382
- break;
383
- }
384
- }
385
- return 0;
386
- }
387
-
388
- static int
389
- check_breakpoint_by_pos(VALUE rb_breakpoint, char *file, int line)
390
- {
391
- breakpoint_t *breakpoint;
392
-
393
- if (NIL_P(rb_breakpoint))
394
- return 0;
395
-
396
- Data_Get_Struct(rb_breakpoint, breakpoint_t, breakpoint);
397
-
398
- if (Qfalse == breakpoint->enabled || breakpoint->type != BP_POS_TYPE
399
- || breakpoint->pos.line != line)
400
- return 0;
401
-
402
- return filename_cmp(breakpoint->source, file);
403
- }
404
-
405
- static int
406
- check_breakpoint_by_method(VALUE rb_breakpoint, VALUE klass, ID mid, VALUE self)
407
- {
408
- breakpoint_t *breakpoint;
409
-
410
- if (NIL_P(rb_breakpoint))
411
- return 0;
412
-
413
- Data_Get_Struct(rb_breakpoint, breakpoint_t, breakpoint);
414
-
415
- if (Qfalse == breakpoint->enabled || breakpoint->type != BP_METHOD_TYPE
416
- || breakpoint->pos.mid != mid)
417
- return 0;
418
-
419
- if (classname_cmp(breakpoint->source, klass)
420
- || ((rb_type(self) == T_CLASS || rb_type(self) == T_MODULE)
421
- && classname_cmp(breakpoint->source, self)))
422
- return 1;
423
-
424
- return 0;
425
- }
426
-
427
- static int
428
- check_breakpoint_by_expr(VALUE rb_breakpoint, VALUE bind)
429
- {
430
- breakpoint_t *breakpoint;
431
- VALUE args, expr_result;
432
-
433
- if (NIL_P(rb_breakpoint))
434
- return 0;
435
-
436
- Data_Get_Struct(rb_breakpoint, breakpoint_t, breakpoint);
437
-
438
- if (Qfalse == breakpoint->enabled)
439
- return 0;
440
-
441
- if (NIL_P(breakpoint->expr))
442
- return 1;
443
-
444
- args = rb_ary_new3(2, breakpoint->expr, bind);
445
- expr_result = rb_protect(eval_expression, args, 0);
446
-
447
- return RTEST(expr_result);
448
- }
449
-
450
- extern VALUE
451
- find_breakpoint_by_pos(VALUE breakpoints, VALUE source, VALUE pos, VALUE bind)
452
- {
453
- VALUE breakpoint;
454
- char *file;
455
- int line;
456
- int i;
457
-
458
- file = RSTRING_PTR(source);
459
- line = FIX2INT(pos);
460
- for (i = 0; i < RARRAY_LENINT(breakpoints); i++)
461
- {
462
- breakpoint = rb_ary_entry(breakpoints, i);
463
- if (check_breakpoint_by_pos(breakpoint, file, line)
464
- && check_breakpoint_by_expr(breakpoint, bind)
465
- && check_breakpoint_by_hit_condition(breakpoint))
466
- {
467
- return breakpoint;
468
- }
469
- }
470
- return Qnil;
471
- }
472
-
473
- extern VALUE
474
- find_breakpoint_by_method(VALUE breakpoints, VALUE klass, ID mid, VALUE bind,
475
- VALUE self)
476
- {
477
- VALUE breakpoint;
478
- int i;
479
-
480
- for (i = 0; i < RARRAY_LENINT(breakpoints); i++)
481
- {
482
- breakpoint = rb_ary_entry(breakpoints, i);
483
- if (check_breakpoint_by_method(breakpoint, klass, mid, self)
484
- && check_breakpoint_by_expr(breakpoint, bind)
485
- && check_breakpoint_by_hit_condition(breakpoint))
486
- {
487
- return breakpoint;
488
- }
489
- }
490
- return Qnil;
491
- }
492
-
493
- void
494
- Init_breakpoint(VALUE mByebug)
495
- {
496
- breakpoint_max = 0;
497
-
498
- cBreakpoint = rb_define_class_under(mByebug, "Breakpoint", rb_cObject);
499
-
500
- rb_define_alloc_func(cBreakpoint, brkpt_create);
501
- rb_define_method(cBreakpoint, "initialize", brkpt_initialize, 3);
502
-
503
- rb_define_method(cBreakpoint, "enabled?", brkpt_enabled, 0);
504
- rb_define_method(cBreakpoint, "enabled=", brkpt_set_enabled, 1);
505
- rb_define_method(cBreakpoint, "expr", brkpt_expr, 0);
506
- rb_define_method(cBreakpoint, "expr=", brkpt_set_expr, 1);
507
- rb_define_method(cBreakpoint, "hit_count", brkpt_hit_count, 0);
508
- rb_define_method(cBreakpoint, "hit_condition", brkpt_hit_condition, 0);
509
- rb_define_method(cBreakpoint, "hit_condition=", brkpt_set_hit_condition, 1);
510
- rb_define_method(cBreakpoint, "hit_value", brkpt_hit_value, 0);
511
- rb_define_method(cBreakpoint, "hit_value=", brkpt_set_hit_value, 1);
512
- rb_define_method(cBreakpoint, "id", brkpt_id, 0);
513
- rb_define_method(cBreakpoint, "pos", brkpt_pos, 0);
514
- rb_define_method(cBreakpoint, "source", brkpt_source, 0);
515
-
516
- idEval = rb_intern("eval");
517
- }