mxmssh / idapython

Automatically exported from code.google.com/p/idapython
Other
0 stars 0 forks source link

libpython exports not available to python plugins #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile current version (1.1.91) on linux against IDA Pro 5.4
2. Install MySQLdb python extension (although other extensions also suffer)
3. Open python script box (Alt-8), execute 'import _mysql'

What is the expected output? What do you see instead?

Expected output is nothing, Actual output is an ImportError exception
because _mysql.so depends on Py_* symbols in libpython[X.Y].so but these
are not exported due to the way IDA Pro loads python.plx, and implicitly
loads libpython[X.Y].so

What version of the product are you using? On what operating system?

See above.

Please provide any additional information below.

A patch is available which solves this issue for me. It works by calling
dlopen() explicitly on libpython[X.Y].so and updating the flags to export
symbols from the library.

I do not know if a similar issue exists on MacOS X, and I am unable to test
this presently.

Original issue reported on code.google.com by phil.ashby@bt.com on 7 May 2009 at 2:03

GoogleCodeExporter commented 9 years ago
Patch to python.cpp which fixes this issue for me.

Original comment by phil.ashby@bt.com on 7 May 2009 at 2:05

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by gergely.erdelyi on 21 May 2009 at 5:19

GoogleCodeExporter commented 9 years ago
Nice fix for this long-standing problem! Thanks!

Original comment by gergely.erdelyi on 21 May 2009 at 7:30