Re: [Pyobjc-dev] Inject?
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2006-05-09 18:37:16
|
I think that the i386 mach_inject has hit svn already.. Check the =20 extendamac archives. As for variable vs. fixed length instructions.. I think there's a =20 preamble on every i386 function anyway that can be (ab)used to =20 replace functions. PyObjC doesn't need that functionality though, it =20 only needs to load new code, not override anything. -bob On May 9, 2006, at 8:49 AM, Saggau wrote: > Do not envy the folks working on mach_inject for Intel, for they =20 > shuttle strange rocks up steep hills. The PPC mach_inject, =20 > originally written by a really fabulous cat called Jonathan "Wolf" =20 > Rentzsch, can assume (thanks to the RISC instruction set of the =20 > PPC) that instructions are of fixed-length. Our new macintels have =20= > the advantage/disadvantage that comes with instructions of variable =20= > length (wikipedia: RISC CISC). The genius of mach_inject just got =20 > a whole lot harder to implement because running that first injected =20= > bit of code now requires some mechanism for knowing how long it is =20 > other than "it's this. always." The good news is that "Wolf" and =20 > co. appear to be approaching a solution! It also looks like the =20 > "Wolf" part of that equation is going to find some time to chew on =20 > this problem soon. He's rather in demand these days... > > We wait, but we probably won't wait long. :) > > Cheers, > Jonathan > > PS - > " > Right now we'll stay the course with instruction overwriting, but be > aware we have instruction insertion in our back pocket if x86 > > hack-arounds sufficiently pisses us off. > " - Jonathan "Wolf" Rentzsch on http://sourceforge.net/mailarchive/=20 > forum.php?thread_id=3D10018617&forum_id=3D1295 > On 5/9/06, Ronald Oussoren <ron...@ma...> wrote: > > On 9-mei-2006, at 12:18, ytrewq1 wrote: > > > Thanks to the help I received here, I've gotten most of my plug-ins > > working as Universal binaries. One of the remaining ones is =20 > basically > > a wrapper around a couple of the Inject examples. I get the =20 > following > > error when I try to run the examples: > > > > NotImplementedError: objc.inject is only supported on Mac OS X 10.3 > > and later > > That message isn't entirely true anymore, objc.inject also isn't > supported on x86 systems. I disabled it when I did the initial port > and haven't looked at it afterwards because I don't use the > functionality myself. > > IIRC mach_inject doesn't work on darwin/x86 unless you have special > privileges (aka "you're root"). Independent of this someone would > have to write the assembly > code that is used as the stub that is injected into the host > application. I've seen enough assembly code while porting libffi, and > my assembly skill isn't good enough to actually do the work anyway. > > However, it seems a port of mach_inject (which objc.inject wraps) to > intel is in progress (see the extendamac archives at http:// > sourceforge.net/mailarchive/forum.php?forum_id=3D1295), maybe we can > use that whenever it is finished. > > > > > > I take it this is related to what is mentioned about mach_inject at: > > > > http://bob.pythonmac.org/archives/2005/06/06/python-on-mac-os-x-x86/ > > Not really. > > > > Is there any hope of getting this to work? I've found the inject > > interpreter > > functionality to be a great help in developing plug-ins as the > > number of > > times I restart the host application has been reduced tremendously > > and the > > interactive development style enabled is a big plus. > > > > Is the following relevant to this issue? > > > > http://guiheneuf.org/Site/mach%20inject%20for%20intel.html > > I cannot comment on this page because I cannot open this URL (server > stops responding). > > Ronald > > > > > > > ------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > > security? > > Get stuff done quickly with pre-integrated technology to make your > > job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=120709&bid&3057&dat=1216= 42 > > _______________________________________________ > > Pyobjc-dev mailing list > > Pyo...@li... > > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > > > > > > --=20 > The extent to which an individual can resist being blindly led by =20 > tradition is a good measure of his vitality. - Harry Partch > > There is a computer disease that anybody who works with computers =20 > knows about. It's a very serious disease and it interferes =20 > completely with the work. The trouble with computers is that you =20 > 'play' with them! - Richard P. Feynman > > Few people are capable of expressing with equanimity opinions which =20= > differ from the prejudices of their social environment. Most =20 > people are not even capable of forming such opinions. - Einstein > |