fluid_cli 0.1.3 → 0.1.4
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 +4 -4
- data/Rakefile +0 -1
- data/exe/fluid +0 -3
- data/lib/fluid_cli/version.rb +1 -1
- data/lib/fluid_cli.rb +0 -1
- data/packaging/homebrew/fluid_cli.base.rb +0 -2
- metadata +1 -39
- data/vendor/deps/debug/CONTRIBUTING.md +0 -573
- data/vendor/deps/debug/Gemfile +0 -10
- data/vendor/deps/debug/LICENSE.txt +0 -22
- data/vendor/deps/debug/README.md +0 -996
- data/vendor/deps/debug/Rakefile +0 -57
- data/vendor/deps/debug/TODO.md +0 -23
- data/vendor/deps/debug/debug.gemspec +0 -33
- data/vendor/deps/debug/exe/rdbg +0 -53
- data/vendor/deps/debug/ext/debug/Makefile +0 -273
- data/vendor/deps/debug/ext/debug/debug.c +0 -228
- data/vendor/deps/debug/ext/debug/debug_version.h +0 -1
- data/vendor/deps/debug/ext/debug/extconf.rb +0 -27
- data/vendor/deps/debug/ext/debug/iseq_collector.c +0 -93
- data/vendor/deps/debug/lib/debug/abbrev_command.rb +0 -77
- data/vendor/deps/debug/lib/debug/breakpoint.rb +0 -556
- data/vendor/deps/debug/lib/debug/client.rb +0 -263
- data/vendor/deps/debug/lib/debug/color.rb +0 -123
- data/vendor/deps/debug/lib/debug/config.rb +0 -592
- data/vendor/deps/debug/lib/debug/console.rb +0 -224
- data/vendor/deps/debug/lib/debug/dap_custom/traceInspector.rb +0 -336
- data/vendor/deps/debug/lib/debug/debug.bundle +0 -0
- data/vendor/deps/debug/lib/debug/frame_info.rb +0 -190
- data/vendor/deps/debug/lib/debug/irb_integration.rb +0 -37
- data/vendor/deps/debug/lib/debug/local.rb +0 -115
- data/vendor/deps/debug/lib/debug/open.rb +0 -13
- data/vendor/deps/debug/lib/debug/open_nonstop.rb +0 -15
- data/vendor/deps/debug/lib/debug/prelude.rb +0 -50
- data/vendor/deps/debug/lib/debug/server.rb +0 -534
- data/vendor/deps/debug/lib/debug/server_cdp.rb +0 -1348
- data/vendor/deps/debug/lib/debug/server_dap.rb +0 -1108
- data/vendor/deps/debug/lib/debug/session.rb +0 -2667
- data/vendor/deps/debug/lib/debug/source_repository.rb +0 -150
- data/vendor/deps/debug/lib/debug/start.rb +0 -5
- data/vendor/deps/debug/lib/debug/thread_client.rb +0 -1457
- data/vendor/deps/debug/lib/debug/tracer.rb +0 -241
- data/vendor/deps/debug/lib/debug/version.rb +0 -5
- data/vendor/deps/debug/lib/debug.rb +0 -9
- data/vendor/deps/debug/misc/README.md.erb +0 -660
data/vendor/deps/debug/Rakefile
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
require "bundler/gem_tasks"
|
|
2
|
-
require "rake/testtask"
|
|
3
|
-
|
|
4
|
-
begin
|
|
5
|
-
require "rake/extensiontask"
|
|
6
|
-
task :build => :compile
|
|
7
|
-
|
|
8
|
-
Rake::ExtensionTask.new("debug") do |ext|
|
|
9
|
-
ext.lib_dir = "lib/debug"
|
|
10
|
-
end
|
|
11
|
-
rescue LoadError
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
task :default => [:clobber, :compile, 'README.md', :check_readme, :test_console]
|
|
15
|
-
|
|
16
|
-
file 'README.md' => ['lib/debug/session.rb', 'lib/debug/config.rb',
|
|
17
|
-
'exe/rdbg', 'misc/README.md.erb'] do
|
|
18
|
-
require_relative 'lib/debug/session'
|
|
19
|
-
require 'erb'
|
|
20
|
-
File.write 'README.md', ERB.new(File.read('misc/README.md.erb')).result
|
|
21
|
-
puts 'README.md is updated.'
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
task :check_readme do
|
|
25
|
-
require_relative 'lib/debug/session'
|
|
26
|
-
require 'erb'
|
|
27
|
-
current_readme = File.read("README.md")
|
|
28
|
-
generated_readme = ERB.new(File.read('misc/README.md.erb')).result
|
|
29
|
-
|
|
30
|
-
if current_readme != generated_readme
|
|
31
|
-
fail <<~MSG
|
|
32
|
-
The content of README.md doesn't match its template and/or source.
|
|
33
|
-
Please apply the changes to info source (e.g. command comments) or the template and run 'rake README.md' to update README.md.
|
|
34
|
-
MSG
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
desc "Run debug.gem test-framework tests"
|
|
39
|
-
Rake::TestTask.new(:test_test) do |t|
|
|
40
|
-
t.test_files = FileList["test/support/*_test.rb"]
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
desc "Run all debugger console related tests"
|
|
44
|
-
Rake::TestTask.new(:test_console) do |t|
|
|
45
|
-
t.test_files = FileList["test/console/*_test.rb"]
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
desc "Run all debugger protocols (CAP & DAP) related tests"
|
|
49
|
-
Rake::TestTask.new(:test_protocol) do |t|
|
|
50
|
-
t.test_files = FileList["test/protocol/*_test.rb"]
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
task test: 'test_console' do
|
|
54
|
-
warn '`rake test` doesn\'t run protocol tests. Use `rake test_all` to test all.'
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
task test_all: [:test_test, :test_console, :test_protocol]
|
data/vendor/deps/debug/TODO.md
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# TODO
|
|
2
|
-
|
|
3
|
-
## Basic functionality
|
|
4
|
-
|
|
5
|
-
* Support Fibers and Ractors
|
|
6
|
-
|
|
7
|
-
## UI
|
|
8
|
-
|
|
9
|
-
* Multi-line support
|
|
10
|
-
* Completion for Ruby's code
|
|
11
|
-
* Interactive breakpoint setting
|
|
12
|
-
* Interactive record & play debugging
|
|
13
|
-
* irb integration
|
|
14
|
-
|
|
15
|
-
## Debug command
|
|
16
|
-
|
|
17
|
-
* Watch points
|
|
18
|
-
* Lightweight watchpoints for instance variables with Ruby 3.3 features (TP:ivar_set)
|
|
19
|
-
* Alias
|
|
20
|
-
|
|
21
|
-
## Debug port
|
|
22
|
-
|
|
23
|
-
* Debug port for monitoring
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
require_relative 'lib/debug/version'
|
|
2
|
-
|
|
3
|
-
Gem::Specification.new do |spec|
|
|
4
|
-
spec.name = "debug"
|
|
5
|
-
spec.version = DEBUGGER__::VERSION
|
|
6
|
-
spec.authors = ["Koichi Sasada"]
|
|
7
|
-
spec.email = ["ko1@atdot.net"]
|
|
8
|
-
|
|
9
|
-
spec.summary = %q{Debugging functionality for Ruby}
|
|
10
|
-
spec.description = %q{Debugging functionality for Ruby. This is completely rewritten debug.rb which was contained by the ancient Ruby versions.}
|
|
11
|
-
spec.homepage = "https://github.com/ruby/debug"
|
|
12
|
-
spec.licenses = ["Ruby", "BSD-2-Clause"]
|
|
13
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
|
14
|
-
|
|
15
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
|
16
|
-
spec.metadata["source_code_uri"] = spec.homepage
|
|
17
|
-
spec.metadata["changelog_uri"] = "#{spec.homepage}/releases/tag/v#{spec.version}"
|
|
18
|
-
|
|
19
|
-
# Specify which files should be added to the gem when it is released.
|
|
20
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
21
|
-
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
22
|
-
`git ls-files -z`.split("\x0").reject do |f|
|
|
23
|
-
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
spec.bindir = "exe"
|
|
27
|
-
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
28
|
-
spec.require_paths = ["lib"]
|
|
29
|
-
spec.extensions = ['ext/debug/extconf.rb']
|
|
30
|
-
|
|
31
|
-
spec.add_dependency "irb", "~> 1.10" # for irb:debug integration
|
|
32
|
-
spec.add_dependency "reline", ">= 0.3.8"
|
|
33
|
-
end
|
data/vendor/deps/debug/exe/rdbg
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require_relative '../lib/debug/config'
|
|
4
|
-
config = DEBUGGER__::Config::parse_argv(ARGV)
|
|
5
|
-
|
|
6
|
-
# mode is not an actual configuration option
|
|
7
|
-
# it's only used to carry the result of parse_argv here
|
|
8
|
-
case config.delete(:mode)
|
|
9
|
-
when :start
|
|
10
|
-
require 'rbconfig'
|
|
11
|
-
|
|
12
|
-
libpath = File.join(File.expand_path(File.dirname(__dir__)), 'lib/debug')
|
|
13
|
-
start_mode = config[:open] ? "open" : 'start'
|
|
14
|
-
cmd = config[:command] ? ARGV.shift : (ENV['RUBY'] || RbConfig.ruby)
|
|
15
|
-
|
|
16
|
-
if defined?($:.resolve_feature_path)
|
|
17
|
-
begin
|
|
18
|
-
_, sopath = $:.resolve_feature_path('debug/debug.so')
|
|
19
|
-
rescue LoadError
|
|
20
|
-
# raises LoadError before 3.1 (2.7 and 3.0)
|
|
21
|
-
else
|
|
22
|
-
sopath = File.dirname(File.dirname(sopath)) if sopath
|
|
23
|
-
end
|
|
24
|
-
else
|
|
25
|
-
# `$:.resolve_feature_path` is not defined in 2.6 or earlier.
|
|
26
|
-
so = "debug/debug.#{RbConfig::CONFIG['DLEXT']}"
|
|
27
|
-
sopath = $:.find {|dir| File.exist?(File.join(dir, so))}
|
|
28
|
-
end
|
|
29
|
-
added = "-r #{libpath}/#{start_mode}"
|
|
30
|
-
added = "-I #{sopath} #{added}" if sopath
|
|
31
|
-
rubyopt = ENV['RUBYOPT']
|
|
32
|
-
env = ::DEBUGGER__::Config.config_to_env_hash(config)
|
|
33
|
-
env['RUBY_DEBUG_ADDED_RUBYOPT'] = added
|
|
34
|
-
env['RUBYOPT'] = "#{rubyopt} #{added}"
|
|
35
|
-
|
|
36
|
-
exec(env, cmd, *ARGV)
|
|
37
|
-
|
|
38
|
-
when :attach
|
|
39
|
-
require_relative "../lib/debug/client"
|
|
40
|
-
::DEBUGGER__::CONFIG.set_config(**config)
|
|
41
|
-
|
|
42
|
-
begin
|
|
43
|
-
if ARGV.empty? && config[:port]
|
|
44
|
-
DEBUGGER__::Client.new([config[:host], config[:port]].compact).connect
|
|
45
|
-
else
|
|
46
|
-
DEBUGGER__::Client.new(ARGV).connect
|
|
47
|
-
end
|
|
48
|
-
rescue DEBUGGER__::CommandLineOptionError
|
|
49
|
-
puts opt.help
|
|
50
|
-
end
|
|
51
|
-
else
|
|
52
|
-
raise # assert
|
|
53
|
-
end
|
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
SHELL = /bin/sh
|
|
3
|
-
|
|
4
|
-
# V=0 quiet, V=1 verbose. other values don't work.
|
|
5
|
-
V = 0
|
|
6
|
-
V0 = $(V:0=)
|
|
7
|
-
Q1 = $(V:1=)
|
|
8
|
-
Q = $(Q1:0=@)
|
|
9
|
-
ECHO1 = $(V:1=@ :)
|
|
10
|
-
ECHO = $(ECHO1:0=@ echo)
|
|
11
|
-
NULLCMD = :
|
|
12
|
-
|
|
13
|
-
#### Start of system configuration section. ####
|
|
14
|
-
|
|
15
|
-
srcdir = .
|
|
16
|
-
topdir = /Users/pralish/.rvm/rubies/ruby-3.4.1/include/ruby-3.4.0
|
|
17
|
-
hdrdir = $(topdir)
|
|
18
|
-
arch_hdrdir = /Users/pralish/.rvm/rubies/ruby-3.4.1/include/ruby-3.4.0/arm64-darwin23
|
|
19
|
-
PATH_SEPARATOR = :
|
|
20
|
-
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
|
|
21
|
-
prefix = $(DESTDIR)/Users/pralish/.rvm/rubies/ruby-3.4.1
|
|
22
|
-
rubysitearchprefix = $(rubylibprefix)/$(sitearch)
|
|
23
|
-
rubyarchprefix = $(rubylibprefix)/$(arch)
|
|
24
|
-
rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
|
|
25
|
-
exec_prefix = $(prefix)
|
|
26
|
-
vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
|
|
27
|
-
sitearchhdrdir = $(sitehdrdir)/$(sitearch)
|
|
28
|
-
rubyarchhdrdir = $(rubyhdrdir)/$(arch)
|
|
29
|
-
vendorhdrdir = $(rubyhdrdir)/vendor_ruby
|
|
30
|
-
sitehdrdir = $(rubyhdrdir)/site_ruby
|
|
31
|
-
rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
|
|
32
|
-
vendorarchdir = $(vendorlibdir)/$(sitearch)
|
|
33
|
-
vendorlibdir = $(vendordir)/$(ruby_version)
|
|
34
|
-
vendordir = $(rubylibprefix)/vendor_ruby
|
|
35
|
-
sitearchdir = $(sitelibdir)/$(sitearch)
|
|
36
|
-
sitelibdir = $(sitedir)/$(ruby_version)
|
|
37
|
-
sitedir = $(rubylibprefix)/site_ruby
|
|
38
|
-
rubyarchdir = $(rubylibdir)/$(arch)
|
|
39
|
-
rubylibdir = $(rubylibprefix)/$(ruby_version)
|
|
40
|
-
sitearchincludedir = $(includedir)/$(sitearch)
|
|
41
|
-
archincludedir = $(includedir)/$(arch)
|
|
42
|
-
sitearchlibdir = $(libdir)/$(sitearch)
|
|
43
|
-
archlibdir = $(libdir)/$(arch)
|
|
44
|
-
ridir = $(datarootdir)/$(RI_BASE_NAME)
|
|
45
|
-
modular_gc_dir = $(DESTDIR)
|
|
46
|
-
mandir = $(datarootdir)/man
|
|
47
|
-
localedir = $(datarootdir)/locale
|
|
48
|
-
libdir = $(exec_prefix)/lib
|
|
49
|
-
psdir = $(docdir)
|
|
50
|
-
pdfdir = $(docdir)
|
|
51
|
-
dvidir = $(docdir)
|
|
52
|
-
htmldir = $(docdir)
|
|
53
|
-
infodir = $(datarootdir)/info
|
|
54
|
-
docdir = $(datarootdir)/doc/$(PACKAGE)
|
|
55
|
-
oldincludedir = $(DESTDIR)/usr/include
|
|
56
|
-
includedir = $(SDKROOT)$(prefix)/include
|
|
57
|
-
runstatedir = $(localstatedir)/run
|
|
58
|
-
localstatedir = $(prefix)/var
|
|
59
|
-
sharedstatedir = $(prefix)/com
|
|
60
|
-
sysconfdir = $(prefix)/etc
|
|
61
|
-
datadir = $(datarootdir)
|
|
62
|
-
datarootdir = $(prefix)/share
|
|
63
|
-
libexecdir = $(exec_prefix)/libexec
|
|
64
|
-
sbindir = $(exec_prefix)/sbin
|
|
65
|
-
bindir = $(exec_prefix)/bin
|
|
66
|
-
archdir = $(rubyarchdir)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
CC_WRAPPER =
|
|
70
|
-
CC = gcc
|
|
71
|
-
CXX = g++ -std=gnu++11
|
|
72
|
-
LIBRUBY = $(LIBRUBY_SO)
|
|
73
|
-
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
|
74
|
-
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
|
|
75
|
-
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static -framework CoreFoundation $(MAINLIBS)
|
|
76
|
-
empty =
|
|
77
|
-
OUTFLAG = -o $(empty)
|
|
78
|
-
COUTFLAG = -o $(empty)
|
|
79
|
-
CSRCFLAG = $(empty)
|
|
80
|
-
|
|
81
|
-
RUBY_EXTCONF_H =
|
|
82
|
-
cflags = $(hardenflags) -fdeclspec $(optflags) $(debugflags) $(warnflags)
|
|
83
|
-
cxxflags =
|
|
84
|
-
optflags = -O3 -fno-fast-math
|
|
85
|
-
debugflags = -ggdb3
|
|
86
|
-
warnflags = -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wundef
|
|
87
|
-
cppflags =
|
|
88
|
-
CCDLFLAGS = -fno-common
|
|
89
|
-
CFLAGS = $(CCDLFLAGS) -O3 -I/opt/homebrew/opt/libyaml/include -I/opt/homebrew/opt/libksba/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/zlib/include -I/opt/homebrew/opt/openssl@3/include $(cflags) -fno-common -pipe $(ARCH_FLAG)
|
|
90
|
-
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
|
|
91
|
-
DEFS =
|
|
92
|
-
CPPFLAGS = -DHAVE_RB_ISEQ -DHAVE_RB_ISEQ_PARAMETERS -DHAVE_RB_ISEQ_CODE_LOCATION -DHAVE_RB_ISEQ_TYPE -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) $(cppflags)
|
|
93
|
-
CXXFLAGS = $(CCDLFLAGS) -fdeclspec $(ARCH_FLAG)
|
|
94
|
-
ldflags = -L. -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/libksba/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/openssl@3/lib -fstack-protector-strong
|
|
95
|
-
dldflags = -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/libksba/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/openssl@3/lib -Wl,-undefined,dynamic_lookup
|
|
96
|
-
ARCH_FLAG = -arch arm64
|
|
97
|
-
DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
|
|
98
|
-
LDSHARED = $(CC) -dynamic -bundle
|
|
99
|
-
LDSHAREDXX = $(CXX) -dynamic -bundle
|
|
100
|
-
POSTLINK = dsymutil $@ 2>/dev/null; { test -z '$(RUBY_CODESIGN)' || codesign -s '$(RUBY_CODESIGN)' $@; }
|
|
101
|
-
AR = ar
|
|
102
|
-
LD = ld
|
|
103
|
-
EXEEXT =
|
|
104
|
-
|
|
105
|
-
RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
|
|
106
|
-
RUBY_SO_NAME = ruby.3.4
|
|
107
|
-
RUBYW_INSTALL_NAME =
|
|
108
|
-
RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
|
|
109
|
-
RUBYW_BASE_NAME = rubyw
|
|
110
|
-
RUBY_BASE_NAME = ruby
|
|
111
|
-
|
|
112
|
-
arch = arm64-darwin23
|
|
113
|
-
sitearch = $(arch)
|
|
114
|
-
ruby_version = 3.4.0
|
|
115
|
-
ruby = $(bindir)/$(RUBY_BASE_NAME)
|
|
116
|
-
RUBY = $(ruby)
|
|
117
|
-
BUILTRUBY = $(bindir)/$(RUBY_BASE_NAME)
|
|
118
|
-
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
|
|
119
|
-
|
|
120
|
-
RM = rm -f
|
|
121
|
-
RM_RF = rm -fr
|
|
122
|
-
RMDIRS = rmdir -p
|
|
123
|
-
MAKEDIRS = /opt/homebrew/opt/coreutils/bin/gmkdir -p
|
|
124
|
-
INSTALL = /opt/homebrew/opt/coreutils/bin/ginstall -c
|
|
125
|
-
INSTALL_PROG = $(INSTALL) -m 0755
|
|
126
|
-
INSTALL_DATA = $(INSTALL) -m 644
|
|
127
|
-
COPY = cp
|
|
128
|
-
TOUCH = exit >
|
|
129
|
-
|
|
130
|
-
#### End of system configuration section. ####
|
|
131
|
-
|
|
132
|
-
preload =
|
|
133
|
-
libpath = . $(libdir)
|
|
134
|
-
LIBPATH = -L. -L$(libdir)
|
|
135
|
-
DEFFILE =
|
|
136
|
-
|
|
137
|
-
CLEANFILES = mkmf.log
|
|
138
|
-
DISTCLEANFILES = debug_version.h
|
|
139
|
-
DISTCLEANDIRS =
|
|
140
|
-
|
|
141
|
-
extout =
|
|
142
|
-
extout_prefix =
|
|
143
|
-
target_prefix = /debug
|
|
144
|
-
LOCAL_LIBS =
|
|
145
|
-
LIBS = $(LIBRUBYARG_SHARED) -lpthread
|
|
146
|
-
ORIG_SRCS = debug.c iseq_collector.c
|
|
147
|
-
SRCS = $(ORIG_SRCS)
|
|
148
|
-
OBJS = debug.o iseq_collector.o
|
|
149
|
-
HDRS = $(srcdir)/debug_version.h
|
|
150
|
-
LOCAL_HDRS =
|
|
151
|
-
TARGET = debug
|
|
152
|
-
TARGET_NAME = debug
|
|
153
|
-
TARGET_ENTRY = Init_$(TARGET_NAME)
|
|
154
|
-
DLLIB = $(TARGET).bundle
|
|
155
|
-
EXTSTATIC =
|
|
156
|
-
STATIC_LIB =
|
|
157
|
-
|
|
158
|
-
TIMESTAMP_DIR = .
|
|
159
|
-
BINDIR = $(bindir)
|
|
160
|
-
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
|
161
|
-
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
|
162
|
-
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
|
163
|
-
HDRDIR = $(sitehdrdir)$(target_prefix)
|
|
164
|
-
ARCHHDRDIR = $(sitearchhdrdir)$(target_prefix)
|
|
165
|
-
TARGET_SO_DIR =
|
|
166
|
-
TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
|
|
167
|
-
CLEANLIBS = $(TARGET_SO) $(TARGET_SO:=.dSYM)
|
|
168
|
-
CLEANOBJS = $(OBJS) *.bak
|
|
169
|
-
TARGET_SO_DIR_TIMESTAMP = $(TIMESTAMP_DIR)/.sitearchdir.-.debug.time
|
|
170
|
-
|
|
171
|
-
all: $(DLLIB)
|
|
172
|
-
static: $(STATIC_LIB)
|
|
173
|
-
.PHONY: all install static install-so install-rb
|
|
174
|
-
.PHONY: clean clean-so clean-static clean-rb
|
|
175
|
-
|
|
176
|
-
clean-static::
|
|
177
|
-
clean-rb-default::
|
|
178
|
-
clean-rb::
|
|
179
|
-
clean-so::
|
|
180
|
-
clean: clean-so clean-static clean-rb-default clean-rb
|
|
181
|
-
-$(Q)$(RM_RF) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
|
|
182
|
-
|
|
183
|
-
distclean-rb-default::
|
|
184
|
-
distclean-rb::
|
|
185
|
-
distclean-so::
|
|
186
|
-
distclean-static::
|
|
187
|
-
distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
|
|
188
|
-
-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
|
189
|
-
-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
|
190
|
-
-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
|
|
191
|
-
|
|
192
|
-
realclean: distclean
|
|
193
|
-
install: install-so install-rb
|
|
194
|
-
|
|
195
|
-
install-so: $(DLLIB) $(TARGET_SO_DIR_TIMESTAMP)
|
|
196
|
-
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
|
197
|
-
clean-static::
|
|
198
|
-
-$(Q)$(RM) $(STATIC_LIB)
|
|
199
|
-
install-rb: pre-install-rb do-install-rb install-rb-default
|
|
200
|
-
install-rb-default: pre-install-rb-default do-install-rb-default
|
|
201
|
-
pre-install-rb: Makefile
|
|
202
|
-
pre-install-rb-default: Makefile
|
|
203
|
-
do-install-rb:
|
|
204
|
-
do-install-rb-default:
|
|
205
|
-
pre-install-rb-default:
|
|
206
|
-
@$(NULLCMD)
|
|
207
|
-
$(TARGET_SO_DIR_TIMESTAMP):
|
|
208
|
-
$(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
|
|
209
|
-
$(Q) $(TOUCH) $@
|
|
210
|
-
|
|
211
|
-
site-install: site-install-so site-install-rb
|
|
212
|
-
site-install-so: install-so
|
|
213
|
-
site-install-rb: install-rb
|
|
214
|
-
|
|
215
|
-
.SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
|
|
216
|
-
|
|
217
|
-
.cc.o:
|
|
218
|
-
$(ECHO) compiling $(<)
|
|
219
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
|
220
|
-
|
|
221
|
-
.cc.S:
|
|
222
|
-
$(ECHO) translating $(<)
|
|
223
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
|
224
|
-
|
|
225
|
-
.mm.o:
|
|
226
|
-
$(ECHO) compiling $(<)
|
|
227
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
|
228
|
-
|
|
229
|
-
.mm.S:
|
|
230
|
-
$(ECHO) translating $(<)
|
|
231
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
|
232
|
-
|
|
233
|
-
.cxx.o:
|
|
234
|
-
$(ECHO) compiling $(<)
|
|
235
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
|
236
|
-
|
|
237
|
-
.cxx.S:
|
|
238
|
-
$(ECHO) translating $(<)
|
|
239
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
|
240
|
-
|
|
241
|
-
.cpp.o:
|
|
242
|
-
$(ECHO) compiling $(<)
|
|
243
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
|
244
|
-
|
|
245
|
-
.cpp.S:
|
|
246
|
-
$(ECHO) translating $(<)
|
|
247
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
|
248
|
-
|
|
249
|
-
.c.o:
|
|
250
|
-
$(ECHO) compiling $(<)
|
|
251
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
|
252
|
-
|
|
253
|
-
.c.S:
|
|
254
|
-
$(ECHO) translating $(<)
|
|
255
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
|
256
|
-
|
|
257
|
-
.m.o:
|
|
258
|
-
$(ECHO) compiling $(<)
|
|
259
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
|
260
|
-
|
|
261
|
-
.m.S:
|
|
262
|
-
$(ECHO) translating $(<)
|
|
263
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
|
264
|
-
|
|
265
|
-
$(TARGET_SO): $(OBJS) Makefile
|
|
266
|
-
$(ECHO) linking shared-object debug/$(DLLIB)
|
|
267
|
-
-$(Q)$(RM) $(@)
|
|
268
|
-
$(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
|
269
|
-
$(Q) $(POSTLINK)
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
$(OBJS): $(HDRS) $(ruby_headers)
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
#include "ruby/ruby.h"
|
|
3
|
-
#include "ruby/debug.h"
|
|
4
|
-
#include "ruby/encoding.h"
|
|
5
|
-
#include "debug_version.h"
|
|
6
|
-
//
|
|
7
|
-
static VALUE rb_mDebugger;
|
|
8
|
-
|
|
9
|
-
// iseq
|
|
10
|
-
typedef struct rb_iseq_struct rb_iseq_t;
|
|
11
|
-
const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw);
|
|
12
|
-
VALUE rb_iseq_realpath(const rb_iseq_t *iseq);
|
|
13
|
-
|
|
14
|
-
static VALUE
|
|
15
|
-
iseq_realpath(VALUE iseqw)
|
|
16
|
-
{
|
|
17
|
-
return rb_iseq_realpath(rb_iseqw_to_iseq(iseqw));
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
static VALUE rb_cFrameInfo;
|
|
21
|
-
|
|
22
|
-
static VALUE
|
|
23
|
-
di_entry(VALUE loc, VALUE self, VALUE binding, VALUE iseq, VALUE klass, VALUE depth)
|
|
24
|
-
{
|
|
25
|
-
return rb_struct_new(rb_cFrameInfo,
|
|
26
|
-
// :location, :self, :binding, :iseq, :class, :frame_depth,
|
|
27
|
-
loc, self, binding, iseq, klass, depth,
|
|
28
|
-
// :has_return_value, :return_value,
|
|
29
|
-
Qnil, Qnil,
|
|
30
|
-
// :has_raised_exception, :raised_exception,
|
|
31
|
-
Qnil, Qnil,
|
|
32
|
-
// :show_line, :local_variables
|
|
33
|
-
Qnil,
|
|
34
|
-
// :_local_variables, :_callee # for recorder
|
|
35
|
-
Qnil, Qnil,
|
|
36
|
-
// :dupped_binding
|
|
37
|
-
Qnil
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
static int
|
|
42
|
-
str_start_with(VALUE str, VALUE prefix)
|
|
43
|
-
{
|
|
44
|
-
StringValue(prefix);
|
|
45
|
-
rb_enc_check(str, prefix);
|
|
46
|
-
if (RSTRING_LEN(str) >= RSTRING_LEN(prefix) &&
|
|
47
|
-
memcmp(RSTRING_PTR(str), RSTRING_PTR(prefix), RSTRING_LEN(prefix)) == 0) {
|
|
48
|
-
return 1;
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
return 0;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
static VALUE
|
|
56
|
-
di_body(const rb_debug_inspector_t *dc, void *ptr)
|
|
57
|
-
{
|
|
58
|
-
VALUE skip_path_prefix = (VALUE)ptr;
|
|
59
|
-
VALUE locs = rb_debug_inspector_backtrace_locations(dc);
|
|
60
|
-
VALUE ary = rb_ary_new();
|
|
61
|
-
long len = RARRAY_LEN(locs);
|
|
62
|
-
long i;
|
|
63
|
-
|
|
64
|
-
for (i=1; i<len; i++) {
|
|
65
|
-
VALUE e;
|
|
66
|
-
VALUE iseq = rb_debug_inspector_frame_iseq_get(dc, i);
|
|
67
|
-
VALUE loc = RARRAY_AREF(locs, i);
|
|
68
|
-
VALUE path;
|
|
69
|
-
|
|
70
|
-
if (!NIL_P(iseq)) {
|
|
71
|
-
path = iseq_realpath(iseq);
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
// C frame
|
|
75
|
-
path = rb_funcall(loc, rb_intern("path"), 0);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if (!NIL_P(path) && !NIL_P(skip_path_prefix) && str_start_with(path, skip_path_prefix)) {
|
|
79
|
-
continue;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
e = di_entry(loc,
|
|
83
|
-
rb_debug_inspector_frame_self_get(dc, i),
|
|
84
|
-
rb_debug_inspector_frame_binding_get(dc, i),
|
|
85
|
-
iseq,
|
|
86
|
-
rb_debug_inspector_frame_class_get(dc, i),
|
|
87
|
-
#ifdef RB_DEBUG_INSPECTOR_FRAME_DEPTH
|
|
88
|
-
rb_debug_inspector_frame_depth(dc, i)
|
|
89
|
-
#else
|
|
90
|
-
INT2FIX(len - i)
|
|
91
|
-
#endif
|
|
92
|
-
);
|
|
93
|
-
rb_ary_push(ary, e);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return ary;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
static VALUE
|
|
100
|
-
capture_frames(VALUE self, VALUE skip_path_prefix)
|
|
101
|
-
{
|
|
102
|
-
return rb_debug_inspector_open(di_body, (void *)skip_path_prefix);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
#ifdef RB_DEBUG_INSPECTOR_FRAME_DEPTH
|
|
106
|
-
static VALUE
|
|
107
|
-
frame_depth(VALUE self)
|
|
108
|
-
{
|
|
109
|
-
return rb_debug_inspector_current_depth();
|
|
110
|
-
}
|
|
111
|
-
#else
|
|
112
|
-
static VALUE
|
|
113
|
-
frame_depth(VALUE self)
|
|
114
|
-
{
|
|
115
|
-
// TODO: more efficient API
|
|
116
|
-
VALUE bt = rb_make_backtrace();
|
|
117
|
-
return INT2FIX(RARRAY_LEN(bt));
|
|
118
|
-
}
|
|
119
|
-
#endif
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
// iseq
|
|
123
|
-
|
|
124
|
-
const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw);
|
|
125
|
-
|
|
126
|
-
#ifdef HAVE_RB_ISEQ_TYPE
|
|
127
|
-
VALUE rb_iseq_type(const rb_iseq_t *);
|
|
128
|
-
|
|
129
|
-
static VALUE
|
|
130
|
-
iseq_type(VALUE iseqw)
|
|
131
|
-
{
|
|
132
|
-
const rb_iseq_t *iseq = rb_iseqw_to_iseq(iseqw);
|
|
133
|
-
return rb_iseq_type(iseq);
|
|
134
|
-
}
|
|
135
|
-
#endif
|
|
136
|
-
|
|
137
|
-
#ifdef HAVE_RB_ISEQ_PARAMETERS
|
|
138
|
-
VALUE rb_iseq_parameters(const rb_iseq_t *, int is_proc);
|
|
139
|
-
|
|
140
|
-
static VALUE
|
|
141
|
-
iseq_parameters_symbols(VALUE iseqw)
|
|
142
|
-
{
|
|
143
|
-
const rb_iseq_t *iseq = rb_iseqw_to_iseq(iseqw);
|
|
144
|
-
VALUE params = rb_iseq_parameters(iseq, 0);
|
|
145
|
-
VALUE ary = rb_ary_new();
|
|
146
|
-
|
|
147
|
-
static VALUE sym_ast, sym_astast, sym_amp;
|
|
148
|
-
|
|
149
|
-
if (sym_ast == 0) {
|
|
150
|
-
sym_ast = ID2SYM(rb_intern("*"));
|
|
151
|
-
sym_astast = ID2SYM(rb_intern("**"));
|
|
152
|
-
sym_amp = ID2SYM(rb_intern("&"));
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
for (long i=0; i<RARRAY_LEN(params); i++) {
|
|
156
|
-
VALUE e = RARRAY_AREF(params, i);
|
|
157
|
-
if (RARRAY_LEN(e) == 2) {
|
|
158
|
-
VALUE sym = RARRAY_AREF(e, 1);
|
|
159
|
-
if (sym != sym_ast &&
|
|
160
|
-
sym != sym_astast &&
|
|
161
|
-
sym != sym_amp) rb_ary_push(ary, RARRAY_AREF(e, 1));
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
return ary;
|
|
166
|
-
}
|
|
167
|
-
#endif
|
|
168
|
-
|
|
169
|
-
#ifdef HAVE_RB_ISEQ_CODE_LOCATION
|
|
170
|
-
void rb_iseq_code_location(const rb_iseq_t *, int *first_lineno, int *first_column, int *last_lineno, int *last_column);
|
|
171
|
-
|
|
172
|
-
static VALUE
|
|
173
|
-
iseq_first_line(VALUE iseqw)
|
|
174
|
-
{
|
|
175
|
-
const rb_iseq_t *iseq = rb_iseqw_to_iseq(iseqw);
|
|
176
|
-
int line;
|
|
177
|
-
rb_iseq_code_location(iseq, &line, NULL, NULL, NULL);
|
|
178
|
-
return INT2NUM(line);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
static VALUE
|
|
182
|
-
iseq_last_line(VALUE iseqw)
|
|
183
|
-
{
|
|
184
|
-
const rb_iseq_t *iseq = rb_iseqw_to_iseq(iseqw);
|
|
185
|
-
int line;
|
|
186
|
-
rb_iseq_code_location(iseq, NULL, NULL, &line, NULL);
|
|
187
|
-
return INT2NUM(line);
|
|
188
|
-
}
|
|
189
|
-
#endif
|
|
190
|
-
|
|
191
|
-
#ifdef HAVE_RB_ISEQ
|
|
192
|
-
void Init_iseq_collector(void);
|
|
193
|
-
#endif
|
|
194
|
-
|
|
195
|
-
void
|
|
196
|
-
Init_debug(void)
|
|
197
|
-
{
|
|
198
|
-
#ifdef HAVE_RB_ISEQ
|
|
199
|
-
VALUE rb_mRubyVM = rb_const_get(rb_cObject, rb_intern("RubyVM"));
|
|
200
|
-
VALUE rb_cISeq = rb_const_get(rb_mRubyVM, rb_intern("InstructionSequence"));
|
|
201
|
-
#endif
|
|
202
|
-
rb_mDebugger = rb_const_get(rb_cObject, rb_intern("DEBUGGER__"));
|
|
203
|
-
rb_cFrameInfo = rb_const_get(rb_mDebugger, rb_intern("FrameInfo"));
|
|
204
|
-
|
|
205
|
-
// Debugger and FrameInfo were defined in Ruby. We need to register them
|
|
206
|
-
// as mark objects so they are automatically pinned.
|
|
207
|
-
rb_gc_register_mark_object(rb_mDebugger);
|
|
208
|
-
rb_gc_register_mark_object(rb_cFrameInfo);
|
|
209
|
-
rb_define_singleton_method(rb_mDebugger, "capture_frames", capture_frames, 1);
|
|
210
|
-
rb_define_singleton_method(rb_mDebugger, "frame_depth", frame_depth, 0);
|
|
211
|
-
rb_define_const(rb_mDebugger, "SO_VERSION", rb_str_new2(RUBY_DEBUG_VERSION));
|
|
212
|
-
|
|
213
|
-
// iseq
|
|
214
|
-
#ifdef HAVE_RB_ISEQ_TYPE
|
|
215
|
-
rb_define_method(rb_cISeq, "type", iseq_type, 0);
|
|
216
|
-
#endif
|
|
217
|
-
#ifdef HAVE_RB_ISEQ_PARAMETERS
|
|
218
|
-
rb_define_method(rb_cISeq, "parameters_symbols", iseq_parameters_symbols, 0);
|
|
219
|
-
#endif
|
|
220
|
-
#ifdef HAVE_RB_ISEQ_CODE_LOCATION
|
|
221
|
-
rb_define_method(rb_cISeq, "first_line", iseq_first_line, 0);
|
|
222
|
-
rb_define_method(rb_cISeq, "last_line", iseq_last_line, 0);
|
|
223
|
-
#endif
|
|
224
|
-
|
|
225
|
-
#ifdef HAVE_RB_ISEQ
|
|
226
|
-
Init_iseq_collector();
|
|
227
|
-
#endif
|
|
228
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
#define RUBY_DEBUG_VERSION "1.11.0"
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
require 'mkmf'
|
|
2
|
-
require_relative '../../lib/debug/version'
|
|
3
|
-
File.write("debug_version.h", "#define RUBY_DEBUG_VERSION \"#{DEBUGGER__::VERSION}\"\n")
|
|
4
|
-
$distcleanfiles << "debug_version.h"
|
|
5
|
-
|
|
6
|
-
if defined? RubyVM
|
|
7
|
-
$defs << '-DHAVE_RB_ISEQ'
|
|
8
|
-
$defs << '-DHAVE_RB_ISEQ_PARAMETERS'
|
|
9
|
-
$defs << '-DHAVE_RB_ISEQ_CODE_LOCATION'
|
|
10
|
-
|
|
11
|
-
if RUBY_VERSION >= '3.1.0'
|
|
12
|
-
$defs << '-DHAVE_RB_ISEQ_TYPE'
|
|
13
|
-
end
|
|
14
|
-
else
|
|
15
|
-
# not on MRI
|
|
16
|
-
|
|
17
|
-
have_func "rb_iseq_parameters(NULL, 0)",
|
|
18
|
-
[["VALUE rb_iseq_parameters(void *, int is_proc);"]]
|
|
19
|
-
|
|
20
|
-
have_func "rb_iseq_code_location(NULL, NULL, NULL, NULL, NULL)",
|
|
21
|
-
[["void rb_iseq_code_location(void *, int *first_lineno, int *first_column, int *last_lineno, int *last_column);"]]
|
|
22
|
-
# from Ruby 3.1
|
|
23
|
-
have_func "rb_iseq_type(NULL)",
|
|
24
|
-
[["VALUE rb_iseq_type(void *);"]]
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
create_makefile 'debug/debug'
|