[svn:parrot] r40333 - in trunk: src t/tools

dukeleto at svn.parrot.org dukeleto at svn.parrot.org
Thu Jul 30 05:04:36 UTC 2009


Author: dukeleto
Date: Thu Jul 30 05:04:34 2009
New Revision: 40333
URL: https://trac.parrot.org/parrot/changeset/40333

Log:
Add two TODO tests for deleting parrot_debugger breakpoints and add code that throws an friendly error message instead of a Bus Error

Modified:
   trunk/src/debug.c
   trunk/t/tools/parrot_debugger.t

Modified: trunk/src/debug.c
==============================================================================
--- trunk/src/debug.c	Thu Jul 30 01:55:42 2009	(r40332)
+++ trunk/src/debug.c	Thu Jul 30 05:04:34 2009	(r40333)
@@ -2055,10 +2055,13 @@
 {
     ASSERT_ARGS(PDB_delete_breakpoint)
     PDB_breakpoint_t * const breakpoint = PDB_find_breakpoint(interp, command);
+    const PDB_line_t *line;
 
     if (breakpoint) {
-        const PDB_line_t *line = interp->pdb->file->line;
+        if (!interp->pdb->file)
+            Parrot_ex_throw_from_c_args(interp, NULL, 0, "No file loaded");
 
+        line = interp->pdb->file->line;
         while (line->opcode != breakpoint->pc)
             line = line->next;
 

Modified: trunk/t/tools/parrot_debugger.t
==============================================================================
--- trunk/t/tools/parrot_debugger.t	Thu Jul 30 01:55:42 2009	(r40332)
+++ trunk/t/tools/parrot_debugger.t	Thu Jul 30 05:04:34 2009	(r40333)
@@ -138,7 +138,21 @@
 .end
 PIR
 
-BEGIN { $tests += 19 }
+TODO: {
+    local $TODO = 'TT#889 - deleting breakpoints does not currently work';
+pdb_output_like( <<PASM, "pasm", "b\n d 1", qr/Breakpoint 1 deleted/, 'Delete a breakpoint');
+    set I0, 242
+PASM
+
+pdb_output_like( <<PIR, "pir", "b\nd 1", qr/Breakpoint 1 deleted/, 'Delete a breakpoint (pir)');
+.sub main :main
+    \$I0 = 242
+.end
+PIR
+
+}
+
+BEGIN { $tests += 21 }
 
 BEGIN { plan tests => $tests; }
 


More information about the parrot-commits mailing list