Implement --enable-debug.
This commit is contained in:
parent
1d96a5e978
commit
2966b067cb
|
@ -67,6 +67,7 @@
|
||||||
# 2013-10-08 PH got rid of the "source" command, which is a bash-ism (use ".")
|
# 2013-10-08 PH got rid of the "source" command, which is a bash-ism (use ".")
|
||||||
# 2013-11-05 PH added support for PARENS_NEST_LIMIT
|
# 2013-11-05 PH added support for PARENS_NEST_LIMIT
|
||||||
# 2014-08-29 PH converted the file for PCRE2 (which has no C++).
|
# 2014-08-29 PH converted the file for PCRE2 (which has no C++).
|
||||||
|
# 2015-04024 PH added support for PCRE2_DEBUG
|
||||||
|
|
||||||
PROJECT(PCRE2 C)
|
PROJECT(PCRE2 C)
|
||||||
|
|
||||||
|
@ -118,6 +119,8 @@ OPTION(PCRE2_BUILD_PCRE2_16 "Build 16 bit PCRE2 library" OFF)
|
||||||
|
|
||||||
OPTION(PCRE2_BUILD_PCRE2_32 "Build 32 bit PCRE2 library" OFF)
|
OPTION(PCRE2_BUILD_PCRE2_32 "Build 32 bit PCRE2 library" OFF)
|
||||||
|
|
||||||
|
OPTION(PCRE2_DEBUG "Include debugging code" OFF)
|
||||||
|
|
||||||
SET(PCRE2_EBCDIC OFF CACHE BOOL
|
SET(PCRE2_EBCDIC OFF CACHE BOOL
|
||||||
"Use EBCDIC coding instead of ASCII. (This is rarely used outside of mainframe systems.)")
|
"Use EBCDIC coding instead of ASCII. (This is rarely used outside of mainframe systems.)")
|
||||||
|
|
||||||
|
|
5
README
5
README
|
@ -293,6 +293,9 @@ library. They are also documented in the pcre2build man page.
|
||||||
both EBCDIC and UTF-8/16/32. There is a second option, --enable-ebcdic-nl25,
|
both EBCDIC and UTF-8/16/32. There is a second option, --enable-ebcdic-nl25,
|
||||||
which specifies that the code value for the EBCDIC NL character is 0x25
|
which specifies that the code value for the EBCDIC NL character is 0x25
|
||||||
instead of the default 0x15.
|
instead of the default 0x15.
|
||||||
|
|
||||||
|
. If you specify --enable-debug, additional debugging code is included in the
|
||||||
|
build. This option is intended for use by the PCRE2 maintainers.
|
||||||
|
|
||||||
. In environments where valgrind is installed, if you specify
|
. In environments where valgrind is installed, if you specify
|
||||||
|
|
||||||
|
@ -829,4 +832,4 @@ The distribution should contain the files listed below.
|
||||||
Philip Hazel
|
Philip Hazel
|
||||||
Email local part: ph10
|
Email local part: ph10
|
||||||
Email domain: cam.ac.uk
|
Email domain: cam.ac.uk
|
||||||
Last updated: 26 January 2015
|
Last updated: 24 April 2015
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#cmakedefine SUPPORT_PCRE2_8 1
|
#cmakedefine SUPPORT_PCRE2_8 1
|
||||||
#cmakedefine SUPPORT_PCRE2_16 1
|
#cmakedefine SUPPORT_PCRE2_16 1
|
||||||
#cmakedefine SUPPORT_PCRE2_32 1
|
#cmakedefine SUPPORT_PCRE2_32 1
|
||||||
|
#cmakedefine PCRE2_DEBUG 1
|
||||||
|
|
||||||
#cmakedefine SUPPORT_LIBBZ2 1
|
#cmakedefine SUPPORT_LIBBZ2 1
|
||||||
#cmakedefine SUPPORT_LIBEDIT 1
|
#cmakedefine SUPPORT_LIBEDIT 1
|
||||||
|
|
15
configure.ac
15
configure.ac
|
@ -130,12 +130,18 @@ AC_ARG_ENABLE(pcre2-32,
|
||||||
, enable_pcre2_32=unset)
|
, enable_pcre2_32=unset)
|
||||||
AC_SUBST(enable_pcre2_32)
|
AC_SUBST(enable_pcre2_32)
|
||||||
|
|
||||||
|
# Handle --dnable-debug (disabled by default)
|
||||||
|
AC_ARG_ENABLE(debug,
|
||||||
|
AS_HELP_STRING([--enable-debug],
|
||||||
|
[enable debugging code]),
|
||||||
|
, enable_debug=no)
|
||||||
|
|
||||||
# Handle --enable-jit (disabled by default)
|
# Handle --enable-jit (disabled by default)
|
||||||
AC_ARG_ENABLE(jit,
|
AC_ARG_ENABLE(jit,
|
||||||
AS_HELP_STRING([--enable-jit],
|
AS_HELP_STRING([--enable-jit],
|
||||||
[enable Just-In-Time compiling support]),
|
[enable Just-In-Time compiling support]),
|
||||||
, enable_jit=no)
|
, enable_jit=no)
|
||||||
|
|
||||||
# Handle --disable-pcre2grep-jit (enabled by default)
|
# Handle --disable-pcre2grep-jit (enabled by default)
|
||||||
AC_ARG_ENABLE(pcre2grep-jit,
|
AC_ARG_ENABLE(pcre2grep-jit,
|
||||||
AS_HELP_STRING([--disable-pcre2grep-jit],
|
AS_HELP_STRING([--disable-pcre2grep-jit],
|
||||||
|
@ -381,6 +387,7 @@ AC_CHECK_HEADERS([windows.h], [HAVE_WINDOWS_H=1])
|
||||||
AM_CONDITIONAL(WITH_PCRE2_8, test "x$enable_pcre2_8" = "xyes")
|
AM_CONDITIONAL(WITH_PCRE2_8, test "x$enable_pcre2_8" = "xyes")
|
||||||
AM_CONDITIONAL(WITH_PCRE2_16, test "x$enable_pcre2_16" = "xyes")
|
AM_CONDITIONAL(WITH_PCRE2_16, test "x$enable_pcre2_16" = "xyes")
|
||||||
AM_CONDITIONAL(WITH_PCRE2_32, test "x$enable_pcre2_32" = "xyes")
|
AM_CONDITIONAL(WITH_PCRE2_32, test "x$enable_pcre2_32" = "xyes")
|
||||||
|
AM_CONDITIONAL(WITH_DEBUG, test "x$enable_debug" = "xyes")
|
||||||
AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")
|
AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")
|
||||||
AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes")
|
AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes")
|
||||||
AM_CONDITIONAL(WITH_UNICODE, test "x$enable_unicode" = "xyes")
|
AM_CONDITIONAL(WITH_UNICODE, test "x$enable_unicode" = "xyes")
|
||||||
|
@ -504,6 +511,11 @@ if test "$enable_pcre2_32" = "yes"; then
|
||||||
Define to any value to enable the 32 bit PCRE2 library.])
|
Define to any value to enable the 32 bit PCRE2 library.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$enable_debug" = "yes"; then
|
||||||
|
AC_DEFINE([PCRE2_DEBUG], [], [
|
||||||
|
Define to any value to include debugging code.])
|
||||||
|
fi
|
||||||
|
|
||||||
# Unless running under Windows, JIT support requires pthreads.
|
# Unless running under Windows, JIT support requires pthreads.
|
||||||
|
|
||||||
if test "$enable_jit" = "yes"; then
|
if test "$enable_jit" = "yes"; then
|
||||||
|
@ -864,6 +876,7 @@ $PACKAGE-$VERSION configuration summary:
|
||||||
Build 8-bit pcre2 library ....... : ${enable_pcre2_8}
|
Build 8-bit pcre2 library ....... : ${enable_pcre2_8}
|
||||||
Build 16-bit pcre2 library ...... : ${enable_pcre2_16}
|
Build 16-bit pcre2 library ...... : ${enable_pcre2_16}
|
||||||
Build 32-bit pcre2 library ...... : ${enable_pcre2_32}
|
Build 32-bit pcre2 library ...... : ${enable_pcre2_32}
|
||||||
|
Include debugging code .......... : ${enable_debug}
|
||||||
Enable JIT compiling support .... : ${enable_jit}
|
Enable JIT compiling support .... : ${enable_jit}
|
||||||
Enable Unicode support .......... : ${enable_unicode}
|
Enable Unicode support .......... : ${enable_unicode}
|
||||||
Newline char/sequence ........... : ${enable_newline}
|
Newline char/sequence ........... : ${enable_newline}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.TH PCRE2BUILD 3 "13 April 2015" "PCRE2 10.20"
|
.TH PCRE2BUILD 3 "23 April 2015" "PCRE2 10.20"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
PCRE2 - Perl-compatible regular expressions (revised API)
|
PCRE2 - Perl-compatible regular expressions (revised API)
|
||||||
.
|
.
|
||||||
|
@ -410,6 +410,17 @@ automatically included, you may need to add something like
|
||||||
immediately before the \fBconfigure\fP command.
|
immediately before the \fBconfigure\fP command.
|
||||||
.
|
.
|
||||||
.
|
.
|
||||||
|
.SH "INCLUDING DEBUGGING CODE"
|
||||||
|
.rs
|
||||||
|
.sp
|
||||||
|
If you add
|
||||||
|
.sp
|
||||||
|
--enable-debug
|
||||||
|
.sp
|
||||||
|
to the \fBconfigure\fP command, additional debugging code is included in the
|
||||||
|
build. This feature is intended for use by the PCRE2 maintainers.
|
||||||
|
.
|
||||||
|
.
|
||||||
.SH "DEBUGGING WITH VALGRIND SUPPORT"
|
.SH "DEBUGGING WITH VALGRIND SUPPORT"
|
||||||
.rs
|
.rs
|
||||||
.sp
|
.sp
|
||||||
|
@ -499,6 +510,6 @@ Cambridge, England.
|
||||||
.rs
|
.rs
|
||||||
.sp
|
.sp
|
||||||
.nf
|
.nf
|
||||||
Last updated: 13 April 2015
|
Last updated: 24 April 2015
|
||||||
Copyright (c) 1997-2015 University of Cambridge.
|
Copyright (c) 1997-2015 University of Cambridge.
|
||||||
.fi
|
.fi
|
||||||
|
|
|
@ -184,7 +184,7 @@ runtest()
|
||||||
# Update the total count whenever a new test is added; it is used to show
|
# Update the total count whenever a new test is added; it is used to show
|
||||||
# progess as each test is run.
|
# progess as each test is run.
|
||||||
|
|
||||||
testtotal=`expr 20 \* $usemain + \
|
testtotal=`expr 21 \* $usemain + \
|
||||||
1 \* $usetmp + \
|
1 \* $usetmp + \
|
||||||
1 \* $ISGCC \* $usemain + \
|
1 \* $ISGCC \* $usemain + \
|
||||||
1 \* $ISGCC \* $usemain \* $useasan + \
|
1 \* $ISGCC \* $usemain \* $useasan + \
|
||||||
|
@ -239,6 +239,10 @@ echo "---------- CFLAGS for the remaining tests ----------"
|
||||||
echo "CFLAGS=$CFLAGS"
|
echo "CFLAGS=$CFLAGS"
|
||||||
|
|
||||||
if [ $usemain -ne 0 ]; then
|
if [ $usemain -ne 0 ]; then
|
||||||
|
echo "---------- Maximally configured test with --enable-debug ----------"
|
||||||
|
opts="--disable-shared $enable_jit --enable-pcre2-16 --enable-pcre2-32 --enable-debug"
|
||||||
|
runtest
|
||||||
|
|
||||||
echo "---------- Non-JIT tests in the current directory ----------"
|
echo "---------- Non-JIT tests in the current directory ----------"
|
||||||
for opts in \
|
for opts in \
|
||||||
"" \
|
"" \
|
||||||
|
|
|
@ -54,7 +54,12 @@ system files. */
|
||||||
#define SLJIT_CONFIG_AUTO 1
|
#define SLJIT_CONFIG_AUTO 1
|
||||||
#define SLJIT_CONFIG_STATIC 1
|
#define SLJIT_CONFIG_STATIC 1
|
||||||
#define SLJIT_VERBOSE 0
|
#define SLJIT_VERBOSE 0
|
||||||
|
|
||||||
|
#ifdef PCRE2_DEBUG
|
||||||
|
#define SLJIT_DEBUG 1
|
||||||
|
#else
|
||||||
#define SLJIT_DEBUG 0
|
#define SLJIT_DEBUG 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SLJIT_MALLOC(size, allocator_data) pcre2_jit_malloc(size, allocator_data)
|
#define SLJIT_MALLOC(size, allocator_data) pcre2_jit_malloc(size, allocator_data)
|
||||||
#define SLJIT_FREE(ptr, allocator_data) pcre2_jit_free(ptr, allocator_data)
|
#define SLJIT_FREE(ptr, allocator_data) pcre2_jit_free(ptr, allocator_data)
|
||||||
|
|
Loading…
Reference in New Issue