Cannot launch Debugger

Asked by Tao on 2011-01-31

Hi all,
I met a problem when I tried to launch the debugger. Actually, I got the scons.profile-default as bellow:
PREFIX = '/home/tao/yade/YADEb2'
debug = True
features = 'gts,log4cxx,opengl,openmp,qt4,vtk'
version = 'b2'
CXX = 'ccache g++'
CXXFLAGS = []
defThreads = 2
SHCCFLAGS = ['-fPIC']

The problem is that when a "segmentation fault" occurs, the debugger cannot be automatically launched at crash. I do not know how to handle that then. Could anybody tell me a solution?

Thanks,

Tao

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2011-01-31
Last reply:
2011-01-31

I think it is too late for live debugging when you hit the segfault
point. You get a backtrace and that is all.
Do you know this: https://yade-dem.org/wiki/Debugging_using_Kdevelop?

Václav Šmilauer (eudoxos) said : #2

Hi Thao,

first, do you have gdb installed?

Second, you can always run Yade in debugger from the start,

$ gdb /usr/bin/python
...
(gdb) run /usr/local/bin/yade-something --debug script.py ## put where yade is installed
... ## wait for it to crap out
(gdb) thread apply bt full

Third, watch out for the debug=True/False flag. If you compile with debugging, you need to run yade with --debug, otherwise the non-debug version (which installs plugins without the /dbg/ subdir) is run.

HTH, v.

(PS. Please for the others... I appreciate that you are trying to answer, but... can you be more to the point perhaps? No offense.)

Can you help with this problem?

Provide an answer of your own, or ask Tao for more information if necessary.

To post a message you must log in.