Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I don't know anything special in CppUTest or Eclipse to help you, but some generic segfault debugging ideas seem appropriate here:</p> <ul> <li><p>Add <em>flushing</em> print statements (e.g. printf(...) + fflush(stdout) or fprintf(stderr, ...)) to your code and see what gets printed. Do this in a binary search fashion with just a few prints at a time until you narrow down <em>exactly</em> where it is crashing. This sounds old fashioned but is extremely effective. Here is a guide I found googling that talks about this well-known technique: <a href="http://www.floccinaucinihilipilification.net/blog/2011/3/24/debugging-via-binary-search.html" rel="nofollow">http://www.floccinaucinihilipilification.net/blog/2011/3/24/debugging-via-binary-search.html</a></p></li> <li><p>Compile your code with debugging symbols and run it in a debugger. When you hit your segfault, ask for a backtrace and see if you can figure out what happened. When doing this it can be especially helpful to use a <a href="http://www.gnu.org/s/ddd/" rel="nofollow">graphical debugger</a>.</p></li> <li><p>Run your code with a debugging tool like a <a href="http://dmalloc.com/" rel="nofollow">debug malloc library</a> or something from the <a href="http://valgrind.org/" rel="nofollow">valgrind</a> suite. This may catch problems that are root causes of your segfaults but aren't occuring at the exact place where the segfault is generated (e.g. double frees, out of bound array access clobbering pointers used later, etc).</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload