From a0221314dcc69bc6be15046c3668e9c6e9a9fec8 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Mon, 28 Nov 2022 20:27:59 -0700 Subject: [PATCH] debug thread --- perl.h | 17 +++++++++++++++++ t/run/switchDx.t | 1 + 2 files changed, 18 insertions(+) diff --git a/perl.h b/perl.h index d4eed6584047..e04e234c98ed 100644 --- a/perl.h +++ b/perl.h @@ -4983,6 +4983,23 @@ Gid_t getegid (void); * compiled in; they will be executed only for the DEBUG statements whose flags * are turned on. */ +#if ! defined(DEBUG_PRE_STMTS) && ! defined(PERL_IN_REGEX_ENGINE) +#ifdef DEBUGGING +# if defined(MULTIPLICITY) && ! defined(NO_LOCALE_THREADS) +# define DEBUG_PRE_STMTS \ + dSAVE_ERRNO; dTHX; PerlIO_printf(Perl_debug_log,"\n%s: %" LINE_Tf ": 0x%p: ",\ + __FILE__, (line_t)__LINE__, aTHX); +# else +# define DEBUG_PRE_STMTS \ + dSAVE_ERRNO; dTHX; PerlIO_printf(Perl_debug_log, "\n%s: %" LINE_Tf ": ", \ + __FILE__, (line_t)__LINE__); +# endif +# define DEBUG_POST_STMTS RESTORE_ERRNO; +#else +# define DEBUG_PRE_STMTS +# define DEBUG_POST_STMTS +#endif +#endif #ifndef DEBUG_PRE_STMTS # define DEBUG_PRE_STMTS #endif diff --git a/t/run/switchDx.t b/t/run/switchDx.t index e59e5560340d..aedd7e99cdad 100644 --- a/t/run/switchDx.t +++ b/t/run/switchDx.t @@ -4,6 +4,7 @@ BEGIN { @INC = '../lib'; require './test.pl'; skip_all_if_miniperl(); + skip_all("because of special debug"); } use Config;