Python on mac - can't extend interpreter with "catch_exception_raise"wrapper.

C

Charlie Miller

Hi. I've run into a very strange problem with Python on the mac. I'm
trying to write a python script which will monitor an application for
exceptions. It turns out on a mac, to do this you want to use the Mach
IPC interface, see:

http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/
http://www.wodeveloper.com/omniLists/macosx-dev/2000/June/msg00137.html

Once set up, you call the mach function exc_server which then calls
"catch_raise_exception" which you provide. This works great in C, so I
thought I'd wrap it for python. But, it turns out the python
interpreter already has a symbol named "catch_raise_exception", (in my
case at 0x2030 under gdb). The problem is when exc_server calls
catch_raise_exception it calls the one from the python binary and not
the one I provided and dies. Does anyone have any ideas on how to deal
with this perplexing problem?!?

Thanks!!!

Charlie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top