Skip to content
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

Merged
merged 14 commits into from
Sep 23, 2016

Conversation

equivalence1
Copy link
Contributor

@equivalence1 equivalence1 force-pushed the ruby-attach-to-process branch 6 times, most recently from bb9029a to 82d6f3c Compare August 8, 2016 12:25
@equivalence1 equivalence1 force-pushed the ruby-attach-to-process branch from 82d6f3c to 93f7156 Compare August 8, 2016 13:31
@equivalence1 equivalence1 force-pushed the ruby-attach-to-process branch from 93f7156 to 72b1c4a Compare August 8, 2016 13:59
options.pid = pid
end

opts.on("--sdk-path SDK_PATH", "path to ruby interpreter") do |sdk_path|
Copy link
Member

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

dmitrii.kravchenko added 2 commits August 9, 2016 14:16
…in separate file. `enable_trace_points` call (wrong) replaced with empty_file loading (ugly but should always work). Including gems into $LOAD_PATH.
@equivalence1
Copy link
Contributor Author

@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"
Copy link
Member

@denofevil denofevil Aug 20, 2016

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"?

dmitrii.kravchenko and others added 2 commits August 31, 2016 19:14
…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'
Copy link
Member

@denofevil denofevil Sep 1, 2016

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

@equivalence1 equivalence1 force-pushed the ruby-attach-to-process branch from e907772 to c066895 Compare September 6, 2016 08:12
@denofevil denofevil merged commit a193e6b into ruby-debug:master Sep 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants