[PD-dev] how to debug segfaults in pd

Hans-Christoph Steiner hans at at.or.at
Thu Dec 10 18:09:20 CET 2009

For segfaults, I think that gdb is the best way to track it down.   
Once the segfault happens, you can get the backtrace (bt) to see where  
it happened.  Then you can set breakpoint to make the execution stop  
at a certain point of the code, and step thru the code to see the  
values in the variables.  There are lots of tutorials for gdb, here's  
how to hook up gdb to Pd:



On Dec 9, 2009, at 9:42 PM, Ivica Ico Bukvic wrote:

> I guess title says it all. I've noticed that sometimes Pd segfaults,  
> even locks the machine and I am trying to trace down the problem.  
> Patches in question are relatively complex and use various externals  
> and they don't crash every time. I am using Linux and would like to  
> find out how to debug this thing (e.g. using gdb or other tools). If  
> possible, I would appreciate verbose answers as I've never delved  
> into runtime debugging tools (beyond setting up verbose checkpoints  
> using stderr messages, which in this case appear not to be very  
> helpful).
> Please advise.
> Best wishes,
> Ivica Ico Bukvic, D.M.A.
> Composition, Music Technology
> Director, DISIS Interactive Sound & Intermedia Studio
> Director, L2Ork Linux Laptop Orchestra
> Assistant Co-Director, CCTAD
> CHCI, CS, and Art (by courtesy)
> Virginia Tech
> Dept. of Music - 0240
> Blacksburg, VA 24061
> (540) 231-6139
> (540) 231-5034 (fax)
> ico at vt.edu
> http://www.music.vt.edu/faculty/bukvic/
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev


Access to computers should be unlimited and total.  - the hacker ethic

More information about the Pd-dev mailing list