Debugging segfault on swig/python/c++
Posted
by
Pradyot
on Stack Overflow
See other posts from Stack Overflow
or by Pradyot
Published on 2012-08-20T18:03:23Z
Indexed on
2012/08/28
15:39 UTC
Read the original article
Hit count: 333
I am trying to figure out what the best way to debug a segault with swig/python/c++. A core file is being generated. I have a basic MessageFactory(defined in c++ that provides a simple interface to accept a few strings as input and return a string as output). This interface is then specified in a .i file. swig is used to generate Wrapper.cpp as well as a MessageFactory.py from the .i file. This along with supporting files is compiled into a dynamic lib. The point of failure , is when the MessageFactory is instantiated within python code. Any suggestions on how I can go about debugging this? I've tried running the script within pdb, what I know from that is import on the generated MessageFactory.py is whats causing the seg-fault.
© Stack Overflow or respective owner