debase 0.2.3.beta3 → 0.2.3.beta4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 54843a17de6b5740fea57e2c8ca1759d071748beed251dd0a13a4f3737dbd898
4
- data.tar.gz: 6f60ddfba72e780a4da776300b35f9a0d66b077d09e8453ba586175a3175c0e6
2
+ SHA1:
3
+ metadata.gz: 0ab6aa605704f82f8d20fccc0b7aba1a2790a64e
4
+ data.tar.gz: e932ae5bf06bed324738e1f7c260333c3e54be04
5
5
  SHA512:
6
- metadata.gz: 1d6c8944d7e52516ac50f75b913f7680ff5af7b84563f4b12c74308d6b5677a0b629fd2d941f4a4b82d9374535a66ff5d2760c50e7e903cde1db40f40599a142
7
- data.tar.gz: a007f10480e1f457a7aefd38ef947804dfc9712f41359c49ad2d6e45610ec489759467197e5e29f9214621fbd5dbdcabb9bef3e8114b3b24b19ee5c9a91696ce
6
+ metadata.gz: 8410ac3816e22adfd65d8ddc882af826291400700d7ec61a740e3b391fbef05abca1cc0d8ffb26341d675b1518211923d51b89fcfb1bb3611f196306fe010d82
7
+ data.tar.gz: a3e01772f780cbd70a44b0cab7e291de31988f48f25c563e3c4f3d7e8eb77b8eb02411ee6beab9a5b6c2fdd4de0829017a4339bfe02fd308150af729f6d4a63f
@@ -637,47 +637,6 @@ Debase_enable_file_filtering(VALUE self, VALUE value)
637
637
  return value;
638
638
  }
639
639
 
640
- #if RUBY_API_VERSION_CODE >= 20500 && !(RUBY_RELEASE_YEAR == 2017 && RUBY_RELEASE_MONTH == 10 && RUBY_RELEASE_DAY == 10)
641
- static const rb_iseq_t *
642
- my_iseqw_check(VALUE iseqw)
643
- {
644
- rb_iseq_t *iseq = DATA_PTR(iseqw);
645
-
646
- if (!iseq->body) {
647
- ibf_load_iseq_complete(iseq);
648
- }
649
-
650
- if (!iseq->body->location.label) {
651
- rb_raise(rb_eTypeError, "uninitialized InstructionSequence");
652
- }
653
- return iseq;
654
- }
655
-
656
- static void
657
- Debase_set_trace_flag_to_iseq(VALUE self, VALUE rb_iseq) {
658
- if (!SPECIAL_CONST_P(rb_iseq) && RBASIC_CLASS(rb_iseq) == rb_cISeq) {
659
- rb_iseq_t *iseq = my_iseqw_check(rb_iseq);
660
- rb_iseq_trace_set(iseq, RUBY_EVENT_TRACEPOINT_ALL);
661
- }
662
- }
663
-
664
- static void
665
- Debase_unset_trace_flags(VALUE self, VALUE rb_iseq) {
666
- if (!SPECIAL_CONST_P(rb_iseq) && RBASIC_CLASS(rb_iseq) == rb_cISeq) {
667
- rb_iseq_t *iseq = my_iseqw_check(rb_iseq);
668
- rb_iseq_trace_set(iseq, RUBY_EVENT_NONE);
669
- }
670
- }
671
- #else
672
- static void
673
- Debase_set_trace_flag_to_iseq(VALUE self, VALUE rb_iseq) {
674
- }
675
-
676
- static void
677
- Debase_unset_trace_flags(VALUE self, VALUE rb_iseq) {
678
- }
679
- #endif
680
-
681
640
  static VALUE
682
641
  Debase_init_variables()
