Commit | Line | Data |
a0d0e21e |
1 | /* dump.c |
a687059c |
2 | * |
4eb8286e |
3 | * Copyright (c) 1991-1999, Larry Wall |
a687059c |
4 | * |
6e21c824 |
5 | * You may distribute under the terms of either the GNU General Public |
6 | * License or the Artistic License, as specified in the README file. |
8d063cd8 |
7 | * |
a0d0e21e |
8 | */ |
9 | |
10 | /* |
11 | * "'You have talked long in your sleep, Frodo,' said Gandalf gently, 'and |
12 | * it has not been hard for me to read your mind and memory.'" |
8d063cd8 |
13 | */ |
14 | |
8d063cd8 |
15 | #include "EXTERN.h" |
864dbfa3 |
16 | #define PERL_IN_DUMP_C |
8d063cd8 |
17 | #include "perl.h" |
f722798b |
18 | #include "regcomp.h" |
8d063cd8 |
19 | |
3967c732 |
20 | void |
864dbfa3 |
21 | Perl_dump_indent(pTHX_ I32 level, PerlIO *file, const char* pat, ...) |
3967c732 |
22 | { |
3967c732 |
23 | va_list args; |
3967c732 |
24 | va_start(args, pat); |
c5be433b |
25 | dump_vindent(level, file, pat, &args); |
3967c732 |
26 | va_end(args); |
27 | } |
8adcabd8 |
28 | |
29 | void |
c5be433b |
30 | Perl_dump_vindent(pTHX_ I32 level, PerlIO *file, const char* pat, va_list *args) |
31 | { |
32 | dTHR; |
c8db6e60 |
33 | PerlIO_printf(file, "%*s", (int)(level*PL_dumpindent), ""); |
c5be433b |
34 | PerlIO_vprintf(file, pat, *args); |
35 | } |
36 | |
37 | void |
864dbfa3 |
38 | Perl_dump_all(pTHX) |
79072805 |
39 | { |
11343788 |
40 | dTHR; |
760ac839 |
41 | PerlIO_setlinebuf(Perl_debug_log); |
3280af22 |
42 | if (PL_main_root) |
3967c732 |
43 | op_dump(PL_main_root); |
3280af22 |
44 | dump_packsubs(PL_defstash); |
463ee0b2 |
45 | } |
46 | |
47 | void |
864dbfa3 |
48 | Perl_dump_packsubs(pTHX_ HV *stash) |
463ee0b2 |
49 | { |
11343788 |
50 | dTHR; |
a0d0e21e |
51 | I32 i; |
463ee0b2 |
52 | HE *entry; |
53 | |
8990e307 |
54 | if (!HvARRAY(stash)) |
55 | return; |
a0d0e21e |
56 | for (i = 0; i <= (I32) HvMAX(stash); i++) { |
4db58590 |
57 | for (entry = HvARRAY(stash)[i]; entry; entry = HeNEXT(entry)) { |
58 | GV *gv = (GV*)HeVAL(entry); |
463ee0b2 |
59 | HV *hv; |
e29cdcb3 |
60 | if (SvTYPE(gv) != SVt_PVGV || !GvGP(gv)) |
61 | continue; |
8ebc5c01 |
62 | if (GvCVu(gv)) |
463ee0b2 |
63 | dump_sub(gv); |
85e6fe83 |
64 | if (GvFORM(gv)) |
65 | dump_form(gv); |
4db58590 |
66 | if (HeKEY(entry)[HeKLEN(entry)-1] == ':' && |
3280af22 |
67 | (hv = GvHV(gv)) && HvNAME(hv) && hv != PL_defstash) |
463ee0b2 |
68 | dump_packsubs(hv); /* nested package */ |
69 | } |
79072805 |
70 | } |
71 | } |
72 | |
73 | void |
864dbfa3 |
74 | Perl_dump_sub(pTHX_ GV *gv) |
a687059c |
75 | { |
8990e307 |
76 | SV *sv = sv_newmortal(); |
85e6fe83 |
77 | |
f6aff53a |
78 | gv_fullname3(sv, gv, Nullch); |
cea2e8a9 |
79 | Perl_dump_indent(aTHX_ 0, Perl_debug_log, "\nSUB %s = ", SvPVX(sv)); |
a0d0e21e |
80 | if (CvXSUB(GvCV(gv))) |
cea2e8a9 |
81 | Perl_dump_indent(aTHX_ 0, Perl_debug_log, "(xsub 0x%x %d)\n", |
a0d0e21e |
82 | (long)CvXSUB(GvCV(gv)), |
83 | CvXSUBANY(GvCV(gv)).any_i32); |
85e6fe83 |
84 | else if (CvROOT(GvCV(gv))) |
3967c732 |
85 | op_dump(CvROOT(GvCV(gv))); |
85e6fe83 |
86 | else |
cea2e8a9 |
87 | Perl_dump_indent(aTHX_ 0, Perl_debug_log, "<undef>\n"); |
85e6fe83 |
88 | } |
89 | |
90 | void |
864dbfa3 |
91 | Perl_dump_form(pTHX_ GV *gv) |
85e6fe83 |
92 | { |
93 | SV *sv = sv_newmortal(); |
94 | |
f6aff53a |
95 | gv_fullname3(sv, gv, Nullch); |
cea2e8a9 |
96 | Perl_dump_indent(aTHX_ 0, Perl_debug_log, "\nFORMAT %s = ", SvPVX(sv)); |
85e6fe83 |
97 | if (CvROOT(GvFORM(gv))) |
3967c732 |
98 | op_dump(CvROOT(GvFORM(gv))); |
85e6fe83 |
99 | else |
cea2e8a9 |
100 | Perl_dump_indent(aTHX_ 0, Perl_debug_log, "<undef>\n"); |
a687059c |
101 | } |
102 | |
8adcabd8 |
103 | void |
864dbfa3 |
104 | Perl_dump_eval(pTHX) |
8d063cd8 |
105 | { |
3967c732 |
106 | op_dump(PL_eval_root); |
107 | } |
108 | |
109 | char * |
864dbfa3 |
110 | Perl_pv_display(pTHX_ SV *sv, char *pv, STRLEN cur, STRLEN len, STRLEN pvlim) |
3967c732 |
111 | { |
112 | int truncated = 0; |
113 | int nul_terminated = len > cur && pv[cur] == '\0'; |
114 | |
115 | sv_setpvn(sv, "\"", 1); |
116 | for (; cur--; pv++) { |
117 | if (pvlim && SvCUR(sv) >= pvlim) { |
118 | truncated++; |
119 | break; |
120 | } |
121 | if (isPRINT(*pv)) { |
122 | switch (*pv) { |
123 | case '\t': sv_catpvn(sv, "\\t", 2); break; |
124 | case '\n': sv_catpvn(sv, "\\n", 2); break; |
125 | case '\r': sv_catpvn(sv, "\\r", 2); break; |
126 | case '\f': sv_catpvn(sv, "\\f", 2); break; |
127 | case '"': sv_catpvn(sv, "\\\"", 2); break; |
128 | case '\\': sv_catpvn(sv, "\\\\", 2); break; |
129 | default: sv_catpvn(sv, pv, 1); break; |
130 | } |
131 | } |
132 | else { |
133 | if (cur && isDIGIT(*(pv+1))) |
cea2e8a9 |
134 | Perl_sv_catpvf(aTHX_ sv, "\\%03o", *pv); |
3967c732 |
135 | else |
cea2e8a9 |
136 | Perl_sv_catpvf(aTHX_ sv, "\\%o", *pv); |
3967c732 |
137 | } |
138 | } |
139 | sv_catpvn(sv, "\"", 1); |
140 | if (truncated) |
141 | sv_catpvn(sv, "...", 3); |
142 | if (nul_terminated) |
143 | sv_catpvn(sv, "\\0", 2); |
144 | |
145 | return SvPVX(sv); |
146 | } |
147 | |
148 | char * |
864dbfa3 |
149 | Perl_sv_peek(pTHX_ SV *sv) |
3967c732 |
150 | { |
151 | SV *t = sv_newmortal(); |
2d8e6c8d |
152 | STRLEN n_a; |
3967c732 |
153 | int unref = 0; |
154 | |
155 | sv_setpvn(t, "", 0); |
156 | retry: |
157 | if (!sv) { |
158 | sv_catpv(t, "VOID"); |
159 | goto finish; |
160 | } |
161 | else if (sv == (SV*)0x55555555 || SvTYPE(sv) == 'U') { |
162 | sv_catpv(t, "WILD"); |
163 | goto finish; |
164 | } |
165 | else if (sv == &PL_sv_undef || sv == &PL_sv_no || sv == &PL_sv_yes) { |
166 | if (sv == &PL_sv_undef) { |
167 | sv_catpv(t, "SV_UNDEF"); |
168 | if (!(SvFLAGS(sv) & (SVf_OK|SVf_OOK|SVs_OBJECT| |
169 | SVs_GMG|SVs_SMG|SVs_RMG)) && |
170 | SvREADONLY(sv)) |
171 | goto finish; |
172 | } |
173 | else if (sv == &PL_sv_no) { |
174 | sv_catpv(t, "SV_NO"); |
175 | if (!(SvFLAGS(sv) & (SVf_ROK|SVf_OOK|SVs_OBJECT| |
176 | SVs_GMG|SVs_SMG|SVs_RMG)) && |
177 | !(~SvFLAGS(sv) & (SVf_POK|SVf_NOK|SVf_READONLY| |
178 | SVp_POK|SVp_NOK)) && |
179 | SvCUR(sv) == 0 && |
180 | SvNVX(sv) == 0.0) |
181 | goto finish; |
182 | } |
183 | else { |
184 | sv_catpv(t, "SV_YES"); |
185 | if (!(SvFLAGS(sv) & (SVf_ROK|SVf_OOK|SVs_OBJECT| |
186 | SVs_GMG|SVs_SMG|SVs_RMG)) && |
187 | !(~SvFLAGS(sv) & (SVf_POK|SVf_NOK|SVf_READONLY| |
188 | SVp_POK|SVp_NOK)) && |
189 | SvCUR(sv) == 1 && |
190 | SvPVX(sv) && *SvPVX(sv) == '1' && |
191 | SvNVX(sv) == 1.0) |
192 | goto finish; |
193 | } |
194 | sv_catpv(t, ":"); |
195 | } |
196 | else if (SvREFCNT(sv) == 0) { |
197 | sv_catpv(t, "("); |
198 | unref++; |
199 | } |
200 | if (SvROK(sv)) { |
201 | sv_catpv(t, "\\"); |
202 | if (SvCUR(t) + unref > 10) { |
203 | SvCUR(t) = unref + 3; |
204 | *SvEND(t) = '\0'; |
205 | sv_catpv(t, "..."); |
206 | goto finish; |
207 | } |
208 | sv = (SV*)SvRV(sv); |
209 | goto retry; |
210 | } |
211 | switch (SvTYPE(sv)) { |
212 | default: |
213 | sv_catpv(t, "FREED"); |
214 | goto finish; |
215 | |
216 | case SVt_NULL: |
217 | sv_catpv(t, "UNDEF"); |
218 | goto finish; |
219 | case SVt_IV: |
220 | sv_catpv(t, "IV"); |
221 | break; |
222 | case SVt_NV: |
223 | sv_catpv(t, "NV"); |
224 | break; |
225 | case SVt_RV: |
226 | sv_catpv(t, "RV"); |
227 | break; |
228 | case SVt_PV: |
229 | sv_catpv(t, "PV"); |
230 | break; |
231 | case SVt_PVIV: |
232 | sv_catpv(t, "PVIV"); |
233 | break; |
234 | case SVt_PVNV: |
235 | sv_catpv(t, "PVNV"); |
236 | break; |
237 | case SVt_PVMG: |
238 | sv_catpv(t, "PVMG"); |
239 | break; |
240 | case SVt_PVLV: |
241 | sv_catpv(t, "PVLV"); |
242 | break; |
243 | case SVt_PVAV: |
244 | sv_catpv(t, "AV"); |
245 | break; |
246 | case SVt_PVHV: |
247 | sv_catpv(t, "HV"); |
248 | break; |
249 | case SVt_PVCV: |
250 | if (CvGV(sv)) |
cea2e8a9 |
251 | Perl_sv_catpvf(aTHX_ t, "CV(%s)", GvNAME(CvGV(sv))); |
3967c732 |
252 | else |
253 | sv_catpv(t, "CV()"); |
254 | goto finish; |
255 | case SVt_PVGV: |
256 | sv_catpv(t, "GV"); |
257 | break; |
258 | case SVt_PVBM: |
259 | sv_catpv(t, "BM"); |
260 | break; |
261 | case SVt_PVFM: |
262 | sv_catpv(t, "FM"); |
263 | break; |
264 | case SVt_PVIO: |
265 | sv_catpv(t, "IO"); |
266 | break; |
267 | } |
268 | |
269 | if (SvPOKp(sv)) { |
270 | if (!SvPVX(sv)) |
271 | sv_catpv(t, "(null)"); |
272 | else { |
79cb57f6 |
273 | SV *tmp = newSVpvn("", 0); |
3967c732 |
274 | sv_catpv(t, "("); |
275 | if (SvOOK(sv)) |
cea2e8a9 |
276 | Perl_sv_catpvf(aTHX_ t, "[%s]", pv_display(tmp, SvPVX(sv)-SvIVX(sv), SvIVX(sv), 0, 127)); |
277 | Perl_sv_catpvf(aTHX_ t, "%s)", pv_display(tmp, SvPVX(sv), SvCUR(sv), SvLEN(sv), 127)); |
3967c732 |
278 | SvREFCNT_dec(tmp); |
279 | } |
280 | } |
281 | else if (SvNOKp(sv)) { |
097ee67d |
282 | RESTORE_NUMERIC_STANDARD(); |
cea2e8a9 |
283 | Perl_sv_catpvf(aTHX_ t, "(%g)",SvNVX(sv)); |
097ee67d |
284 | RESTORE_NUMERIC_LOCAL(); |
3967c732 |
285 | } |
57def98f |
286 | else if (SvIOKp(sv)) { |
cf2093f6 |
287 | if (SvIsUV(sv)) |
57def98f |
288 | Perl_sv_catpvf(aTHX_ t, "(%"UVuf")", (UV)SvUVX(sv)); |
cf2093f6 |
289 | else |
57def98f |
290 | Perl_sv_catpvf(aTHX_ t, "(%"IVdf")", (IV)SvIVX(sv)); |
25da4f38 |
291 | } |
3967c732 |
292 | else |
293 | sv_catpv(t, "()"); |
294 | |
295 | finish: |
296 | if (unref) { |
297 | while (unref--) |
298 | sv_catpv(t, ")"); |
299 | } |
2d8e6c8d |
300 | return SvPV(t, n_a); |
3967c732 |
301 | } |
302 | |
303 | void |
864dbfa3 |
304 | Perl_do_pmop_dump(pTHX_ I32 level, PerlIO *file, PMOP *pm) |
3967c732 |
305 | { |
306 | char ch; |
307 | |
308 | if (!pm) { |
cea2e8a9 |
309 | Perl_dump_indent(aTHX_ level, file, "{}\n"); |
3967c732 |
310 | return; |
311 | } |
cea2e8a9 |
312 | Perl_dump_indent(aTHX_ level, file, "{\n"); |
3967c732 |
313 | level++; |
314 | if (pm->op_pmflags & PMf_ONCE) |
315 | ch = '?'; |
316 | else |
317 | ch = '/'; |
318 | if (pm->op_pmregexp) |
cea2e8a9 |
319 | Perl_dump_indent(aTHX_ level, file, "PMf_PRE %c%s%c%s\n", |
3967c732 |
320 | ch, pm->op_pmregexp->precomp, ch, |
321 | (pm->op_private & OPpRUNTIME) ? " (RUNTIME)" : ""); |
322 | else |
cea2e8a9 |
323 | Perl_dump_indent(aTHX_ level, file, "PMf_PRE (RUNTIME)\n"); |
3967c732 |
324 | if (pm->op_type != OP_PUSHRE && pm->op_pmreplroot) { |
cea2e8a9 |
325 | Perl_dump_indent(aTHX_ level, file, "PMf_REPL = "); |
3967c732 |
326 | op_dump(pm->op_pmreplroot); |
327 | } |
328 | if (pm->op_pmflags || (pm->op_pmregexp && pm->op_pmregexp->check_substr)) { |
79cb57f6 |
329 | SV *tmpsv = newSVpvn("", 0); |
3967c732 |
330 | if (pm->op_pmdynflags & PMdf_USED) |
331 | sv_catpv(tmpsv, ",USED"); |
332 | if (pm->op_pmdynflags & PMdf_TAINTED) |
333 | sv_catpv(tmpsv, ",TAINTED"); |
334 | if (pm->op_pmflags & PMf_ONCE) |
335 | sv_catpv(tmpsv, ",ONCE"); |
336 | if (pm->op_pmregexp && pm->op_pmregexp->check_substr |
337 | && !(pm->op_pmregexp->reganch & ROPT_NOSCAN)) |
338 | sv_catpv(tmpsv, ",SCANFIRST"); |
339 | if (pm->op_pmregexp && pm->op_pmregexp->check_substr |
340 | && pm->op_pmregexp->reganch & ROPT_CHECK_ALL) |
341 | sv_catpv(tmpsv, ",ALL"); |
342 | if (pm->op_pmflags & PMf_SKIPWHITE) |
343 | sv_catpv(tmpsv, ",SKIPWHITE"); |
344 | if (pm->op_pmflags & PMf_CONST) |
345 | sv_catpv(tmpsv, ",CONST"); |
346 | if (pm->op_pmflags & PMf_KEEP) |
347 | sv_catpv(tmpsv, ",KEEP"); |
348 | if (pm->op_pmflags & PMf_GLOBAL) |
349 | sv_catpv(tmpsv, ",GLOBAL"); |
350 | if (pm->op_pmflags & PMf_CONTINUE) |
351 | sv_catpv(tmpsv, ",CONTINUE"); |
352 | if (pm->op_pmflags & PMf_RETAINT) |
353 | sv_catpv(tmpsv, ",RETAINT"); |
354 | if (pm->op_pmflags & PMf_EVAL) |
355 | sv_catpv(tmpsv, ",EVAL"); |
cea2e8a9 |
356 | Perl_dump_indent(aTHX_ level, file, "PMFLAGS = (%s)\n", SvCUR(tmpsv) ? SvPVX(tmpsv) + 1 : ""); |
3967c732 |
357 | SvREFCNT_dec(tmpsv); |
358 | } |
359 | |
cea2e8a9 |
360 | Perl_dump_indent(aTHX_ level-1, file, "}\n"); |
3967c732 |
361 | } |
362 | |
363 | void |
864dbfa3 |
364 | Perl_pmop_dump(pTHX_ PMOP *pm) |
3967c732 |
365 | { |
366 | do_pmop_dump(0, Perl_debug_log, pm); |
79072805 |
367 | } |
368 | |
369 | void |
864dbfa3 |
370 | Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, OP *o) |
79072805 |
371 | { |
3967c732 |
372 | dTHR; |
2d8e6c8d |
373 | STRLEN n_a; |
cea2e8a9 |
374 | Perl_dump_indent(aTHX_ level, file, "{\n"); |
3967c732 |
375 | level++; |
11343788 |
376 | if (o->op_seq) |
3967c732 |
377 | PerlIO_printf(file, "%-4d", o->op_seq); |
93a17b20 |
378 | else |
3967c732 |
379 | PerlIO_printf(file, " "); |
c8db6e60 |
380 | PerlIO_printf(file, |
381 | "%*sTYPE = %s ===> ", |
382 | (int)(PL_dumpindent*level-4), "", PL_op_name[o->op_type]); |
11343788 |
383 | if (o->op_next) { |
384 | if (o->op_seq) |
3967c732 |
385 | PerlIO_printf(file, "%d\n", o->op_next->op_seq); |
93a17b20 |
386 | else |
3967c732 |
387 | PerlIO_printf(file, "(%d)\n", o->op_next->op_seq); |
93a17b20 |
388 | } |
79072805 |
389 | else |
3967c732 |
390 | PerlIO_printf(file, "DONE\n"); |
11343788 |
391 | if (o->op_targ) { |
acb36ea4 |
392 | if (o->op_type == OP_NULL) |
cea2e8a9 |
393 | Perl_dump_indent(aTHX_ level, file, " (was %s)\n", PL_op_name[o->op_targ]); |
8990e307 |
394 | else |
cea2e8a9 |
395 | Perl_dump_indent(aTHX_ level, file, "TARG = %d\n", o->op_targ); |
8990e307 |
396 | } |
748a9306 |
397 | #ifdef DUMPADDR |
57def98f |
398 | Perl_dump_indent(aTHX_ level, file, "ADDR = 0x%"UVxf" => 0x%"UVxf"\n", (UV)o, (UV)o->op_next); |
79072805 |
399 | #endif |
11343788 |
400 | if (o->op_flags) { |
79cb57f6 |
401 | SV *tmpsv = newSVpvn("", 0); |
5dc0d613 |
402 | switch (o->op_flags & OPf_WANT) { |
54310121 |
403 | case OPf_WANT_VOID: |
46fc3d4c |
404 | sv_catpv(tmpsv, ",VOID"); |
54310121 |
405 | break; |
406 | case OPf_WANT_SCALAR: |
46fc3d4c |
407 | sv_catpv(tmpsv, ",SCALAR"); |
54310121 |
408 | break; |
409 | case OPf_WANT_LIST: |
46fc3d4c |
410 | sv_catpv(tmpsv, ",LIST"); |
54310121 |
411 | break; |
412 | default: |
46fc3d4c |
413 | sv_catpv(tmpsv, ",UNKNOWN"); |
54310121 |
414 | break; |
415 | } |
11343788 |
416 | if (o->op_flags & OPf_KIDS) |
46fc3d4c |
417 | sv_catpv(tmpsv, ",KIDS"); |
11343788 |
418 | if (o->op_flags & OPf_PARENS) |
46fc3d4c |
419 | sv_catpv(tmpsv, ",PARENS"); |
11343788 |
420 | if (o->op_flags & OPf_STACKED) |
46fc3d4c |
421 | sv_catpv(tmpsv, ",STACKED"); |
11343788 |
422 | if (o->op_flags & OPf_REF) |
46fc3d4c |
423 | sv_catpv(tmpsv, ",REF"); |
11343788 |
424 | if (o->op_flags & OPf_MOD) |
46fc3d4c |
425 | sv_catpv(tmpsv, ",MOD"); |
11343788 |
426 | if (o->op_flags & OPf_SPECIAL) |
46fc3d4c |
427 | sv_catpv(tmpsv, ",SPECIAL"); |
cea2e8a9 |
428 | Perl_dump_indent(aTHX_ level, file, "FLAGS = (%s)\n", SvCUR(tmpsv) ? SvPVX(tmpsv) + 1 : ""); |
46fc3d4c |
429 | SvREFCNT_dec(tmpsv); |
79072805 |
430 | } |
11343788 |
431 | if (o->op_private) { |
79cb57f6 |
432 | SV *tmpsv = newSVpvn("", 0); |
11343788 |
433 | if (o->op_type == OP_AASSIGN) { |
434 | if (o->op_private & OPpASSIGN_COMMON) |
46fc3d4c |
435 | sv_catpv(tmpsv, ",COMMON"); |
8d063cd8 |
436 | } |
11343788 |
437 | else if (o->op_type == OP_SASSIGN) { |
438 | if (o->op_private & OPpASSIGN_BACKWARDS) |
46fc3d4c |
439 | sv_catpv(tmpsv, ",BACKWARDS"); |
a0d0e21e |
440 | } |
11343788 |
441 | else if (o->op_type == OP_TRANS) { |
442 | if (o->op_private & OPpTRANS_SQUASH) |
46fc3d4c |
443 | sv_catpv(tmpsv, ",SQUASH"); |
11343788 |
444 | if (o->op_private & OPpTRANS_DELETE) |
46fc3d4c |
445 | sv_catpv(tmpsv, ",DELETE"); |
11343788 |
446 | if (o->op_private & OPpTRANS_COMPLEMENT) |
46fc3d4c |
447 | sv_catpv(tmpsv, ",COMPLEMENT"); |
8d063cd8 |
448 | } |
11343788 |
449 | else if (o->op_type == OP_REPEAT) { |
450 | if (o->op_private & OPpREPEAT_DOLIST) |
46fc3d4c |
451 | sv_catpv(tmpsv, ",DOLIST"); |
8d063cd8 |
452 | } |
11343788 |
453 | else if (o->op_type == OP_ENTERSUB || |
454 | o->op_type == OP_RV2SV || |
455 | o->op_type == OP_RV2AV || |
456 | o->op_type == OP_RV2HV || |
457 | o->op_type == OP_RV2GV || |
458 | o->op_type == OP_AELEM || |
459 | o->op_type == OP_HELEM ) |
85e6fe83 |
460 | { |
5dc0d613 |
461 | if (o->op_type == OP_ENTERSUB) { |
462 | if (o->op_private & OPpENTERSUB_AMPER) |
46fc3d4c |
463 | sv_catpv(tmpsv, ",AMPER"); |
5dc0d613 |
464 | if (o->op_private & OPpENTERSUB_DB) |
46fc3d4c |
465 | sv_catpv(tmpsv, ",DB"); |
d3011074 |
466 | if (o->op_private & OPpENTERSUB_HASTARG) |
467 | sv_catpv(tmpsv, ",HASTARG"); |
68dc0745 |
468 | } |
d3011074 |
469 | else |
470 | switch (o->op_private & OPpDEREF) { |
5f05dabc |
471 | case OPpDEREF_SV: |
46fc3d4c |
472 | sv_catpv(tmpsv, ",SV"); |
5f05dabc |
473 | break; |
474 | case OPpDEREF_AV: |
46fc3d4c |
475 | sv_catpv(tmpsv, ",AV"); |
5f05dabc |
476 | break; |
477 | case OPpDEREF_HV: |
46fc3d4c |
478 | sv_catpv(tmpsv, ",HV"); |
5f05dabc |
479 | break; |
480 | } |
5dc0d613 |
481 | if (o->op_type == OP_AELEM || o->op_type == OP_HELEM) { |
482 | if (o->op_private & OPpLVAL_DEFER) |
46fc3d4c |
483 | sv_catpv(tmpsv, ",LVAL_DEFER"); |
68dc0745 |
484 | } |
485 | else { |
5dc0d613 |
486 | if (o->op_private & HINT_STRICT_REFS) |
46fc3d4c |
487 | sv_catpv(tmpsv, ",STRICT_REFS"); |
68dc0745 |
488 | } |
8d063cd8 |
489 | } |
11343788 |
490 | else if (o->op_type == OP_CONST) { |
491 | if (o->op_private & OPpCONST_BARE) |
46fc3d4c |
492 | sv_catpv(tmpsv, ",BARE"); |
7a52d87a |
493 | if (o->op_private & OPpCONST_STRICT) |
494 | sv_catpv(tmpsv, ",STRICT"); |
79072805 |
495 | } |
11343788 |
496 | else if (o->op_type == OP_FLIP) { |
497 | if (o->op_private & OPpFLIP_LINENUM) |
46fc3d4c |
498 | sv_catpv(tmpsv, ",LINENUM"); |
79072805 |
499 | } |
11343788 |
500 | else if (o->op_type == OP_FLOP) { |
501 | if (o->op_private & OPpFLIP_LINENUM) |
46fc3d4c |
502 | sv_catpv(tmpsv, ",LINENUM"); |
cd06dffe |
503 | } else if (o->op_type == OP_RV2CV) { |
504 | if (o->op_private & OPpLVAL_INTRO) |
505 | sv_catpv(tmpsv, ",INTRO"); |
79072805 |
506 | } |
11343788 |
507 | if (o->op_flags & OPf_MOD && o->op_private & OPpLVAL_INTRO) |
46fc3d4c |
508 | sv_catpv(tmpsv, ",INTRO"); |
509 | if (SvCUR(tmpsv)) |
cea2e8a9 |
510 | Perl_dump_indent(aTHX_ level, file, "PRIVATE = (%s)\n", SvPVX(tmpsv) + 1); |
46fc3d4c |
511 | SvREFCNT_dec(tmpsv); |
8d063cd8 |
512 | } |
8d063cd8 |
513 | |
11343788 |
514 | switch (o->op_type) { |
971a9dd3 |
515 | case OP_AELEMFAST: |
93a17b20 |
516 | case OP_GVSV: |
79072805 |
517 | case OP_GV: |
971a9dd3 |
518 | #ifdef USE_ITHREADS |
519 | Perl_dump_indent(aTHX_ level, file, "PADIX = %d\n", cPADOPo->op_padix); |
520 | #else |
521 | if (cSVOPo->op_sv) { |
46fc3d4c |
522 | SV *tmpsv = NEWSV(0,0); |
8990e307 |
523 | ENTER; |
8990e307 |
524 | SAVEFREESV(tmpsv); |
971a9dd3 |
525 | gv_fullname3(tmpsv, (GV*)cSVOPo->op_sv, Nullch); |
cea2e8a9 |
526 | Perl_dump_indent(aTHX_ level, file, "GV = %s\n", SvPV(tmpsv, n_a)); |
8990e307 |
527 | LEAVE; |
378cc40b |
528 | } |
79072805 |
529 | else |
cea2e8a9 |
530 | Perl_dump_indent(aTHX_ level, file, "GV = NULL\n"); |
971a9dd3 |
531 | #endif |
79072805 |
532 | break; |
533 | case OP_CONST: |
7766f137 |
534 | Perl_dump_indent(aTHX_ level, file, "SV = %s\n", SvPEEK(cSVOPo_sv)); |
535 | break; |
f5d5a27c |
536 | case OP_METHOD_NAMED: |
cea2e8a9 |
537 | Perl_dump_indent(aTHX_ level, file, "SV = %s\n", SvPEEK(cSVOPo->op_sv)); |
79072805 |
538 | break; |
7399586d |
539 | case OP_SETSTATE: |
93a17b20 |
540 | case OP_NEXTSTATE: |
541 | case OP_DBSTATE: |
57843af0 |
542 | if (CopLINE(cCOPo)) |
543 | Perl_dump_indent(aTHX_ level, file, "LINE = %d\n",CopLINE(cCOPo)); |
ed094faf |
544 | if (CopSTASHPV(cCOPo)) |
545 | Perl_dump_indent(aTHX_ level, file, "PACKAGE = \"%s\"\n", |
546 | CopSTASHPV(cCOPo)); |
11343788 |
547 | if (cCOPo->cop_label) |
ed094faf |
548 | Perl_dump_indent(aTHX_ level, file, "LABEL = \"%s\"\n", |
549 | cCOPo->cop_label); |
79072805 |
550 | break; |
551 | case OP_ENTERLOOP: |
cea2e8a9 |
552 | Perl_dump_indent(aTHX_ level, file, "REDO ===> "); |
11343788 |
553 | if (cLOOPo->op_redoop) |
3967c732 |
554 | PerlIO_printf(file, "%d\n", cLOOPo->op_redoop->op_seq); |
79072805 |
555 | else |
3967c732 |
556 | PerlIO_printf(file, "DONE\n"); |
cea2e8a9 |
557 | Perl_dump_indent(aTHX_ level, file, "NEXT ===> "); |
11343788 |
558 | if (cLOOPo->op_nextop) |
3967c732 |
559 | PerlIO_printf(file, "%d\n", cLOOPo->op_nextop->op_seq); |
79072805 |
560 | else |
3967c732 |
561 | PerlIO_printf(file, "DONE\n"); |
cea2e8a9 |
562 | Perl_dump_indent(aTHX_ level, file, "LAST ===> "); |
11343788 |
563 | if (cLOOPo->op_lastop) |
3967c732 |
564 | PerlIO_printf(file, "%d\n", cLOOPo->op_lastop->op_seq); |
79072805 |
565 | else |
3967c732 |
566 | PerlIO_printf(file, "DONE\n"); |
79072805 |
567 | break; |
568 | case OP_COND_EXPR: |
1a67a97c |
569 | case OP_RANGE: |
a0d0e21e |
570 | case OP_MAPWHILE: |
79072805 |
571 | case OP_GREPWHILE: |
572 | case OP_OR: |
573 | case OP_AND: |
cea2e8a9 |
574 | Perl_dump_indent(aTHX_ level, file, "OTHER ===> "); |
11343788 |
575 | if (cLOGOPo->op_other) |
3967c732 |
576 | PerlIO_printf(file, "%d\n", cLOGOPo->op_other->op_seq); |
79072805 |
577 | else |
3967c732 |
578 | PerlIO_printf(file, "DONE\n"); |
79072805 |
579 | break; |
580 | case OP_PUSHRE: |
581 | case OP_MATCH: |
8782bef2 |
582 | case OP_QR: |
79072805 |
583 | case OP_SUBST: |
3967c732 |
584 | do_pmop_dump(level, file, cPMOPo); |
79072805 |
585 | break; |
7934575e |
586 | case OP_LEAVE: |
587 | case OP_LEAVEEVAL: |
588 | case OP_LEAVESUB: |
589 | case OP_LEAVESUBLV: |
590 | case OP_LEAVEWRITE: |
591 | case OP_SCOPE: |
592 | if (o->op_private & OPpREFCOUNTED) |
593 | Perl_dump_indent(aTHX_ level, file, "REFCNT = %"UVuf"\n", (UV)o->op_targ); |
594 | break; |
a0d0e21e |
595 | default: |
596 | break; |
79072805 |
597 | } |
11343788 |
598 | if (o->op_flags & OPf_KIDS) { |
79072805 |
599 | OP *kid; |
11343788 |
600 | for (kid = cUNOPo->op_first; kid; kid = kid->op_sibling) |
3967c732 |
601 | do_op_dump(level, file, kid); |
8d063cd8 |
602 | } |
cea2e8a9 |
603 | Perl_dump_indent(aTHX_ level-1, file, "}\n"); |
3967c732 |
604 | } |
605 | |
606 | void |
864dbfa3 |
607 | Perl_op_dump(pTHX_ OP *o) |
3967c732 |
608 | { |
609 | do_op_dump(0, Perl_debug_log, o); |
8d063cd8 |
610 | } |
611 | |
8adcabd8 |
612 | void |
864dbfa3 |
613 | Perl_gv_dump(pTHX_ GV *gv) |
378cc40b |
614 | { |
79072805 |
615 | SV *sv; |
378cc40b |
616 | |
79072805 |
617 | if (!gv) { |
760ac839 |
618 | PerlIO_printf(Perl_debug_log, "{}\n"); |
378cc40b |
619 | return; |
620 | } |
8990e307 |
621 | sv = sv_newmortal(); |
760ac839 |
622 | PerlIO_printf(Perl_debug_log, "{\n"); |
f6aff53a |
623 | gv_fullname3(sv, gv, Nullch); |
cea2e8a9 |
624 | Perl_dump_indent(aTHX_ 1, Perl_debug_log, "GV_NAME = %s", SvPVX(sv)); |
79072805 |
625 | if (gv != GvEGV(gv)) { |
f6aff53a |
626 | gv_efullname3(sv, GvEGV(gv), Nullch); |
cea2e8a9 |
627 | Perl_dump_indent(aTHX_ 1, Perl_debug_log, "-> %s", SvPVX(sv)); |
8adcabd8 |
628 | } |
3967c732 |
629 | PerlIO_putc(Perl_debug_log, '\n'); |
cea2e8a9 |
630 | Perl_dump_indent(aTHX_ 0, Perl_debug_log, "}\n"); |
8d063cd8 |
631 | } |
632 | |
8adcabd8 |
633 | void |
864dbfa3 |
634 | Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, MAGIC *mg, I32 nest, I32 maxnest, bool dumpops, STRLEN pvlim) |
8d063cd8 |
635 | { |
3967c732 |
636 | for (; mg; mg = mg->mg_moremagic) { |
b900a521 |
637 | Perl_dump_indent(aTHX_ level, file, |
638 | " MAGIC = 0x%"UVxf"\n", PTR2UV(mg)); |
3967c732 |
639 | if (mg->mg_virtual) { |
640 | MGVTBL *v = mg->mg_virtual; |
641 | char *s = 0; |
642 | if (v == &PL_vtbl_sv) s = "sv"; |
643 | else if (v == &PL_vtbl_env) s = "env"; |
644 | else if (v == &PL_vtbl_envelem) s = "envelem"; |
645 | else if (v == &PL_vtbl_sig) s = "sig"; |
646 | else if (v == &PL_vtbl_sigelem) s = "sigelem"; |
647 | else if (v == &PL_vtbl_pack) s = "pack"; |
648 | else if (v == &PL_vtbl_packelem) s = "packelem"; |
649 | else if (v == &PL_vtbl_dbline) s = "dbline"; |
650 | else if (v == &PL_vtbl_isa) s = "isa"; |
651 | else if (v == &PL_vtbl_arylen) s = "arylen"; |
652 | else if (v == &PL_vtbl_glob) s = "glob"; |
653 | else if (v == &PL_vtbl_mglob) s = "mglob"; |
654 | else if (v == &PL_vtbl_nkeys) s = "nkeys"; |
655 | else if (v == &PL_vtbl_taint) s = "taint"; |
656 | else if (v == &PL_vtbl_substr) s = "substr"; |
657 | else if (v == &PL_vtbl_vec) s = "vec"; |
658 | else if (v == &PL_vtbl_pos) s = "pos"; |
659 | else if (v == &PL_vtbl_bm) s = "bm"; |
660 | else if (v == &PL_vtbl_fm) s = "fm"; |
661 | else if (v == &PL_vtbl_uvar) s = "uvar"; |
662 | else if (v == &PL_vtbl_defelem) s = "defelem"; |
663 | #ifdef USE_LOCALE_COLLATE |
664 | else if (v == &PL_vtbl_collxfrm) s = "collxfrm"; |
665 | #endif |
3967c732 |
666 | else if (v == &PL_vtbl_amagic) s = "amagic"; |
667 | else if (v == &PL_vtbl_amagicelem) s = "amagicelem"; |
810b8aa5 |
668 | else if (v == &PL_vtbl_backref) s = "backref"; |
3967c732 |
669 | if (s) |
cea2e8a9 |
670 | Perl_dump_indent(aTHX_ level, file, " MG_VIRTUAL = &PL_vtbl_%s\n", s); |
3967c732 |
671 | else |
b900a521 |
672 | Perl_dump_indent(aTHX_ level, file, " MG_VIRTUAL = 0x%"UVxf"\n", PTR2UV(v)); |
3967c732 |
673 | } |
674 | else |
cea2e8a9 |
675 | Perl_dump_indent(aTHX_ level, file, " MG_VIRTUAL = 0\n"); |
8d063cd8 |
676 | |
3967c732 |
677 | if (mg->mg_private) |
cea2e8a9 |
678 | Perl_dump_indent(aTHX_ level, file, " MG_PRIVATE = %d\n", mg->mg_private); |
3967c732 |
679 | |
680 | if (isPRINT(mg->mg_type)) |
cea2e8a9 |
681 | Perl_dump_indent(aTHX_ level, file, " MG_TYPE = '%c'\n", mg->mg_type); |
3967c732 |
682 | else |
cea2e8a9 |
683 | Perl_dump_indent(aTHX_ level, file, " MG_TYPE = '\\%o'\n", mg->mg_type); |
3967c732 |
684 | |
685 | if (mg->mg_flags) { |
cea2e8a9 |
686 | Perl_dump_indent(aTHX_ level, file, " MG_FLAGS = 0x%02X\n", mg->mg_flags); |
3967c732 |
687 | if (mg->mg_flags & MGf_TAINTEDDIR) |
cea2e8a9 |
688 | Perl_dump_indent(aTHX_ level, file, " TAINTEDDIR\n"); |
3967c732 |
689 | if (mg->mg_flags & MGf_REFCOUNTED) |
cea2e8a9 |
690 | Perl_dump_indent(aTHX_ level, file, " REFCOUNTED\n"); |
3967c732 |
691 | if (mg->mg_flags & MGf_GSKIP) |
cea2e8a9 |
692 | Perl_dump_indent(aTHX_ level, file, " GSKIP\n"); |
3967c732 |
693 | if (mg->mg_flags & MGf_MINMATCH) |
cea2e8a9 |
694 | Perl_dump_indent(aTHX_ level, file, " MINMATCH\n"); |
3967c732 |
695 | } |
696 | if (mg->mg_obj) { |
b900a521 |
697 | Perl_dump_indent(aTHX_ level, file, " MG_OBJ = 0x%"UVxf"\n", PTR2UV(mg->mg_obj)); |
3967c732 |
698 | if (mg->mg_flags & MGf_REFCOUNTED) |
699 | do_sv_dump(level+2, file, mg->mg_obj, nest+1, maxnest, dumpops, pvlim); /* MG is already +1 */ |
700 | } |
701 | if (mg->mg_len) |
cea2e8a9 |
702 | Perl_dump_indent(aTHX_ level, file, " MG_LEN = %d\n", mg->mg_len); |
3967c732 |
703 | if (mg->mg_ptr) { |
b900a521 |
704 | Perl_dump_indent(aTHX_ level, file, " MG_PTR = 0x%"UVxf, PTR2UV(mg->mg_ptr)); |
3967c732 |
705 | if (mg->mg_len >= 0) { |
79cb57f6 |
706 | SV *sv = newSVpvn("", 0); |
3967c732 |
707 | PerlIO_printf(file, " %s", pv_display(sv, mg->mg_ptr, mg->mg_len, 0, pvlim)); |
708 | SvREFCNT_dec(sv); |
709 | } |
710 | else if (mg->mg_len == HEf_SVKEY) { |
711 | PerlIO_puts(file, " => HEf_SVKEY\n"); |
712 | do_sv_dump(level+2, file, (SV*)((mg)->mg_ptr), nest+1, maxnest, dumpops, pvlim); /* MG is already +1 */ |
713 | continue; |
714 | } |
715 | else |
716 | PerlIO_puts(file, " ???? - please notify IZ"); |
717 | PerlIO_putc(file, '\n'); |
718 | } |
378cc40b |
719 | } |
3967c732 |
720 | } |
721 | |
722 | void |
864dbfa3 |
723 | Perl_magic_dump(pTHX_ MAGIC *mg) |
3967c732 |
724 | { |
725 | do_magic_dump(0, Perl_debug_log, mg, 0, 0, 0, 0); |
726 | } |
727 | |
728 | void |
864dbfa3 |
729 | Perl_do_hv_dump(pTHX_ I32 level, PerlIO *file, char *name, HV *sv) |
3967c732 |
730 | { |
b900a521 |
731 | Perl_dump_indent(aTHX_ level, file, "%s = 0x%"UVxf, name, PTR2UV(sv)); |
3967c732 |
732 | if (sv && HvNAME(sv)) |
733 | PerlIO_printf(file, "\t\"%s\"\n", HvNAME(sv)); |
79072805 |
734 | else |
3967c732 |
735 | PerlIO_putc(file, '\n'); |
736 | } |
737 | |
738 | void |
864dbfa3 |
739 | Perl_do_gv_dump(pTHX_ I32 level, PerlIO *file, char *name, GV *sv) |
3967c732 |
740 | { |
b900a521 |
741 | Perl_dump_indent(aTHX_ level, file, "%s = 0x%"UVxf, name, PTR2UV(sv)); |
3967c732 |
742 | if (sv && GvNAME(sv)) |
743 | PerlIO_printf(file, "\t\"%s\"\n", GvNAME(sv)); |
c90c0ff4 |
744 | else |
3967c732 |
745 | PerlIO_putc(file, '\n'); |
746 | } |
747 | |
748 | void |
864dbfa3 |
749 | Perl_do_gvgv_dump(pTHX_ I32 level, PerlIO *file, char *name, GV *sv) |
3967c732 |
750 | { |
b900a521 |
751 | Perl_dump_indent(aTHX_ level, file, "%s = 0x%"UVxf, name, PTR2UV(sv)); |
3967c732 |
752 | if (sv && GvNAME(sv)) { |
753 | PerlIO_printf(file, "\t\""); |
754 | if (GvSTASH(sv) && HvNAME(GvSTASH(sv))) |
755 | PerlIO_printf(file, "%s\" :: \"", HvNAME(GvSTASH(sv))); |
756 | PerlIO_printf(file, "%s\"\n", GvNAME(sv)); |
8d063cd8 |
757 | } |
3967c732 |
758 | else |
759 | PerlIO_putc(file, '\n'); |
760 | } |
761 | |
762 | void |
864dbfa3 |
763 | Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bool dumpops, STRLEN pvlim) |
3967c732 |
764 | { |
765 | dTHR; |
766 | SV *d = sv_newmortal(); |
767 | char *s; |
768 | U32 flags; |
769 | U32 type; |
2d8e6c8d |
770 | STRLEN n_a; |
3967c732 |
771 | |
772 | if (!sv) { |
cea2e8a9 |
773 | Perl_dump_indent(aTHX_ level, file, "SV = 0\n"); |
3967c732 |
774 | return; |
378cc40b |
775 | } |
3967c732 |
776 | |
777 | flags = SvFLAGS(sv); |
778 | type = SvTYPE(sv); |
79072805 |
779 | |
cf2093f6 |
780 | Perl_sv_setpvf(aTHX_ d, |
57def98f |
781 | "(0x%"UVxf") at 0x%"UVxf"\n%*s REFCNT = %"IVdf"\n%*s FLAGS = (", |
56431972 |
782 | PTR2UV(SvANY(sv)), PTR2UV(sv), |
cf2093f6 |
783 | PL_dumpindent*level, "", (IV)SvREFCNT(sv), |
784 | PL_dumpindent*level, ""); |
8d063cd8 |
785 | |
3967c732 |
786 | if (flags & SVs_PADBUSY) sv_catpv(d, "PADBUSY,"); |
787 | if (flags & SVs_PADTMP) sv_catpv(d, "PADTMP,"); |
788 | if (flags & SVs_PADMY) sv_catpv(d, "PADMY,"); |
789 | if (flags & SVs_TEMP) sv_catpv(d, "TEMP,"); |
790 | if (flags & SVs_OBJECT) sv_catpv(d, "OBJECT,"); |
791 | if (flags & SVs_GMG) sv_catpv(d, "GMG,"); |
792 | if (flags & SVs_SMG) sv_catpv(d, "SMG,"); |
793 | if (flags & SVs_RMG) sv_catpv(d, "RMG,"); |
4db58590 |
794 | |
3967c732 |
795 | if (flags & SVf_IOK) sv_catpv(d, "IOK,"); |
796 | if (flags & SVf_NOK) sv_catpv(d, "NOK,"); |
797 | if (flags & SVf_POK) sv_catpv(d, "POK,"); |
810b8aa5 |
798 | if (flags & SVf_ROK) { |
799 | sv_catpv(d, "ROK,"); |
800 | if (SvWEAKREF(sv)) sv_catpv(d, "WEAKREF,"); |
801 | } |
3967c732 |
802 | if (flags & SVf_OOK) sv_catpv(d, "OOK,"); |
803 | if (flags & SVf_FAKE) sv_catpv(d, "FAKE,"); |
804 | if (flags & SVf_READONLY) sv_catpv(d, "READONLY,"); |
4db58590 |
805 | |
3967c732 |
806 | if (flags & SVf_AMAGIC) sv_catpv(d, "OVERLOAD,"); |
3967c732 |
807 | if (flags & SVp_IOK) sv_catpv(d, "pIOK,"); |
808 | if (flags & SVp_NOK) sv_catpv(d, "pNOK,"); |
809 | if (flags & SVp_POK) sv_catpv(d, "pPOK,"); |
810 | if (flags & SVp_SCREAM) sv_catpv(d, "SCREAM,"); |
811 | |
812 | switch (type) { |
813 | case SVt_PVCV: |
814 | case SVt_PVFM: |
815 | if (CvANON(sv)) sv_catpv(d, "ANON,"); |
816 | if (CvUNIQUE(sv)) sv_catpv(d, "UNIQUE,"); |
817 | if (CvCLONE(sv)) sv_catpv(d, "CLONE,"); |
818 | if (CvCLONED(sv)) sv_catpv(d, "CLONED,"); |
819 | if (CvNODEBUG(sv)) sv_catpv(d, "NODEBUG,"); |
25da4f38 |
820 | if (SvCOMPILED(sv)) sv_catpv(d, "COMPILED,"); |
3967c732 |
821 | break; |
822 | case SVt_PVHV: |
823 | if (HvSHAREKEYS(sv)) sv_catpv(d, "SHAREKEYS,"); |
824 | if (HvLAZYDEL(sv)) sv_catpv(d, "LAZYDEL,"); |
825 | break; |
826 | case SVt_PVGV: |
827 | if (GvINTRO(sv)) sv_catpv(d, "INTRO,"); |
828 | if (GvMULTI(sv)) sv_catpv(d, "MULTI,"); |
829 | if (GvASSUMECV(sv)) sv_catpv(d, "ASSUMECV,"); |
830 | if (GvIMPORTED(sv)) { |
831 | sv_catpv(d, "IMPORT"); |
832 | if (GvIMPORTED(sv) == GVf_IMPORTED) |
833 | sv_catpv(d, "ALL,"); |
834 | else { |
835 | sv_catpv(d, "("); |
836 | if (GvIMPORTED_SV(sv)) sv_catpv(d, " SV"); |
837 | if (GvIMPORTED_AV(sv)) sv_catpv(d, " AV"); |
838 | if (GvIMPORTED_HV(sv)) sv_catpv(d, " HV"); |
839 | if (GvIMPORTED_CV(sv)) sv_catpv(d, " CV"); |
840 | sv_catpv(d, " ),"); |
841 | } |
842 | } |
25da4f38 |
843 | /* FALL THROGH */ |
844 | default: |
845 | if (SvEVALED(sv)) sv_catpv(d, "EVALED,"); |
846 | if (SvIsUV(sv)) sv_catpv(d, "IsUV,"); |
847 | break; |
3967c732 |
848 | case SVt_PVBM: |
849 | if (SvTAIL(sv)) sv_catpv(d, "TAIL,"); |
25da4f38 |
850 | if (SvVALID(sv)) sv_catpv(d, "VALID,"); |
3967c732 |
851 | break; |
852 | } |
853 | |
854 | if (*(SvEND(d) - 1) == ',') |
855 | SvPVX(d)[--SvCUR(d)] = '\0'; |
856 | sv_catpv(d, ")"); |
857 | s = SvPVX(d); |
858 | |
cea2e8a9 |
859 | Perl_dump_indent(aTHX_ level, file, "SV = "); |
3967c732 |
860 | switch (type) { |
861 | case SVt_NULL: |
862 | PerlIO_printf(file, "NULL%s\n", s); |
863 | return; |
864 | case SVt_IV: |
865 | PerlIO_printf(file, "IV%s\n", s); |
866 | break; |
867 | case SVt_NV: |
868 | PerlIO_printf(file, "NV%s\n", s); |
869 | break; |
870 | case SVt_RV: |
871 | PerlIO_printf(file, "RV%s\n", s); |
872 | break; |
873 | case SVt_PV: |
874 | PerlIO_printf(file, "PV%s\n", s); |
875 | break; |
876 | case SVt_PVIV: |
877 | PerlIO_printf(file, "PVIV%s\n", s); |
878 | break; |
879 | case SVt_PVNV: |
880 | PerlIO_printf(file, "PVNV%s\n", s); |
881 | break; |
882 | case SVt_PVBM: |
883 | PerlIO_printf(file, "PVBM%s\n", s); |
884 | break; |
885 | case SVt_PVMG: |
886 | PerlIO_printf(file, "PVMG%s\n", s); |
887 | break; |
888 | case SVt_PVLV: |
889 | PerlIO_printf(file, "PVLV%s\n", s); |
890 | break; |
891 | case SVt_PVAV: |
892 | PerlIO_printf(file, "PVAV%s\n", s); |
893 | break; |
894 | case SVt_PVHV: |
895 | PerlIO_printf(file, "PVHV%s\n", s); |
896 | break; |
897 | case SVt_PVCV: |
898 | PerlIO_printf(file, "PVCV%s\n", s); |
899 | break; |
900 | case SVt_PVGV: |
901 | PerlIO_printf(file, "PVGV%s\n", s); |
902 | break; |
903 | case SVt_PVFM: |
904 | PerlIO_printf(file, "PVFM%s\n", s); |
905 | break; |
906 | case SVt_PVIO: |
907 | PerlIO_printf(file, "PVIO%s\n", s); |
908 | break; |
909 | default: |
faccc32b |
910 | PerlIO_printf(file, "UNKNOWN(0x%"UVxf") %s\n", (UV)type, s); |
3967c732 |
911 | return; |
912 | } |
913 | if (type >= SVt_PVIV || type == SVt_IV) { |
cf2093f6 |
914 | if (SvIsUV(sv)) |
57def98f |
915 | Perl_dump_indent(aTHX_ level, file, " UV = %"UVuf, (UV)SvUVX(sv)); |
cf2093f6 |
916 | else |
57def98f |
917 | Perl_dump_indent(aTHX_ level, file, " IV = %"IVdf, (IV)SvIVX(sv)); |
3967c732 |
918 | if (SvOOK(sv)) |
919 | PerlIO_printf(file, " (OFFSET)"); |
920 | PerlIO_putc(file, '\n'); |
921 | } |
922 | if (type >= SVt_PVNV || type == SVt_NV) { |
097ee67d |
923 | RESTORE_NUMERIC_STANDARD(); |
57def98f |
924 | /* %Vg doesn't work? --jhi */ |
cf2093f6 |
925 | #ifdef USE_LONG_DOUBLE |
2d4389e4 |
926 | Perl_dump_indent(aTHX_ level, file, " NV = %.*" PERL_PRIgldbl "\n", LDBL_DIG, SvNVX(sv)); |
cf2093f6 |
927 | #else |
cea2e8a9 |
928 | Perl_dump_indent(aTHX_ level, file, " NV = %.*g\n", DBL_DIG, SvNVX(sv)); |
cf2093f6 |
929 | #endif |
097ee67d |
930 | RESTORE_NUMERIC_LOCAL(); |
3967c732 |
931 | } |
932 | if (SvROK(sv)) { |
57def98f |
933 | Perl_dump_indent(aTHX_ level, file, " RV = 0x%"UVxf"\n", PTR2UV(SvRV(sv))); |
3967c732 |
934 | if (nest < maxnest) |
935 | do_sv_dump(level+1, file, SvRV(sv), nest+1, maxnest, dumpops, pvlim); |
936 | return; |
937 | } |
938 | if (type < SVt_PV) |
939 | return; |
940 | if (type <= SVt_PVLV) { |
941 | if (SvPVX(sv)) { |
57def98f |
942 | Perl_dump_indent(aTHX_ level, file," PV = 0x%"UVxf" ", PTR2UV(SvPVX(sv))); |
3967c732 |
943 | if (SvOOK(sv)) |
944 | PerlIO_printf(file, "( %s . ) ", pv_display(d, SvPVX(sv)-SvIVX(sv), SvIVX(sv), 0, pvlim)); |
945 | PerlIO_printf(file, "%s\n", pv_display(d, SvPVX(sv), SvCUR(sv), SvLEN(sv), pvlim)); |
57def98f |
946 | Perl_dump_indent(aTHX_ level, file, " CUR = %"IVdf"\n", (IV)SvCUR(sv)); |
947 | Perl_dump_indent(aTHX_ level, file, " LEN = %"IVdf"\n", (IV)SvLEN(sv)); |
3967c732 |
948 | } |
949 | else |
cea2e8a9 |
950 | Perl_dump_indent(aTHX_ level, file, " PV = 0\n"); |
3967c732 |
951 | } |
952 | if (type >= SVt_PVMG) { |
953 | if (SvMAGIC(sv)) |
954 | do_magic_dump(level, file, SvMAGIC(sv), nest, maxnest, dumpops, pvlim); |
955 | if (SvSTASH(sv)) |
956 | do_hv_dump(level, file, " STASH", SvSTASH(sv)); |
957 | } |
958 | switch (type) { |
959 | case SVt_PVLV: |
cea2e8a9 |
960 | Perl_dump_indent(aTHX_ level, file, " TYPE = %c\n", LvTYPE(sv)); |
57def98f |
961 | Perl_dump_indent(aTHX_ level, file, " TARGOFF = %"IVdf"\n", (IV)LvTARGOFF(sv)); |
962 | Perl_dump_indent(aTHX_ level, file, " TARGLEN = %"IVdf"\n", (IV)LvTARGLEN(sv)); |
963 | Perl_dump_indent(aTHX_ level, file, " TARG = 0x%"UVxf"\n", PTR2UV(LvTARG(sv))); |
3967c732 |
964 | /* XXX level+1 ??? */ |
965 | do_sv_dump(level, file, LvTARG(sv), nest+1, maxnest, dumpops, pvlim); |
966 | break; |
967 | case SVt_PVAV: |
57def98f |
968 | Perl_dump_indent(aTHX_ level, file, " ARRAY = 0x%"UVxf, PTR2UV(AvARRAY(sv))); |
3967c732 |
969 | if (AvARRAY(sv) != AvALLOC(sv)) { |
57def98f |
970 | PerlIO_printf(file, " (offset=%"IVdf")\n", (IV)(AvARRAY(sv) - AvALLOC(sv))); |
971 | Perl_dump_indent(aTHX_ level, file, " ALLOC = 0x%"UVxf"\n", PTR2UV(AvALLOC(sv))); |
3967c732 |
972 | } |
973 | else |
974 | PerlIO_putc(file, '\n'); |
57def98f |
975 | Perl_dump_indent(aTHX_ level, file, " FILL = %"IVdf"\n", (IV)AvFILLp(sv)); |
976 | Perl_dump_indent(aTHX_ level, file, " MAX = %"IVdf"\n", (IV)AvMAX(sv)); |
977 | Perl_dump_indent(aTHX_ level, file, " ARYLEN = 0x%"UVxf"\n", PTR2UV(AvARYLEN(sv))); |
3967c732 |
978 | flags = AvFLAGS(sv); |
979 | sv_setpv(d, ""); |
980 | if (flags & AVf_REAL) sv_catpv(d, ",REAL"); |
981 | if (flags & AVf_REIFY) sv_catpv(d, ",REIFY"); |
982 | if (flags & AVf_REUSED) sv_catpv(d, ",REUSED"); |
cea2e8a9 |
983 | Perl_dump_indent(aTHX_ level, file, " FLAGS = (%s)\n", SvCUR(d) ? SvPVX(d) + 1 : ""); |
3967c732 |
984 | if (nest < maxnest && av_len((AV*)sv) >= 0) { |
985 | int count; |
986 | for (count = 0; count <= av_len((AV*)sv) && count < maxnest; count++) { |
987 | SV** elt = av_fetch((AV*)sv,count,0); |
988 | |
57def98f |
989 | Perl_dump_indent(aTHX_ level + 1, file, "Elt No. %"IVdf"\n", (IV)count); |
3967c732 |
990 | if (elt) |
991 | do_sv_dump(level+1, file, *elt, nest+1, maxnest, dumpops, pvlim); |
992 | } |
993 | } |
994 | break; |
995 | case SVt_PVHV: |
57def98f |
996 | Perl_dump_indent(aTHX_ level, file, " ARRAY = 0x%"UVxf, PTR2UV(HvARRAY(sv))); |
3967c732 |
997 | if (HvARRAY(sv) && HvKEYS(sv)) { |
998 | /* Show distribution of HEs in the ARRAY */ |
999 | int freq[200]; |
1000 | #define FREQ_MAX (sizeof freq / sizeof freq[0] - 1) |
1001 | int i; |
1002 | int max = 0; |
1003 | U32 pow2 = 2, keys = HvKEYS(sv); |
65202027 |
1004 | NV theoret, sum = 0; |
3967c732 |
1005 | |
1006 | PerlIO_printf(file, " ("); |
1007 | Zero(freq, FREQ_MAX + 1, int); |
1008 | for (i = 0; i <= HvMAX(sv); i++) { |
1009 | HE* h; int count = 0; |
1010 | for (h = HvARRAY(sv)[i]; h; h = HeNEXT(h)) |
1011 | count++; |
1012 | if (count > FREQ_MAX) |
1013 | count = FREQ_MAX; |
1014 | freq[count]++; |
1015 | if (max < count) |
1016 | max = count; |
1017 | } |
1018 | for (i = 0; i <= max; i++) { |
1019 | if (freq[i]) { |
1020 | PerlIO_printf(file, "%d%s:%d", i, |
1021 | (i == FREQ_MAX) ? "+" : "", |
1022 | freq[i]); |
1023 | if (i != max) |
1024 | PerlIO_printf(file, ", "); |
1025 | } |
1026 | } |
1027 | PerlIO_putc(file, ')'); |
1028 | /* Now calculate quality wrt theoretical value */ |
1029 | for (i = max; i > 0; i--) { /* Precision: count down. */ |
1030 | sum += freq[i] * i * i; |
1031 | } |
1032 | while (keys = keys >> 1) |
1033 | pow2 = pow2 << 1; |
1034 | /* Approximate by Poisson distribution */ |
1035 | theoret = HvKEYS(sv); |
1036 | theoret += theoret * theoret/pow2; |
1037 | PerlIO_putc(file, '\n'); |
cea2e8a9 |
1038 | Perl_dump_indent(aTHX_ level, file, " hash quality = %.1f%%", theoret/sum*100); |
3967c732 |
1039 | } |
1040 | PerlIO_putc(file, '\n'); |
57def98f |
1041 | Perl_dump_indent(aTHX_ level, file, " KEYS = %"IVdf"\n", (IV)HvKEYS(sv)); |
1042 | Perl_dump_indent(aTHX_ level, file, " FILL = %"IVdf"\n", (IV)HvFILL(sv)); |
1043 | Perl_dump_indent(aTHX_ level, file, " MAX = %"IVdf"\n", (IV)HvMAX(sv)); |
1044 | Perl_dump_indent(aTHX_ level, file, " RITER = %"IVdf"\n", (IV)HvRITER(sv)); |
1045 | Perl_dump_indent(aTHX_ level, file, " EITER = 0x%"UVxf"\n", PTR2UV(HvEITER(sv))); |
3967c732 |
1046 | if (HvPMROOT(sv)) |
57def98f |
1047 | Perl_dump_indent(aTHX_ level, file, " PMROOT = 0x%"UVxf"\n", PTR2UV(HvPMROOT(sv))); |
3967c732 |
1048 | if (HvNAME(sv)) |
cea2e8a9 |
1049 | Perl_dump_indent(aTHX_ level, file, " NAME = \"%s\"\n", HvNAME(sv)); |
3967c732 |
1050 | if (nest < maxnest && !HvEITER(sv)) { /* Try to preserve iterator */ |
1051 | HE *he; |
1052 | HV *hv = (HV*)sv; |
1053 | int count = maxnest - nest; |
1054 | |
1055 | hv_iterinit(hv); |
1056 | while ((he = hv_iternext(hv)) && count--) { |
1057 | SV *elt; |
1058 | char *key; |
1059 | I32 len; |
1060 | U32 hash = HeHASH(he); |
1061 | |
1062 | key = hv_iterkey(he, &len); |
1063 | elt = hv_iterval(hv, he); |
57def98f |
1064 | Perl_dump_indent(aTHX_ level+1, file, "Elt %s HASH = 0x%"UVxf"\n", pv_display(d, key, len, 0, pvlim), (UV)hash); |
3967c732 |
1065 | do_sv_dump(level+1, file, elt, nest+1, maxnest, dumpops, pvlim); |
1066 | } |
1067 | hv_iterinit(hv); /* Return to status quo */ |
1068 | } |
1069 | break; |
1070 | case SVt_PVCV: |
1071 | if (SvPOK(sv)) |
cea2e8a9 |
1072 | Perl_dump_indent(aTHX_ level, file, " PROTOTYPE = \"%s\"\n", SvPV(sv,n_a)); |
3967c732 |
1073 | /* FALL THROUGH */ |
1074 | case SVt_PVFM: |
1075 | do_hv_dump(level, file, " COMP_STASH", CvSTASH(sv)); |
1076 | if (CvSTART(sv)) |
57def98f |
1077 | Perl_dump_indent(aTHX_ level, file, " START = 0x%"UVxf" ===> %"IVdf"\n", PTR2UV(CvSTART(sv)), (IV)CvSTART(sv)->op_seq); |
1078 | Perl_dump_indent(aTHX_ level, file, " ROOT = 0x%"UVxf"\n", PTR2UV(CvROOT(sv))); |
3967c732 |
1079 | if (CvROOT(sv) && dumpops) |
1080 | do_op_dump(level+1, file, CvROOT(sv)); |
57def98f |
1081 | Perl_dump_indent(aTHX_ level, file, " XSUB = 0x%"UVxf"\n", PTR2UV(CvXSUB(sv))); |
1082 | Perl_dump_indent(aTHX_ level, file, " XSUBANY = %"IVdf"\n", (IV)CvXSUBANY(sv).any_i32); |
3967c732 |
1083 | do_gvgv_dump(level, file, " GVGV::GV", CvGV(sv)); |
57843af0 |
1084 | Perl_dump_indent(aTHX_ level, file, " FILE = \"%s\"\n", CvFILE(sv)); |
57def98f |
1085 | Perl_dump_indent(aTHX_ level, file, " DEPTH = %"IVdf"\n", (IV)CvDEPTH(sv)); |
3967c732 |
1086 | #ifdef USE_THREADS |
07270b1a |
1087 | Perl_dump_indent(aTHX_ level, file, " MUTEXP = 0x%"UVxf"\n", PTR2UV(CvMUTEXP(sv))); |
1088 | Perl_dump_indent(aTHX_ level, file, " OWNER = 0x%"UVxf"\n", PTR2UV(CvOWNER(sv))); |
3967c732 |
1089 | #endif /* USE_THREADS */ |
57def98f |
1090 | Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%"UVxf"\n", CvFLAGS(sv)); |
3967c732 |
1091 | if (type == SVt_PVFM) |
57def98f |
1092 | Perl_dump_indent(aTHX_ level, file, " LINES = %"IVdf"\n", (IV)FmLINES(sv)); |
1093 | Perl_dump_indent(aTHX_ level, file, " PADLIST = 0x%"UVxf"\n", PTR2UV(CvPADLIST(sv))); |
3967c732 |
1094 | if (nest < maxnest && CvPADLIST(sv)) { |
1095 | AV* padlist = CvPADLIST(sv); |
1096 | AV* pad_name = (AV*)*av_fetch(padlist, 0, FALSE); |
1097 | AV* pad = (AV*)*av_fetch(padlist, 1, FALSE); |
1098 | SV** pname = AvARRAY(pad_name); |
1099 | SV** ppad = AvARRAY(pad); |
1100 | I32 ix; |
1101 | |
1102 | for (ix = 1; ix <= AvFILL(pad_name); ix++) { |
b9c39e73 |
1103 | if (SvPOK(pname[ix])) |
57def98f |
1104 | Perl_dump_indent(aTHX_ level, |
1105 | /* %5d below is enough whitespace. */ |
cf2093f6 |
1106 | file, |
57def98f |
1107 | "%5d. 0x%"UVxf" (%s\"%s\" %"IVdf"-%"IVdf")\n", |
1108 | ix, PTR2UV(ppad[ix]), |
cf2093f6 |
1109 | SvFAKE(pname[ix]) ? "FAKE " : "", |
1110 | SvPVX(pname[ix]), |
1111 | (IV)SvNVX(pname[ix]), |
1112 | (IV)SvIVX(pname[ix])); |
3967c732 |
1113 | } |
1114 | } |
1115 | { |
1116 | CV *outside = CvOUTSIDE(sv); |
57def98f |
1117 | Perl_dump_indent(aTHX_ level, file, " OUTSIDE = 0x%"UVxf" (%s)\n", |
1118 | PTR2UV(outside), |
cf2093f6 |
1119 | (!outside ? "null" |
1120 | : CvANON(outside) ? "ANON" |
1121 | : (outside == PL_main_cv) ? "MAIN" |
1122 | : CvUNIQUE(outside) ? "UNIQUE" |
1123 | : CvGV(outside) ? GvNAME(CvGV(outside)) : "UNDEFINED")); |
3967c732 |
1124 | } |
1125 | if (nest < maxnest && (CvCLONE(sv) || CvCLONED(sv))) |
1126 | do_sv_dump(level+1, file, (SV*)CvOUTSIDE(sv), nest+1, maxnest, dumpops, pvlim); |
1127 | break; |
1128 | case SVt_PVGV: |
cea2e8a9 |
1129 | Perl_dump_indent(aTHX_ level, file, " NAME = \"%s\"\n", GvNAME(sv)); |
57def98f |
1130 | Perl_dump_indent(aTHX_ level, file, " NAMELEN = %"IVdf"\n", (IV)GvNAMELEN(sv)); |
3967c732 |
1131 | do_hv_dump (level, file, " GvSTASH", GvSTASH(sv)); |
57def98f |
1132 | Perl_dump_indent(aTHX_ level, file, " GP = 0x%"UVxf"\n", PTR2UV(GvGP(sv))); |
1133 | Perl_dump_indent(aTHX_ level, file, " SV = 0x%"UVxf"\n", PTR2UV(GvSV(sv))); |
1134 | Perl_dump_indent(aTHX_ level, file, " REFCNT = %"IVdf"\n", (IV)GvREFCNT(sv)); |
1135 | Perl_dump_indent(aTHX_ level, file, " IO = 0x%"UVxf"\n", PTR2UV(GvIOp(sv))); |
1136 | Perl_dump_indent(aTHX_ level, file, " FORM = 0x%"UVxf" \n", PTR2UV(GvFORM(sv))); |
1137 | Perl_dump_indent(aTHX_ level, file, " AV = 0x%"UVxf"\n", PTR2UV(GvAV(sv))); |
1138 | Perl_dump_indent(aTHX_ level, file, " HV = 0x%"UVxf"\n", PTR2UV(GvHV(sv))); |
1139 | Perl_dump_indent(aTHX_ level, file, " CV = 0x%"UVxf"\n", PTR2UV(GvCV(sv))); |
1140 | Perl_dump_indent(aTHX_ level, file, " CVGEN = 0x%"UVxf"\n", (UV)GvCVGEN(sv)); |
f4c556ac |
1141 | Perl_dump_indent(aTHX_ level, file, " GPFLAGS = 0x%"UVxf"\n", (UV)GvGPFLAGS(sv)); |
57def98f |
1142 | Perl_dump_indent(aTHX_ level, file, " LINE = %"IVdf"\n", (IV)GvLINE(sv)); |
b195d487 |
1143 | Perl_dump_indent(aTHX_ level, file, " FILE = \"%s\"\n", GvFILE(sv)); |
57def98f |
1144 | Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%"UVxf"\n", (UV)GvFLAGS(sv)); |
3967c732 |
1145 | do_gv_dump (level, file, " EGV", GvEGV(sv)); |
1146 | break; |
1147 | case SVt_PVIO: |
57def98f |
1148 | Perl_dump_indent(aTHX_ level, file, " IFP = 0x%"UVxf"\n", PTR2UV(IoIFP(sv))); |
1149 | Perl_dump_indent(aTHX_ level, file, " OFP = 0x%"UVxf"\n", PTR2UV(IoOFP(sv))); |
1150 | Perl_dump_indent(aTHX_ level, file, " DIRP = 0x%"UVxf"\n", PTR2UV(IoDIRP(sv))); |
1151 | Perl_dump_indent(aTHX_ level, file, " LINES = %"IVdf"\n", (IV)IoLINES(sv)); |
1152 | Perl_dump_indent(aTHX_ level, file, " PAGE = %"IVdf"\n", (IV)IoPAGE(sv)); |
1153 | Perl_dump_indent(aTHX_ level, file, " PAGE_LEN = %"IVdf"\n", (IV)IoPAGE_LEN(sv)); |
1154 | Perl_dump_indent(aTHX_ level, file, " LINES_LEFT = %"IVdf"\n", (IV)IoLINES_LEFT(sv)); |
27533608 |
1155 | if (IoTOP_NAME(sv)) |
cea2e8a9 |
1156 | Perl_dump_indent(aTHX_ level, file, " TOP_NAME = \"%s\"\n", IoTOP_NAME(sv)); |
3967c732 |
1157 | do_gv_dump (level, file, " TOP_GV", IoTOP_GV(sv)); |
27533608 |
1158 | if (IoFMT_NAME(sv)) |
cea2e8a9 |
1159 | Perl_dump_indent(aTHX_ level, file, " FMT_NAME = \"%s\"\n", IoFMT_NAME(sv)); |
3967c732 |
1160 | do_gv_dump (level, file, " FMT_GV", IoFMT_GV(sv)); |
27533608 |
1161 | if (IoBOTTOM_NAME(sv)) |
cea2e8a9 |
1162 | Perl_dump_indent(aTHX_ level, file, " BOTTOM_NAME = \"%s\"\n", IoBOTTOM_NAME(sv)); |
3967c732 |
1163 | do_gv_dump (level, file, " BOTTOM_GV", IoBOTTOM_GV(sv)); |
57def98f |
1164 | Perl_dump_indent(aTHX_ level, file, " SUBPROCESS = %"IVdf"\n", (IV)IoSUBPROCESS(sv)); |
27533608 |
1165 | if (isPRINT(IoTYPE(sv))) |
cea2e8a9 |
1166 | Perl_dump_indent(aTHX_ level, file, " TYPE = '%c'\n", IoTYPE(sv)); |
27533608 |
1167 | else |
cea2e8a9 |
1168 | Perl_dump_indent(aTHX_ level, file, " TYPE = '\\%o'\n", IoTYPE(sv)); |
57def98f |
1169 | Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%"UVxf"\n", (UV)IoFLAGS(sv)); |
3967c732 |
1170 | break; |
1171 | } |
1172 | } |
1173 | |
1174 | void |
864dbfa3 |
1175 | Perl_sv_dump(pTHX_ SV *sv) |
3967c732 |
1176 | { |
1177 | do_sv_dump(0, Perl_debug_log, sv, 0, 0, 0, 0); |
8d063cd8 |
1178 | } |