readapt 1.2.0 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +16 -16
  3. data/.rspec +2 -2
  4. data/.travis.yml +19 -18
  5. data/CHANGELOG.md +97 -80
  6. data/Gemfile +4 -4
  7. data/LICENSE.txt +21 -21
  8. data/README.md +37 -37
  9. data/Rakefile +14 -14
  10. data/bin/console +14 -14
  11. data/bin/setup +8 -8
  12. data/exe/readapt +5 -5
  13. data/ext/readapt/breakpoints.c +83 -83
  14. data/ext/readapt/breakpoints.h +11 -11
  15. data/ext/readapt/extconf.rb +0 -0
  16. data/ext/readapt/frame.c +137 -137
  17. data/ext/readapt/frame.h +17 -17
  18. data/ext/readapt/inspector.c +51 -51
  19. data/ext/readapt/inspector.h +8 -8
  20. data/ext/readapt/lookup_table.c +211 -211
  21. data/ext/readapt/lookup_table.h +30 -30
  22. data/ext/readapt/monitor.c +2 -2
  23. data/ext/readapt/monitor.h +0 -0
  24. data/ext/readapt/normalize.c +62 -59
  25. data/ext/readapt/normalize.h +7 -7
  26. data/ext/readapt/readapt.c +18 -18
  27. data/ext/readapt/stack.c +86 -86
  28. data/ext/readapt/stack.h +20 -20
  29. data/ext/readapt/threads.c +13 -2
  30. data/ext/readapt/threads.h +2 -1
  31. data/lib/readapt.rb +21 -21
  32. data/lib/readapt/adapter.rb +98 -98
  33. data/lib/readapt/breakpoint.rb +21 -21
  34. data/lib/readapt/data_reader.rb +62 -62
  35. data/lib/readapt/debugger.rb +227 -220
  36. data/lib/readapt/error.rb +63 -63
  37. data/lib/readapt/finder.rb +34 -34
  38. data/lib/readapt/frame.rb +40 -40
  39. data/lib/readapt/input.rb +7 -7
  40. data/lib/readapt/message.rb +62 -62
  41. data/lib/readapt/message/attach.rb +11 -11
  42. data/lib/readapt/message/base.rb +32 -32
  43. data/lib/readapt/message/configuration_done.rb +11 -11
  44. data/lib/readapt/message/continue.rb +15 -15
  45. data/lib/readapt/message/disconnect.rb +13 -13
  46. data/lib/readapt/message/evaluate.rb +18 -18
  47. data/lib/readapt/message/initialize.rb +21 -13
  48. data/lib/readapt/message/launch.rb +11 -11
  49. data/lib/readapt/message/next.rb +12 -12
  50. data/lib/readapt/message/pause.rb +11 -11
  51. data/lib/readapt/message/scopes.rb +26 -26
  52. data/lib/readapt/message/set_breakpoints.rb +25 -25
  53. data/lib/readapt/message/set_exception_breakpoints.rb +11 -8
  54. data/lib/readapt/message/stack_trace.rb +38 -38
  55. data/lib/readapt/message/step_in.rb +11 -11
  56. data/lib/readapt/message/step_out.rb +11 -11
  57. data/lib/readapt/message/threads.rb +18 -18
  58. data/lib/readapt/message/variables.rb +53 -61
  59. data/lib/readapt/monitor.rb +0 -0
  60. data/lib/readapt/output.rb +25 -25
  61. data/lib/readapt/references.rb +27 -27
  62. data/lib/readapt/server.rb +22 -22
  63. data/lib/readapt/shell.rb +104 -104
  64. data/lib/readapt/snapshot.rb +0 -0
  65. data/lib/readapt/thread.rb +20 -25
  66. data/lib/readapt/variable.rb +0 -0
  67. data/lib/readapt/version.rb +3 -3
  68. data/readapt.gemspec +39 -39
  69. metadata +10 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e59a68966e356664acd69d2d4800e4052ca1573ad28ccc5b754d299541f6673b
