Re: [Pyobjc-dev] buildapp.py and bootstrapping
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2003-10-15 18:53:20
|
On Wednesday, Oct 15, 2003, at 14:43 America/New_York, Ronald Oussoren wrote: > > On 15 okt 2003, at 19:45, Bob Ippolito wrote: > >> On Wednesday, Oct 15, 2003, at 13:25 America/New_York, b.bum wrote: >> >>> Any chance of upgrading buildapp.py with one (or both) of two >>> features that would make debugging via gdb a boatload easier? >>> - add ability to copy in a bootstrap executable that uses an >>> embedded Python interpreter in place of the script/link that exist >>> today >> >> I don't see why this would be hard to do, and I think it makes sense >> and it brings back potential OS X 10.1 compatibility as well, right? >> Not that I care, but someone might. > > A bootstrap executable that uses an embedded Python interpreter might > also initialize faster, > and that definitly is usefull. Sure, I agree with that. >> Realistically though, couldn't you just write a script to launch gdb >> with the right args, like this (imagine a simple shell script to >> automate this): >> gdb --args >> /Library/Frameworks/Python.framework/Versions/2.3/Resources/ >> Python.app/Contents/MacOS/Python >> `pwd`/build/DrawBot.app/Contents/MacOS/DrawBot > > That won't work unless this correctly set argv[0] to the full path to > the wrapper inside the app bundle. Well, it does. Remember how the bundlebuilder bootstrap scripts work? execve to a symlink (if not --standalone) of python that lives in the app bundle. Of course, you're attaching GDB to Python, which runs a short script that ends up execve'ing (hopefully) the same Python.. but it does work. -bob |