File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ class NativeDebugger
9999 if debase_path . size == 0
100100 raise 'No debase gem found.'
101101 end
102- @path_to_attach = debase_path [ 0 ] + '/attach.so'
102+ @path_to_attach = find_attach_lib ( debase_path [ 0 ] )
103103
104104 @gems_to_include = '["' + gems_to_include * '", "' + '"]'
105105 @debugger_loader_path = debugger_loader_path
@@ -112,6 +112,18 @@ class NativeDebugger
112112 $stdout. puts "executed '#{ launch_string } '"
113113 end
114114
115+ def find_attach_lib ( debase_path )
116+ attach_lib = debase_path + '/attach'
117+ known_extensions = %w( .so .bundle .dll )
118+ known_extensions . each do |ext |
119+ if File . file? ( attach_lib + ext )
120+ return attach_lib + ext
121+ end
122+ end
123+
124+ raise 'Could not find attach library'
125+ end
126+
115127 def attach_to_process
116128 execute "attach #{ @pid } "
117129 end
You can’t perform that action at this time.
0 commit comments