4
- data.tar.gz: 443c6a7c9a099e60471fb2858868d21a5a320b8e9a52abf4823efb10c810f841
3
+ metadata.gz: 2768061679bfb54d8efa38d35341d19660f86bfecff00fc6e23afeedcdfce8e3
4
+ data.tar.gz: f7ac46c3924e0b326811655778f08424bada58e7f93e437efbd4e396f68465cd
5
5
  SHA512:
6
- metadata.gz: 71f2043df9c0b0e8e07d83597dcdc88a5025b022e642225ec2b3e908a19004028606ef7d8aae91cba9865b36549f77e127e04e19e1f47127626398d9f02dca12
7
- data.tar.gz: b2773a63a86505811cb71fe1da7490984a033283c0fa0cc91c20e1dd126ad4a515a9a33f45525b5a2024ebfb6af4d5acb98e9869736c03c9cada8bea5ec68dfb
6
+ metadata.gz: ec506c8deb5503ed8ae0673bd35ee90fa9f40b2f809c6a7fae3c4c4b2722223d2cf9656e6832920a30e0a4e2ea1cd1963dba717afd051656d4db26bc4bc76d5e
7
+ data.tar.gz: 1a8168e900e4681dd72911025cde8fbf776f028d0b4fd7ad402ad3c26d3968f5f6c1cdb764cc60a647be57adf26a3ec99b7cbd703e7d2c8c47ae3e0713669046
data/.gitignore CHANGED
@@ -1,16 +1,16 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- *.so
10
- *.bundle
11
- /.vscode/
12
- .project
13
- Gemfile.lock
14
-
15
- # rspec failure tracking
16
- .rspec_status
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ *.so
10
+ *.bundle
11
+ /.vscode/
12
+ .project
13
+ Gemfile.lock
14
+
15
+ # rspec failure tracking
16
+ .rspec_status
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
- --color
2
- --require spec_helper
1
+ --color
2
+ --require spec_helper
data/.travis.yml CHANGED
@@ -1,18 +1,19 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- rvm:
5
- - 2.2
6
- - 2.3
7
- - 2.4
8
- - 2.5
9
- - 2.6
10
- - 2.7
11
- matrix:
12
- include:
13
- - rvm: 2.6
14
- os: osx
15
- before_script:
16
- - bundle install
17
- - rake compile
18
- script: rspec
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ rvm:
5
+ - 2.2
6
+ - 2.3
7
+ - 2.4
8
+ - 2.5
9
+ - 2.6
10
+ - 2.7
11
+ - 3.0
12
+ matrix:
13
+ include:
14
+ - rvm: 2.7
15
+ os: osx
16
+ before_script:
17
+ - bundle install
18
+ - rake compile
19
+ script: rspec
data/CHANGELOG.md CHANGED
@@ -1,80 +1,97 @@
1
- # 1.2.0 - February 24, 2021
2
- - Pause on exceptions
3
- - Refactored lookup tables
4
-
5
- # 1.1.1 - December 15, 2020
6
- - Update rake
7
- - Fix Encoding::UndefinedConversionError (#8)
8
-
9
- # 1.1.0 - September 13, 2020
10
- - Use 32-bit integers for variable and thread references (#6)
11
-
12
- # 1.0.0 - February 9, 2020
13
- - Refactor server and target process communication
14
- - STDIO server support
15
- - Fix zombie process bugs
16
- - Sort variables alphabetically
17
-
18
- # 0.8.1 - November 14, 2019
19
- - Header name conflict in MacOS (#4)
20
-
21
- # 0.8.0 - November 9, 2019
22
- - Multiple frames
23
- - Flush output on disconnect
24
- - Use Ruby debug inspector for stack frames
25
- - Faster line processing
26
- - Monitor disables GC
27
-
28
- # 0.7.1 - October 13, 2019
29
- - Debugger sets program name
30
-
31
- # 0.7.0 - October 12, 2019
32
- - Conditional breakpoints
33
- - Graceful shutdown (#2)
34
-
35
- # 0.6.2 - September 10, 2019
36
- - Monitor processes all new threads
37
- - Discard buggy output redirection
38
-
39
- # 0.6.1 - September 7, 2019
40
- - Ignore nilable paths in thread events
41
-
42
- # 0.6.0 - August 26, 2019
43
- - Evaluate in REPL
44
-
45
- # 0.5.0 - August 20, 2019
46
- - Monitor stores paths as C strings
47
- - Fixed malloc size for normalized paths
48
- - Fixed table insertion before existing items
49
-
50
- # 0.4.0 - August 19. 2019
51
- - Breakpoints use C implementation of hash tables
52
- - Simplified entry point detection
53
-
54
- # 0.3.5 - August 16, 2019
55
- - Variables message checks for null frames
56
-
57
- # 0.3.4 - August 12, 2019
58
- - Monitor normalizes paths.
59
-
60
- # 0.3.3 - August 12, 2019
61
- - Remove RB_NIL_P for backwards compatibility
62
-
63
- # 0.3.2 - August 11, 2019
64
- - Unnecessary thread in Backport.run
65
-
66
- # 0.3.1 - August 10. 2019
67
- - Require Ruby >= 2.2
68
-
69
- # 0.3.0 - August 9. 2019
70
- - Synchronized events
71
- - Handle multiple paused threads
72
- - Isolate the Backport machine
73
-
74
- # 0.2.0 - August 7, 2019
75
- - Find external programs
76
- - Improved stdout/stderr redirects
77
- - Individual thread control
78
-
79
- # 0.1.0 - August 5, 2019
80
- - First release
1
+ # 1.4.3 - July 23, 2021
2
+ - Remove unneeded debug output
3
+
4
+ # 1.4.2 - July 23, 2021
5
+ - Fix path normalizing in Windows
6
+
7
+ # 1.4.1 - July 8, 2021
8
+ - Thread object handling
9
+ - Rescue StandardError instead of Exception
10
+
11
+ # 1.4.0 - June 14, 2021
12
+ - Configurable exception breakpoints
13
+ - Update backport gem
14
+
15
+ # 1.3.0 - June 3, 2021
16
+ - Variables message reads class/instance variables
17
+
18
+ # 1.2.0 - February 24, 2021
19
+ - Pause on exceptions
20
+ - Refactored lookup tables
21
+
22
+ # 1.1.1 - December 15, 2020
23
+ - Update rake
24
+ - Fix Encoding::UndefinedConversionError (#8)
25
+
26
+ # 1.1.0 - September 13, 2020
27
+ - Use 32-bit integers for variable and thread references (#6)
28
+
29
+ # 1.0.0 - February 9, 2020
30
+ - Refactor server and target process communication
31
+ - STDIO server support
32
+ - Fix zombie process bugs
33
+ - Sort variables alphabetically
34
+
35
+ # 0.8.1 - November 14, 2019
36
+ - Header name conflict in MacOS (#4)
37
+
38
+ # 0.8.0 - November 9, 2019
39
+ - Multiple frames
40
+ - Flush output on disconnect
41
+ - Use Ruby debug inspector for stack frames
42
+ - Faster line processing
43
+ - Monitor disables GC
44
+
45
+ # 0.7.1 - October 13, 2019
46
+ - Debugger sets program name
47
+
48
+ # 0.7.0 - October 12, 2019
49
+ - Conditional breakpoints
50
+ - Graceful shutdown (#2)
51
+
52
+ # 0.6.2 - September 10, 2019
53
+ - Monitor processes all new threads
54
+ - Discard buggy output redirection
55
+
56
+ # 0.6.1 - September 7, 2019
57
+ - Ignore nilable paths in thread events
58
+
59
+ # 0.6.0 - August 26, 2019
60
+ - Evaluate in REPL
61
+
62
+ # 0.5.0 - August 20, 2019
63
+ - Monitor stores paths as C strings
64
+ - Fixed malloc size for normalized paths
65
+ - Fixed table insertion before existing items
66
+
67
+ # 0.4.0 - August 19. 2019
68
+ - Breakpoints use C implementation of hash tables
69
+ - Simplified entry point detection
70
+
71
+ # 0.3.5 - August 16, 2019
72
+ - Variables message checks for null frames
73
+
74
+ # 0.3.4 - August 12, 2019
75
+ - Monitor normalizes paths.
76
+
77
+ # 0.3.3 - August 12, 2019
78
+ - Remove RB_NIL_P for backwards compatibility
79
+
80
+ # 0.3.2 - August 11, 2019
81
+ - Unnecessary thread in Backport.run
82
+
83
+ # 0.3.1 - August 10. 2019
84
+ - Require Ruby >= 2.2
85
+
86
+ # 0.3.0 - August 9. 2019
87
+ - Synchronized events
88
+ - Handle multiple paused threads
89
+ - Isolate the Backport machine
90
+
91
+ # 0.2.0 - August 7, 2019
92
+ - Find external programs
93
+ - Improved stdout/stderr redirects
94
+ - Individual thread control
95
+
96
+ # 0.1.0 - August 5, 2019
97
+ - First release
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in readapt.gemspec
4
- gemspec
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in readapt.gemspec
4
+ gemspec
data/LICENSE.txt CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2019 Fred Snyder
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Fred Snyder
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,37 +1,37 @@
1
- # Readapt
2
-
3
- A Ruby debugger that supports the [Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/specification).
4
-
5
- *This gem is currently in early development*.
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'readapt'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install readapt
22
-
23
- ## Usage
24
-
25
- Run `readapt serve` to start the server. The default client connection is host 127.0.0.1, port 1234.
26
-
27
- ## Integrations
28
-
29
- Plug-ins and extensions using Readapt are available for the following editors:
30
-
31
- * **Visual Studio Code**
32
- * Marketplace: https://marketplace.visualstudio.com/items?itemName=castwide.ruby-debug
33
- * GitHub: https://github.com/castwide/vscode-ruby-debug
34
-
35
- * **Eclipse**
36
- * Marketplace: https://marketplace.eclipse.org/content/ruby-solargraph
37
- * GitHub: https://github.com/PyvesB/eclipse-solargraph
1
+ # Readapt
2
+
3
+ A Ruby debugger that supports the [Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/specification).
4
+
5
+ *This gem is currently in early development*.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'readapt'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install readapt
22
+
23
+ ## Usage
24
+
25
+ Run `readapt serve` to start the server. The default client connection is host 127.0.0.1, port 1234.
26
+
27
+ ## Integrations
28
+
29
+ Plug-ins and extensions using Readapt are available for the following editors:
30
+
31
+ * **Visual Studio Code**
32
+ * Marketplace: https://marketplace.visualstudio.com/items?itemName=castwide.ruby-debug
33
+ * GitHub: https://github.com/castwide/vscode-ruby-debug
34
+
35
+ * **Eclipse**
36
+ * Marketplace: https://marketplace.eclipse.org/content/ruby-solargraph
37
+ * GitHub: https://github.com/PyvesB/eclipse-solargraph
data/Rakefile CHANGED
@@ -1,14 +1,14 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
- require "rake/extensiontask"
4
- require 'readapt/version'
5
- require 'tmpdir'
6
-
7
- RSpec::Core::RakeTask.new(:spec)
8
-
9
- task :default => :spec
10
-
11
- # Compile tasks
12
- Rake::ExtensionTask.new "readapt" do |ext|
13
- ext.lib_dir = "lib/readapt"
14
- end
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+ require "rake/extensiontask"
4
+ require 'readapt/version'
5
+ require 'tmpdir'
6
+
7
+ RSpec::Core::RakeTask.new(:spec)
8
+
9
+ task :default => :spec
10
+
11
+ # Compile tasks
12
+ Rake::ExtensionTask.new "readapt" do |ext|
13
+ ext.lib_dir = "lib/readapt"
14
+ end
data/bin/console CHANGED
@@ -1,14 +1,14 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "readapt"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "readapt"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)