[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Changeset]: Add the debug function
From: |
David Bateman |
Subject: |
[Changeset]: Add the debug function |
Date: |
Sun, 25 May 2008 16:35:08 +0200 |
User-agent: |
Thunderbird 2.0.0.12 (X11/20080306) |
Matlab includes a trivial function "debug" that just lists a summary of
all of the available debug commands. The attached changeset adds a
similar function for Octave
D.
# HG changeset patch
# User David Bateman <address@hidden>
# Date 1211725950 -7200
# Node ID 1c1b603b0093d0fc3a6b193a321d73a73234add8
# Parent ef5cfe89cc62152250d60e65f665500d662259e7
Add the debug function
diff --git a/scripts/miscellaneous/Makefile.in
b/scripts/miscellaneous/Makefile.in
--- a/scripts/miscellaneous/Makefile.in
+++ b/scripts/miscellaneous/Makefile.in
@@ -34,7 +34,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_DATA = @INSTALL_DATA@
SOURCES = ans.m bincoeff.m bug_report.m bunzip2.m cast.m comma.m \
- compare_versions.m computer.m copyfile.m \
+ compare_versions.m computer.m copyfile.m debug.m \
delete.m dir.m doc.m dos.m dump_prefs.m edit.m \
fileattrib.m fileparts.m flops.m fullfile.m getfield.m gunzip.m gzip.m \
info.m inputname.m ismac.m ispc.m isunix.m license.m list_primes.m ls.m \
diff --git a/scripts/miscellaneous/debug.m b/scripts/miscellaneous/debug.m
new file mode 100644
--- /dev/null
+++ b/scripts/miscellaneous/debug.m
@@ -0,0 +1,83 @@
+## Copyright (C) 2008 David Bateman
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING. If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} debug ()
+## Summary of the debugging commands. The debugging commands that are
+## available in Octave are
+##
+## @table @code
+## @item keyboard
+## Force entry into debug mode.
+##
+## @item dbstop
+## Add a breakpoint.
+##
+## @item dbclear
+## Remove a breakpoint.
+##
+## @item dbstatus
+## List all breakpoints.
+##
+## @item dbcont
+## Continue execution from the debug prompt.
+##
+## @item dbstack
+## Print a backtrace of the execution stack.
+##
+## @item dbstep
+## Execute one or more lines and re-enter debug mode
+##
+## @item dbtype
+## List the function where execution is currently stopped, enumerating
+## the lines.
+##
+## @item dbup
+## The workspace up the execution stack.
+##
+## @item dbdown
+## The workspace down the execution stack.
+##
+## @item dbquit
+## Quit debugging mode and return to the main prompt.
+##
+## @item debug_on_error
+## Flag whether to enter debug mode in case Octave encounters an error.
+##
+## @item debug_on_warning
+## Flag whether to enter debug mode in case Octave encounters a warning.
+##
+## @item debug_on_interrupt
+## Flag whether to enter debug mode in case Octave encounters an interupt.
+##
+## @end table
+##
+## @noindent
+## when Octave encounters a breakpoint or other reason to enter debug
+## mode, the prompt changes to "debug>". The workspace of the function
+## where the breakpoint was encountered becomes available and any Octave
+## command that works within that workspace may be executed.
+##
+## @seealso{dbstop, dbclear, dbstatus, dbcont, dbstack, dbstep, dbtype,
+## dbup, dbdown, dbquit, debug_on_error, debug_on_warning,
+## debug_on_interrupt}
+## @end deftypefn
+
+function debug
+ help ("debug");
+endfunction
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Changeset]: Add the debug function,
David Bateman <=