>> Now, in regards to the GDB issue: can anyone with the latest >> developer tools who also has the Universal Python build installed try >> to run python under gdb? (I have a different install of python 2.4.3 >> that I don't want to nuke by installing the universal build just to >> test this; otherwise I wouldn't ask). >> All you need to do is run >> 'gdb python' >> and then type >> 'run' >> and see if you get a python prompt, or >>> Program received signal SIGTRAP, Trace/breakpoint trap. >>> 0x8fe0100c in __dyld__dyld_start () >> >> I think you'll get the latter because of how the Universal MacPython >> is a dummy application bundle that just does an execve to the real >> python. This is known to confuse at least some versions of gdb. >> Though, with any luck, the latest version of gdb that Apple shipped >> won't be confused in this way. > > Well, you could...
It's good to have these different options listed in this email list -- thanks. I just wanted to make sure that what was going on was not an issue with Michael's slightly-old version of GDB, but a real by- product of the new MacPython situation. Anyhow, I'm only pointing this out mostly to get this information into the Google index, because this situation is bound to confuse some folks when they first try to run 'gdb python' under the new regime. While I'm sure that the execve stuff is a necessary evil (and certainly less troublesome than the pythonw mess), it's worth noting the little user-unfriendly situations like this that an "ideal" solution to the problem would not have. I guess the ball is rather in Apple's court to make things work better, but waiting around for that to happen is probably a waste. Also, what's the status of the MacPython branch vis a vis Python 2.5? Are the needed changes already in the svn for python 2.5? Or is the mac-specific branch going to stick around for a while? Just curious. Zach > explicitly run the actual python executable (potentially subject to > change in future versions of Universal Python...): > > $ gdb --args `python -c "import sys; print sys.executable"` > > Continue through the trap: > > $ gdb --args python > ... > > (gdb) r > Starting program: /Library/Frameworks/Python.framework/Versions/2.4/ > bin/python > Reading symbols for shared libraries . done > > Program received signal SIGTRAP, Trace/breakpoint trap. > 0x8fe0100c in __dyld__dyld_start () > (gdb) c > Continuing. > Reading symbols for shared libraries ... done > Python 2.4.3 (#1, Apr 7 2006, 10:54:33) > [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > Reading symbols for shared libraries .. done > >>> > > Attach: > > $ python > Python 2.4.3 (#1, Apr 7 2006, 10:54:33) > [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import os; os.getpid() > 20789 > > (from another terminal) > $ gdb > ... > (gdb) attach 20789 > Attaching to process 20789. > Reading symbols for shared libraries . done > Reading symbols for shared libraries ......... done > 0x9001f5e8 in select () > (gdb) c > Continuing. > > > -bob > _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig