3
edits
m (→Most used commands: fixed formating on the previous) |
BabakRz63ai (talk | contribs) |
||
Line 44: | Line 44: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
In next step you will use GNU debugger or gdb. The symbols from your oct-file will only be available to gdb once the oct-file is loaded in Octave. To do that without executing any functions from the oct-file, you can ask Octave to display the help for the oct-file: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
octave> | octave> help file | ||
</syntaxhighlight> | </syntaxhighlight> | ||
start now the GNU debugger with octave. On most Unixy systems, you can start gdb from within an Octave session by evaluating a command like | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
(gdb) | octave> system (sprintf ("gnome-terminal --command 'gdb -p %d'", getpid ()), "async"); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
at the | at the Octave prompt. This command will open a terminal window running gdb attached to the Octave process. At this point, Octave will be stopped. | ||
Now | Now you can set a breakpoint in the line of interest of your oct-file in gdb prompt: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> |
edits