Skip to content

Commit

Permalink
[Truffle] Print some debug information if we can't find argv[0].
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Dec 14, 2016
1 parent faf00ed commit 8893cde
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion truffle/src/main/ruby/core/process.rb
Expand Up @@ -162,7 +162,14 @@ def self.setproctitle_linux_from_proc_maps(title)
raise "Did not find the main class in args" unless main_index
needle = command[0...main_index]
i = haystack.index("\x00\x00#{needle}")
raise "argv[0] not found" unless i
unless i
puts
p needle
puts
p haystack
puts
raise "argv[0] not found"
end
i += 2

@_argv0_max_length = needle.bytesize
Expand Down

0 comments on commit 8893cde

Please sign in to comment.