# New Ticket Created by  Steve Fink 
# Please include the string:  [perl #16860]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=16860 >


As a result of my recent changes to debug.c, a plain 'p' (or 'print')
in pdb now seg faults. This patch prints out all four register files
instead, which seems somewhat more helpful.


-- attachment  1 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/36054/29181/c0591c/pdb-printall.patch

Index: debug.c
===================================================================
RCS file: /cvs/public/parrot/debug.c,v
retrieving revision 1.36
diff -p -u -r1.36 debug.c
--- debug.c     27 Aug 2002 05:26:15 -0000      1.36
+++ debug.c     29 Aug 2002 20:28:54 -0000
@@ -1790,6 +1790,14 @@ PDB_print(struct Parrot_Interp *interpre
   
     command = skip_ws(command);
     command = parse_command(command, &c);
+    if (command == NULL) {
+            PDB_print_int(&interpreter->ctx.int_reg, -1);
+            PDB_print_num(&interpreter->ctx.num_reg, -1);
+            PDB_print_string(interpreter,&interpreter->ctx.string_reg, -1);
+            PDB_print_pmc(interpreter,&interpreter->ctx.pmc_reg, -1, NULL);
+            return;
+    }
+
     command = skip_ws(command);
 
     if (isdigit((int) *command)) {

Reply via email to