Editing Debugging Octave

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
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, you can create a parallel build:
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:


Line 10: Line 9:
</syntaxhighlight>
</syntaxhighlight>


This will create a new build of Octave in a different directory without optimizations (no -O2 gcc parameter) and with debug symbols compiled in. This build is useful for debugging Octave itself.
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.


= Tools for debugging =
= Tools for debugging =
There are different tools for debugging. This article concentrates on describing how to use <code>gdb</code>.
There are different tools for debugging. This article concentrates on describing how to use <code>gdb</code>.


Line 77: Line 75:


=== Where are core dumps stored? ===
=== Where are core dumps stored? ===
It differs on each system. First you should see how core dumps are handled on your system. To do so, type this in a shell terminal:
It differs on each system. First you should see how core dumps are handled on your system. To do so, type this in a shell terminal:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 85: Line 82:


=== How to view a core dump? ===
=== How to view a core dump? ===
To do this you should use gdb. Core dumps are saved under root user, so you may need to change owner of the core dump you are interested in if you are not logged in as root. After that type in the terminal:
To do this you should use gdb. Core dumps are saved under root user, so you may need to change owner of the core dump you are interested in if you are not logged in as root. After that type in the terminal:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 105: Line 101:


=== Helpful gdb commands ===
=== Helpful gdb commands ===
[http://www.gnu.org/software/gdb/documentation gdb documentation]
[http://www.gnu.org/software/gdb/documentation gdb documentation]


Line 125: Line 120:


== ddd ==
== ddd ==
 
[http://www.gnu.org/software/ddd gui for gdb]
[http://www.gnu.org/software/ddd GUI for gdb]


[[Category:Development]]
[[Category:Development]]
Please note that all contributions to Octave may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Octave:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)