Debugging Octave: Difference between revisions

197 bytes added ,  24 August 2012
m
→‎Debugging oct-files: added a missing element
m (→‎Debugging oct-files: added a missing element)
Line 32: Line 32:
</syntaxhighlight>
</syntaxhighlight>


Octave will start up. Now halt execution of Octave by typing ctrl+c, you'll see again the gdb prompt. Set now a breakpoint in the line of interest
Octave will start up. To load the symbol table the function needs to be executed, for example by invoking the help function
 
<syntaxhighlight lang="matlab">
octave:1> help file
</syntaxhighlight>
 
Now halt execution of Octave by typing ctrl+c, you'll see again the gdb prompt. Set now a breakpoint in the line of interest


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 38: Line 44:
</syntaxhighlight>
</syntaxhighlight>


by typing now c the execution of octave will continue and you can run your oct-file
by typing c the execution of octave will continue and you can run your oct-file directly or via an m-script.


<syntaxhighlight lang="octave">
<syntaxhighlight lang="octave">
Line 44: Line 50:
</syntaxhighlight>  
</syntaxhighlight>  


the debugger will now stop on the above defined line and you can start debugging according to the manual of GNU debugger.
the debugger will stop on the above defined line and you can start debugging according to the manual of GNU debugger.


= Tools for debugging =
= Tools for debugging =
501

edits