From 739b9af1a13478ec21d40c38b8fd224d4dbfed8d Mon Sep 17 00:00:00 2001 From: dukeleto Date: Thu, 30 Jul 2009 07:28:59 +0000 Subject: [PATCH] Add some much-need docs to parrot_debugger, mostly about breakpoints and printing registers git-svn-id: https://svn.parrot.org/parrot/trunk@40337 d31e2699-5ff4-0310-a27c-f18f2fbe73fe --- src/parrot_debugger.c | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/src/parrot_debugger.c b/src/parrot_debugger.c index 9e0afbb264..de905016a9 100644 --- a/src/parrot_debugger.c +++ b/src/parrot_debugger.c @@ -12,6 +12,7 @@ parrot_debugger - The Parrot debugger =head1 SYNOPSIS parrot_debugger programfile + parrot_debugger --script scriptfile programfile =head1 DESCRIPTION @@ -39,7 +40,13 @@ Run the program. =item C or C -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 or C @@ -47,7 +54,10 @@ Add a watchpoint. =item C or C -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 @@ -71,11 +81,26 @@ Run an instruction. =item C or C -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 or C

-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 or C @@ -83,7 +108,8 @@ Examine the stack. =item C -Print interpreter information. +Print interpreter information relating to memory allocation and garbage +collection. =item C or C -- 2.11.4.GIT