On Apr 12, 2006, at 2:40 PM, Zachary Pincus wrote:

>>> This is for Bob Ippolito -
>>
>> Well it's really for Ronald, I didn't build it.  I have no idea.
>
> Sorry! Hopefully Ronald will let us know what version of readline he
> used.
>
> 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...

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

Reply via email to