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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7205ab825e73dec9e58c552039eb0ad008b0c9a3
4
- data.tar.gz: 777370ca5433815cce248004427bf57a8d363146
3
+ metadata.gz: bdf6589dee7058d075446f1ddaab42fcd7754cbd
4
+ data.tar.gz: 530a2b04abc0c9b34d47c84c9b38884153bf0a11
5
5
  SHA512:
6
- metadata.gz: 0fcaa4fe57d8d36fbbbe47ada4619dfc192c3889e302067aa22d81cff647941065a3d5bc17d24f56b9229b152eebab2380fa104e022094388208d9c7b257f93c
7
- data.tar.gz: 9d32a329843e7a6ff1528b272043a77dd7364bc6df7d1c4ca544321e4df1ae3df42b8390f5e79dea8207ff0a780625de0ea4279587124e22c914868f61eb05f4
6
+ metadata.gz: ab22b6214df96fdd1437a53cd7d9abd634a89b357a8c70df433f8d18321b93bfb483a9251f544ee30043c41a9490c4d8012525e3ad4f2307ab0e155c498877c3
7
+ data.tar.gz: 0f6835a671d3b19c500c2fd97ef49a87ccc94d009c9ae830d25c53f88f8eec280624971f386208b21dad830eccec61afcf9c411d161b87714aacb119c760158c
@@ -1,3 +1,3 @@
1
1
  module Eclipsed
2
- VERSION = "0.2.2"
2
+ VERSION = "0.3.0"
3
3
  end
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.2.2
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 00:00:00.000000000 Z
11
+ date: 2016-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler