Building on Ubuntu Virtual Machine: Difference between revisions
Jump to navigation
Jump to search
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"); | ||
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 | (gdb) set pagination off | ||
(gdb) thread apply all break variable_editor::edit_variable | |||
(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: | |||
(gdb) backtrace 10 | (gdb) backtrace 10 | ||
To disable breakpoints and continue running the program: | |||
(gdb) | (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. |