Building on Ubuntu Virtual Machine: Difference between revisions

m
Added more details in several sections
m (Removed unnecessary commands)
m (Added more details in several sections)
Line 44: Line 44:
     $ ./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");
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).
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.
     (gdb) thread apply all break variable-editor.cc:1154
    (gdb) set pagination off
Continue.
     (gdb) thread apply all break variable_editor::edit_variable
    (gdb) c
In Octave's command line:
     >> a = [1 2]
     >> a = [1 2]
In Octave, double click on the variable ‘a’. Now gdb should be at the breakpoint. Now backtrace 10 to show the calling information:
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:
     (gdb) backtrace 10
     (gdb) backtrace 10
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).
To disable breakpoints and continue running the program:
     (gdb) thread apply all break variable-editor-model.cc:928
    (gdb) disable breakpoints
     (gdb) c
= Save and Patch =
= Save and Patch =
: 8. Save your work and send patch.
: 8. Save your work and send patch.
13

edits