683
642
  {
@@ -721,10 +680,6 @@ Init_debase_internals()
721
680
  rb_define_module_function(mDebase, "enable_trace_points", Debase_enable_trace_points, 0);
722
681
  rb_define_module_function(mDebase, "prepare_context", Debase_prepare_context, 0);
723
682
  rb_define_module_function(mDebase, "init_variables", Debase_init_variables, 0);
724
- rb_define_module_function(mDebase, "set_trace_flag_to_iseq", Debase_set_trace_flag_to_iseq, 1);
725
-
726
- //use only for tests
727
- rb_define_module_function(mDebase, "unset_iseq_flags", Debase_unset_trace_flags, 1);
728
683
 
729
684
  idAlive = rb_intern("alive?");
730
685
  idAtLine = rb_intern("at_line");
@@ -21,22 +21,9 @@ module Debase
21
21
  Debugger.const_set('PROG_SCRIPT', $0) unless defined? Debugger::PROG_SCRIPT
22
22
  Debugger.const_set('INITIAL_DIR', Dir.pwd) unless defined? Debugger::INITIAL_DIR
23
23
 
24
- monkey_patch_prepend
25
-
26
24
  Debugger.started? ? block && block.call(self) : Debugger.start_(&block)
27
25
  end
28
26
 
29
- def monkey_patch_prepend
30
- class << RubyVM::InstructionSequence
31
- def self.prepend(mod, *smth)
32
- super
33
- if mod.to_s.include?('Bootsnap') && RUBY_VERSION >= "2.5"
34
- prepend InstructionSequenceMixin
35
- end
36
- end
37
- end
38
- end
39
-
40
27
  # @param [String] file
41
28
  # @param [Fixnum] line
42
29
  # @param [String] expr
@@ -95,21 +82,6 @@ module Debase
95
82
  def file_filter
96
83
  @file_filter ||= FileFilter.new
97
84
  end
98
-
99
- module InstructionSequenceMixin
100
- def load_iseq(path)
101
- iseq = super(path)
102
-
103
- do_set_flags(iseq)
104
-
105
- iseq
106
- end
107
-
108
- def do_set_flags(iseq)
109
- Debugger.set_trace_flag_to_iseq(iseq)
110
- iseq.each_child { |child_iseq| do_set_flags(child_iseq) } if iseq.respond_to? :each_child
111
- end
112
- end
113
85
  end
114
86
 
115
87
  class FileFilter
@@ -1,3 +1,3 @@
1
1
  module Debase
2
- VERSION = "0.2.3.beta3" unless defined? VERSION
2
+ VERSION = "0.2.3.beta4" unless defined? VERSION
3
3
  end
@@ -44,35 +44,4 @@ class TestDebugLoad < Test::Unit::TestCase
44
44
  ensure
45
45
  Debugger.stop if Debugger.started?
46
46
  end
47
-
48
- module MyBootsnap
49
- def load_iseq(path)
50
- iseq = RubyVM::InstructionSequence.compile_file(path)
51
-
52
- Debugger.unset_iseq_flags(iseq)
53
- iseq
54
- end
55
- end
56
-
57
- def test_bootsnap
58
- @@at_line = nil
59
- src_dir = File.dirname(__FILE__)
60
- prog_script = File.join(src_dir, 'example', 'bootsnap', 'bootsnap.rb')
61
-
62
- class << RubyVM::InstructionSequence
63
- prepend MyBootsnap
64
- end
65
- bt = Debugger.debug_load(prog_script, true)
66
- assert_equal(nil, bt)
67
- assert_not_nil(@@at_line)
68
- if RUBY_VERSION >= '2.5'
69
- assert_equal(['debase.rb', 101], @@at_line)
70
- end
71
-
72
- assert(Debugger.started?)
73
- Debugger.stop
74
-
75
- class << RubyVM::InstructionSequence; self end.class_eval { undef_method :load_iseq }
76
-
77
- end
78
47
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3.beta3
4
+ version: 0.2.3.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Ushakov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-08 00:00:00.000000000 Z
11
+ date: 2019-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase-ruby_core_source
@@ -136,7 +136,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  - !ruby/object:Gem::Version
137
137
  version: 1.3.1
138
138
  requirements: []
139
- rubygems_version: 3.0.1
139
+ rubyforge_project: debase
140
+ rubygems_version: 2.5.2.3
140
141
  signing_key:
141
142
  specification_version: 4
142
143
  summary: debase is a fast implementation of the standard Ruby debugger debug.rb for