octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding a command to aid in debugging Octave


From: Kai Torben Ohlhus
Subject: Re: Adding a command to aid in debugging Octave
Date: Thu, 30 Jul 2020 11:35:01 +0900
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]