Editing Building on Ubuntu Virtual Machine

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 46: Line 46:
     $ ./run-octave --gui
     $ ./run-octave --gui
     >> system (sprintf ("gnome-terminal --command 'gdb -p %d'", getpid ()), "async");
     >> system (sprintf ("gnome-terminal --command 'gdb -p %d'", getpid ()), "async");
In the new terminal window that appears: First set pagination off, then apply a breakpoint at the function edit_variable (which will be hit in another thread from the current one, so apply breakpoint for all threads), then type 'c' to continue.
Apply a breakpoint at the function edit_variable (which will be hit in another thread from the current one, so apply breakpoint for all threads).
    (gdb) set pagination off
     (gdb) thread apply all break variable-editor.cc:1154
     (gdb) thread apply all break variable_editor::edit_variable
Continue.
    (gdb) c
In Octave's command line:
     >> a = [1 2]
     >> a = [1 2]
Still in Octave, locate the Workspace widget (which lists all the current variables). Double-click on the variable ‘a’. Nothing happens in Octave, but if you switch to gdb, you can see that the program stopped at the breakpoint. Now backtrace 10 to show the calling information:
In Octave, double click on the variable ‘a’. Now gdb should be at the breakpoint. Now backtrace 10 to show the calling information:
     (gdb) backtrace 10
     (gdb) backtrace 10
To disable breakpoints and continue running the program:
Apply a breakpoint at the function variable_editor_model::create (which will be hit in another thread from the current one, so apply breakpoint for all threads).
    (gdb) disable breakpoints
     (gdb) thread apply all break variable-editor-model.cc:928
     (gdb) c
= Save and Patch =
= Save and Patch =
: 8. Save your work and send patch.
: 8. Save your work and send patch.
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)