Skip to content

Commit

Permalink
debug thread
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed May 12, 2023
1 parent c9a0b81 commit e30d933
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions locale.c
Expand Up @@ -124,6 +124,7 @@
static int debug_initialization = 0;
# define DEBUG_INITIALIZATION_set(v) (debug_initialization = v)
# define DEBUG_LOCALE_INITIALIZATION_ debug_initialization
#if 0
/* C standards seem to say that __LINE__ is merely "an integer constant",
* which means it might be either int, long (with L suffix), or long long
* (or their corresponding unsigned type). So, we have to explicitly cast
Expand Down
17 changes: 17 additions & 0 deletions perl.h
Expand Up @@ -4965,6 +4965,23 @@ Gid_t getegid (void);
* statements 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(USE_ITHREADS) && ! 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
Expand Down
1 change: 1 addition & 0 deletions t/run/switchDx.t
Expand Up @@ -4,6 +4,7 @@ BEGIN {
@INC = '../lib';
require './test.pl';
skip_all_if_miniperl();
skip_all("because of special debug");
}

use Config;
Expand Down

0 comments on commit e30d933

Please sign in to comment.