From: K.Kosako Date: Fri, 2 Jun 2017 06:00:14 +0000 (+0900) Subject: addd output of stack size in ONIG_DEBUG_MATCH X-Git-Tag: v6.4.0~1^2~150 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ee4bdf6901ae12011ff722c9eaa65b3aeab6519;p=onig addd output of stack size in ONIG_DEBUG_MATCH --- diff --git a/src/regexec.c b/src/regexec.c index 0e02ff6..7e8bfb6 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -907,6 +907,7 @@ stack_double(int is_alloca, char** arg_alloc_base, endp = STACK_AT(k->u.mem.end)->u.mem.pstr;\ else\ endp = (UChar* )k->u.mem.end;\ + /*fprintf(stderr, "num: %d, pstr: %p, endp: %p\n", k->u.mem.num, STACK_AT(k->u.mem.start)->u.mem.pstr, endp);*/ \ if (STACK_AT(k->u.mem.start)->u.mem.pstr != endp) {\ (isnull) = 0; break;\ }\ @@ -1345,7 +1346,8 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, UChar *q, *bp, buf[50]; int len; - fprintf(stderr, "%7u: %4d> \"", counter, (int )(s - str)); + fprintf(stderr, "%7u: %7ld: %4d> \"", + counter, GET_STACK_INDEX(stk), (int )(s - str)); counter++; bp = buf;