eclipsed 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eclipsed/version.rb +1 -1
- data/lib/eclipsed.rb +14 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdf6589dee7058d075446f1ddaab42fcd7754cbd
|
4
|
+
data.tar.gz: 530a2b04abc0c9b34d47c84c9b38884153bf0a11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab22b6214df96fdd1437a53cd7d9abd634a89b357a8c70df433f8d18321b93bfb483a9251f544ee30043c41a9490c4d8012525e3ad4f2307ab0e155c498877c3
|
7
|
+
data.tar.gz: 0f6835a671d3b19c500c2fd97ef49a87ccc94d009c9ae830d25c53f88f8eec280624971f386208b21dad830eccec61afcf9c411d161b87714aacb119c760158c
|
data/lib/eclipsed/version.rb
CHANGED
data/lib/eclipsed.rb
CHANGED
@@ -66,7 +66,14 @@ module Eclipsed
|
|
66
66
|
end
|
67
67
|
i = i + 1
|
68
68
|
end
|
69
|
-
cmd = "ssh #{@nodelist[index.to_i]} \'export PATH=\"#{ENV['PATH']}\"; gdb --args eclipse_node \'"
|
69
|
+
cmd = "ssh #{@nodelist[index.to_i]} -t \'export PATH=\"#{ENV['PATH']}\"; gdb --args eclipse_node \'"
|
70
|
+
puts cmd
|
71
|
+
exec cmd
|
72
|
+
end
|
73
|
+
#}}}
|
74
|
+
# attach_at {{{
|
75
|
+
def attach_at(index)
|
76
|
+
cmd = "ssh #{@nodelist[index.to_i]} -t \"#{"sudo" if @sudo} gdb --pid `pgrep -u #{`whoami`.chomp} -x eclipse_node`\""
|
70
77
|
puts cmd
|
71
78
|
exec cmd
|
72
79
|
end
|
@@ -137,10 +144,15 @@ module Eclipsed
|
|
137
144
|
opts.separator " status Check the status of the network"
|
138
145
|
opts.separator " kill kill application in each node"
|
139
146
|
opts.separator ""
|
147
|
+
opts.separator "Debugging actions"
|
148
|
+
opts.separator " debug_at [N] Launch eclipseDFS with node N in gdb"
|
149
|
+
opts.separator " attach_at [N] Attach gdb to the N node"
|
150
|
+
opts.separator ""
|
140
151
|
opts.separator "Options"
|
141
152
|
opts.on_tail("-h", "--help" , "recursive this") { puts opts; exit}
|
142
153
|
opts.on_tail("-v", "--verbose" , "printout verbose info") { @verbose = true }
|
143
154
|
opts.on_tail("-V", "--version" , "printout version") { puts opts.ver; exit }
|
155
|
+
opts.on_tail("-s", "--sudo" , "Use sudo for attach") { @sudo = true }
|
144
156
|
end.parse! input
|
145
157
|
|
146
158
|
case input.shift
|
@@ -149,6 +161,7 @@ module Eclipsed
|
|
149
161
|
when 'status' then show
|
150
162
|
when 'kill' then kill input
|
151
163
|
when 'debug_at' then debug_at input[0]
|
164
|
+
when 'attach_at' then attach_at input[0]
|
152
165
|
when 'pry' then pry
|
153
166
|
else raise "Not action given"
|
154
167
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eclipsed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vicente Adolfo Bolea Sanchez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|