-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruby attach to process #82
Ruby attach to process #82
Conversation
bb9029a
to
82d6f3c
Compare
82d6f3c
to
93f7156
Compare
93f7156
to
72b1c4a
Compare
options.pid = pid | ||
end | ||
|
||
opts.on("--sdk-path SDK_PATH", "path to ruby interpreter") do |sdk_path| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SDK is IDE concept, I'd suggest using something like --ruby-path
…in separate file. `enable_trace_points` call (wrong) replaced with empty_file loading (ugly but should always work). Including gems into $LOAD_PATH.
@denofevil pushed some fixes |
unless options.sdk_path | ||
$stderr.puts "You must specify SDK_PATH of ruby interpreter" | ||
unless options.ruby_path | ||
$stderr.puts "You must specify RUBY_PATH of ruby interpreter" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about "You should specify path to the ruby interpreter"?
…ebugger.cli_debug = options.cli_debug; bug fix: check RUBYOPT and $: if they already contain our paths (relevant in case of attaching several time to some process); bug fix: calling `prepare_context` instead of `enable_tracepoints`; calling `init_variables` to reset all debase variables from previous attaching
commands_list << "cont" | ||
$pid = options.pid | ||
$last_bt = '' | ||
$gdb_tmp_file = '/tmp/gdb_out.txt' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to use tempfile.rb instead. It's cross-platform and generates unique names, so you won't need line 69
…is is needed for attach mode: if we detached `pre_child` should not be called in `fork` and `exec`
e907772
to
c066895
Compare
@denofevil