Does RubyInject work on Snow Leopard? I'm having no success.
I checked it out from Subversion. To get it to build, I had to make
some changes to the Xcode project:
1. In mach_inject.c, change references such as e.g.
remoteThreadState.srr0 to remoteThreadState.__srr0.
2. Change SDKROOT from Mac OS X 10.4 to current OS version.
After that, it built fine and I put the framework in
/Library/Frameworks. I can't get injection to work, though. At first I
thought I might need to upgrade RubyCocoa, so I downloaded and
installed 1.0.1. That didn't help, though.
Here is what happens. I type "ruby --verbose ./inject.rb 0" and this
is the output:
Injecting to pid 1899
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_wrapper.rb:50:
[BUG] Bus Error
ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]
Abort trap
During this, TextEdit launches and pops up a blank window.
I have also tried running it with --debug. It shows several LoadError,
NameError, and NoMethodError exceptions that don't show up otherwise.
Could this be part of my problem? I'm not going to post the long debug
output until I find out if there is any hope of getting this working.
Thanks.
|