Debugging Octave: Difference between revisions

294 bytes added ,  30 January 2013
no edit summary
No edit summary
Line 1: Line 1:
= Preliminaries =
= Preliminaries =
Since compilation of all the source from scratch can take long it is good to have a source folder where most of the source has been compiled. To do this ...
Since compilation of all the source from scratch can take long it is good to have a source folder where most of the source has been compiled. To do this, you can create a parallel build:


== Workflow ==
<syntaxhighlight lang="bash">
# Clone the repository.
mkdir dbg-octave
# Regenerate the scripts.
cd dbg-octave
# Configure.
/path/to/octave/source/configure FFLAGS=-g CFLAGS=-g CXXFLAGS=-g --enable-bounds-check --prefix=/opt/dbg-octave
# Compile the code.
make # or make -jN where N is the number of CPU cores
# Start debugging.
</syntaxhighlight>


= Basic debugging processes =
This will create a new build of Octave in a different directory without optimisations (no -O2 gcc parameter) and with debug symbols compiled in. This build is useful for debugging Octave itself.
== Error & trace the stack ==


= Debugging oct-files =
= Debugging oct-files =