2010年10月19日火曜日

Boost.Pythonのデバッグ

メモのみ

gdb --args python [./test.py]
C++のクラスをpythonにさらしてインタープリターからコントロールしようとすると
Segmentation fault
同じライブラリでC++のアプリから同じ手順で動かすと動く。
それもある特定のオブジェクトを使ったときだけ…不思議じゃ。
Boost PythonとBoost serializationの相性か?
boost-1.44 
Ubuntu10.04
GCC-4.4.3
python 2.6.5
 
追記10/22
どうも根が深いみたい。ここ 
gdb --args python ./test.py
だと
Program received signal SIGSEGV, Segmentation fault.
0xb5010c17 in __cxa_allocate_exception () from /usr/lib/libstdc++.so.6
LD_PRELOAD="libGL.so libstdc++.so.6" gdb --args python ./test.py
だと
Traceback (most recent call last):
  File "./test.py", line 16, in <module>
    lst.save("./test.xml")
RuntimeError: unregistered class - derived class not registered or exported

Program exited with code 01.

0 件のコメント:

コメントを投稿