From help-octave-request at bevo dot che dot wisc dot edu Wed Sep 17 10:35:36 2003 Subject: Re: Debugging Tools? From: David Bateman To: tsouda at polysci dot com Cc: help-octave at bevo dot che dot wisc dot edu Date: Wed, 17 Sep 2003 17:34:09 +0200 Yes, I've noticed that gdb can't give a back trace if a seg-fault occurs in an octave module. The only way I know around this at the moment is to statically link all of the modules you use into the octave binary itself. This is ugly, and I consider a last resort. I've also seen that valgrind can identify the function where the seg fault occurs, even within oct-files. The down-side is the extremely long run times when using valgrind. So if the seg-fault happens rapidly, you can use this to find approximately where the seg-fault happens, then track it down with cout/printf. So, as you see I don't really have "the solution (TM)", and if you find a better way than the two I suggest, I hope you'll tell me. D. According to tsouda at polysci dot com (on 09/17/03): > I have been working on several programs that use a combination of .m and .oct files - the majority of the work being done in the > .oct files. Do any tools exist that would help me to debug my code? I have frequently run into seg. fault problems, and tracking > down these errors through cout/printf statements has been quite time consuming. Any other debugging methods or available > tools would be greatly appreciated. > My work has been done using Octave version 2.1.49 (i686-pc-cygwin). > If the debugging method includes involved use of cygwin/unix, I would appreciate a more detailed description as > my unix skills are quite lacking. > Thanks! > > -David Tsou > > > > ------------------------------------------------------------- > Octave is freely available under the terms of the GNU GPL. > > Octave's home on the web: http://www.octave.org > How to fund new projects: http://www.octave.org/funding.html > Subscription information: http://www.octave.org/archive.html > ------------------------------------------------------------- -- David Bateman David dot Bateman at motorola dot com Motorola CRM +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------