X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=deb.c;h=af86540bba03b857f82c569e156e8ded2f592674;hb=dcb4812c733545a68ef39b77c2dc4f7d440de203;hp=f2708354611871845392af0a220d0e315f5079f2;hpb=71be2cbc73608e37e1a2ab7e459a02111137d1b0;p=p5sagit%2Fp5-mst-13.2.git diff --git a/deb.c b/deb.c index f270835..af86540 100644 --- a/deb.c +++ b/deb.c @@ -1,6 +1,6 @@ /* deb.c * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -15,89 +15,68 @@ #include "EXTERN.h" #include "perl.h" -#ifdef DEBUGGING -#if !defined(I_STDARG) && !defined(I_VARARGS) - -/* - * Fallback on the old hackers way of doing varargs - */ - -/*VARARGS1*/ -void -deb(pat,a1,a2,a3,a4,a5,a6,a7,a8) - char *pat; -{ - register I32 i; - GV* gv = curcop->cop_filegv; - - PerlIO_printf(Perl_debug_log, "(%s:%ld)\t", - SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "", - (long)curcop->cop_line); - for (i=0; icop_filegv; +#ifdef USE_THREADS + PerlIO_printf(Perl_debug_log, "0x%lx (%s:%ld)\t", + (unsigned long) thr, + SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "", + (long)curcop->cop_line); +#else PerlIO_printf(Perl_debug_log, "(%s:%ld)\t", SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "", (long)curcop->cop_line); +#endif /* USE_THREADS */ for (i=0; isi_markbase; if (i < 0) i = 0; @@ -106,7 +85,12 @@ debstack() if (*markscan >= i) break; +#ifdef USE_THREADS + PerlIO_printf(Perl_debug_log, i ? "0x%lx => ... " : "0x%lx => ", + (unsigned long) thr); +#else PerlIO_printf(Perl_debug_log, i ? " => ... " : " => "); +#endif /* USE_THREADS */ if (stack_base[0] != &sv_undef || stack_sp < stack_base) PerlIO_printf(Perl_debug_log, " [STACK UNDERFLOW!!!]\n"); do { @@ -125,8 +109,6 @@ debstack() } while (1); PerlIO_printf(Perl_debug_log, "\n"); +#endif /* DEBUGGING */ return 0; } -#else -static int dummy; /* avoid totally empty deb.o file */ -#endif /* DEBUGGING */