[Pharo-project] changing a method on an image file without loading the image
Hi, my image got broken and I think I know (thanks to the dump) what I should change. But it won't load so I need to modify the image file from the outside world. Is there any way? Cheers, Javier. -- Lic. Javier Pimás Ciudad de Buenos Aires
melkyades wrote:
But it won't load
You might be able to debug from the VM side. See http://forum.world.st/Fwd-Oops-I-put-a-halt-in-a-startup-method-td3800729.ht... HTH, Sean -- View this message in context: http://forum.world.st/changing-a-method-on-an-image-file-without-loading-the... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Thanks all. I finally could recover almost everything from the .changes file. Anyway, the idea of changing a bit the vm could work, and also debugging with GDB may make it possible to solve the problem. I'll keep these possibilities for the next time. Thanks, Javier. On Tue, Nov 15, 2011 at 2:12 PM, Sean P. DeNigris <sean@clipperadams.com>wrote:
melkyades wrote:
But it won't load
You might be able to debug from the VM side. See
http://forum.world.st/Fwd-Oops-I-put-a-halt-in-a-startup-method-td3800729.ht...
HTH, Sean
-- View this message in context: http://forum.world.st/changing-a-method-on-an-image-file-without-loading-the... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Lic. Javier Pimás Ciudad de Buenos Aires
Yeah, you should run the VM simulator and figure out what's really going wrong. -C -- Craig Latta www.netjam.org/resume +31 6 2757 7177 + 1 415 287 3547
what we did with Camillo last time is putting ^self bytecode into offending method. It is easy to do: - open an image which is close to one which is broken, find the offending method, then check its bytecode. now open the broken image in binary/hex editor and search for bytecode sequence. To make sure that you editing right place, you should choose the unique bytecode sequence, so if offending method is not-so unique, like '^ self foo' then look in method foo etc. Then you just change the first bytecode of that method to return nil or self (whatever fits) and like that image can boot and you will be able to fix it. -- Best regards, Igor Stasenko.
Craig Latta wrote
Yeah, you should run the VM simulator and figure out what's really going wrong.
Thanks Craig. Is there documentation anywhere? I have no idea how to do that. Also, which image would I use? I don't think the simulator is working in the Jenkins vm images and we couldn't quite get it working in Spoon at ESUG. Sean -- View this message in context: http://forum.world.st/changing-a-method-on-an-image-file-without-loading-the... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Yeah, you should run the VM simulator and figure out what's really going wrong.
Thanks Craig. Is there documentation anywhere?
See http://wiki.squeak.org/squeak/2465/. The memorable way to find that is to Google "squeak stimulator". :)
Also, which image would I use? I don't think the simulator is working in the Jenkins vm images and we couldn't quite get it working in Spoon at ESUG.
I'd be happy to help you with it interactively. Please feel free to call me on Skype whenever you see me there. My ID is "threnkeldwingnut". thanks, -C -- Craig Latta www.netjam.org/resume +31 6 2757 7177 + 1 415 287 3547
participants (4)
-
Craig Latta -
Igor Stasenko -
Javier Pimás -
Sean P. DeNigris