Re: Adding a command to aid in debugging Octave

Kai Torben Ohlhus <[email protected]>
Newsgroups gmane.comp.gnu.octave.maintainers
Message-ID <[email protected]>
On 7/30/20 11:31 AM, John W. Eaton wrote:
> On 7/29/20 9:56 PM, Kai Torben Ohlhus wrote:
>> On 7/30/20 1:07 AM, John W. Eaton wrote:
>>>
>>> I pushed a changeset with a version of the new __debug_octave__ command
>>> to the stable branch and merged with default.
>>>
>>> I also updated the information on the wiki about debugging Octave:
>>>
>>>    https://wiki.octave.org/Debugging_Octave
>>>
>>>
>>> jwe
>>>
>>
>>
>> Thank you for this handy feature.  Compiling Octave with "-g", as
>> described first in the wiki [1], is not necessary for using
>> `__debug_octave__`, right?
>>
>> In this case, I will reorder the information in the wiki.  As user I
>> would never use this command, as I expect Octave has to be compiled in a
>> special way beforehand.
>>
>> Kai
>>
>> [1] https://wiki.octave.org/Debugging_Octave#Preliminaries
> 
> It's not necessary to build with debugging symbols but you will get
> better information from the debugger.  The default flags are "-g -O2"
> which generally works but it can be confusing when stepping through an
> optimized program because the instructions aren't as close to the source
> code as they are when optimization is disabled.  So program execution
> may appear to jump around in unexpected ways and some symbols may be
> inaccessible.  When I need to get reliable info from the debugger, I
> usually compile the C++ parts with -ggdb.
> 
> jwe
> 

Ups, forgot to add the maintainers list.

Thank you for the clarification.  Then I think a small info will be
sufficient to not discourage users like me from using it ;-)

Kai
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.