Change 29960 by [EMAIL PROTECTED] on 2007/01/24 21:42:53

        Display the process id as part of the trace output if running with -Dv
        (Might be nice to display the thread ID too under ithreads, but I can't
         see a clean way to get that)

Affected files ...

... //depot/perl/deb.c#54 edit

Differences ...

==== //depot/perl/deb.c#54 (text) ====
Index: perl/deb.c
--- perl/deb.c#53~28674~        2006-08-07 20:55:13.000000000 -0700
+++ perl/deb.c  2007-01-24 13:42:53.000000000 -0800
@@ -57,10 +57,15 @@
 {
 #ifdef DEBUGGING
     dVAR;
-    const char* const file = OutCopFILE(PL_curcop);
-
-    PerlIO_printf(Perl_debug_log, "(%s:%ld)\t", (file ? file : "<free>"),
-                 (long)CopLINE(PL_curcop));
+    const char* const file = PL_curcop ? OutCopFILE(PL_curcop) : "<null>";
+    const char* const display_file = file ? file : "<free>";
+    const long line = PL_curcop ? (long)CopLINE(PL_curcop) : 0;
+
+    if (DEBUG_v_TEST)
+       PerlIO_printf(Perl_debug_log, "(%ld:%s:%ld)\t",
+                     (long)PerlProc_getpid(), display_file, line);
+    else
+       PerlIO_printf(Perl_debug_log, "(%s:%ld)\t", display_file, line);
     (void) PerlIO_vprintf(Perl_debug_log, pat, *args);
 #else
     PERL_UNUSED_CONTEXT;
End of Patch.

Reply via email to