]> granicus.if.org Git - onig/commitdiff
addd output of stack size in ONIG_DEBUG_MATCH
authorK.Kosako <kosako@sofnec.co.jp>
Fri, 2 Jun 2017 06:00:14 +0000 (15:00 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Fri, 2 Jun 2017 06:00:14 +0000 (15:00 +0900)
src/regexec.c

index 0e02ff669e0ccfba1ab0809349fda3fd3f1f51c1..7e8bfb65a88e4133f7c175947e6afa1dd5213008 100644 (file)
@@ -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;