[svn:parrot] r40337 - trunk/src
dukeleto at svn.parrot.org
dukeleto at svn.parrot.org
Thu Jul 30 07:29:02 UTC 2009
Author: dukeleto
Date: Thu Jul 30 07:28:59 2009
New Revision: 40337
URL: https://trac.parrot.org/parrot/changeset/40337
Log:
Add some much-need docs to parrot_debugger, mostly about breakpoints and printing registers
Modified:
trunk/src/parrot_debugger.c
Modified: trunk/src/parrot_debugger.c
==============================================================================
--- trunk/src/parrot_debugger.c Thu Jul 30 06:57:13 2009 (r40336)
+++ trunk/src/parrot_debugger.c Thu Jul 30 07:28:59 2009 (r40337)
@@ -12,6 +12,7 @@
=head1 SYNOPSIS
parrot_debugger programfile
+ parrot_debugger --script scriptfile programfile
=head1 DESCRIPTION
@@ -39,7 +40,13 @@
=item C<break> or C<b>
-Add a breakpoint.
+Add a breakpoint at the line number given or the current line if none is given.
+
+ (pdb) b
+ Breakpoint 1 at pos 0
+
+ (pdb) b 10
+ Breakpoint 1 at pos 10
=item C<watch> or C<w>
@@ -47,7 +54,10 @@
=item C<delete> or C<d>
-Delete a breakpoint.
+Given a number n, deletes the n-th breakpoint. To delete the first breakpoint:
+
+ (pdb) d 1
+ Breakpoint 1 deleted
=item C<disable>
@@ -71,11 +81,26 @@
=item C<trace> or C<t>
-Trace the next instruction.
+Trace the next instruction. This is equivalent to printing the source of the
+next instruction and then executing it.
=item C<print> or C<p>
-Print the interpreter registers.
+Print an interpreter register. If a register I0 has been used, this
+would look like:
+
+ (pdb) p I0
+ 2
+
+If no register number is given then all registers of that type will be printed.
+If the two registers I0 and I1 have been used, then this would look like:
+
+ (pdb) p I
+ I0 = 2
+ I1 = 5
+
+It would be nice if "p" with no arguments printed all registers, but this is
+currently not the case.
=item C<stack> or C<s>
@@ -83,7 +108,8 @@
=item C<info>
-Print interpreter information.
+Print interpreter information relating to memory allocation and garbage
+collection.
=item C<quit> or C<q>
More information about the parrot-commits
mailing list