nwc10+ (Nicholas Clark)
2008-01-22 17:45:05 UTC
Change 33039 by ***@nicholas-saigo on 2008/01/22 17:41:53
Integrate:
[ 29960]
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/maint-5.8/perl/deb.c#22 integrate
Differences ...
==== //depot/maint-5.8/perl/deb.c#22 (text) ====
Index: perl/deb.c
--- perl/deb.c#21~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/deb.c 2008-01-22 09:41:53.000000000 -0800
@@ -56,7 +56,9 @@
Perl_vdeb(pTHX_ const char *pat, va_list *args)
{
#ifdef DEBUGGING
- const char* const file = OutCopFILE(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;
#ifdef USE_5005THREADS
PerlIO_printf(Perl_debug_log, "0x%"UVxf" (%s:%ld)\t",
@@ -64,8 +66,11 @@
(file ? file : "<free>"),
(long)CopLINE(PL_curcop));
#else
- PerlIO_printf(Perl_debug_log, "(%s:%ld)\t", (file ? file : "<free>"),
- (long)CopLINE(PL_curcop));
+ 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);
#endif /* USE_5005THREADS */
(void) PerlIO_vprintf(Perl_debug_log, pat, *args);
#else
End of Patch.
Integrate:
[ 29960]
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/maint-5.8/perl/deb.c#22 integrate
Differences ...
==== //depot/maint-5.8/perl/deb.c#22 (text) ====
Index: perl/deb.c
--- perl/deb.c#21~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/deb.c 2008-01-22 09:41:53.000000000 -0800
@@ -56,7 +56,9 @@
Perl_vdeb(pTHX_ const char *pat, va_list *args)
{
#ifdef DEBUGGING
- const char* const file = OutCopFILE(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;
#ifdef USE_5005THREADS
PerlIO_printf(Perl_debug_log, "0x%"UVxf" (%s:%ld)\t",
@@ -64,8 +66,11 @@
(file ? file : "<free>"),
(long)CopLINE(PL_curcop));
#else
- PerlIO_printf(Perl_debug_log, "(%s:%ld)\t", (file ? file : "<free>"),
- (long)CopLINE(PL_curcop));
+ 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);
#endif /* USE_5005THREADS */
(void) PerlIO_vprintf(Perl_debug_log, pat, *args);
#else
End of Patch.