sv_catpv(t, "(");
unref++;
}
+ else if (DEBUG_R_TEST && SvREFCNT(sv) > 1) {
+ sv_catpvf(t, "<%u>", SvREFCNT(sv));
+ }
+
+
if (SvROK(sv)) {
sv_catpv(t, "\\");
if (SvCUR(t) + unref > 10) {
#ifdef DEBUGGING
forbid_setid("-D");
if (isALPHA(s[1])) {
- static char debopts[] = "psltocPmfrxuLHXDST";
+ /* if adding extra options, remember to update DEBUG_MASK */
+ static char debopts[] = "psltocPmfrxuLHXDSTR";
char *d;
for (s++; *s && (d = strchr(debopts,*s)); s++)
#define DEBUG_D_FLAG 0x00008000 /* 32768 */
#define DEBUG_S_FLAG 0x00010000 /* 65536 */
#define DEBUG_T_FLAG 0x00020000 /* 131072 */
-#define DEBUG_MASK 0x0003FFFF /* mask of all the standard flags */
+#define DEBUG_R_FLAG 0x00040000 /* 262144 */
+#define DEBUG_MASK 0x0007FFFF /* mask of all the standard flags */
#define DEBUG_DB_RECURSE_FLAG 0x40000000
#define DEBUG_TOP_FLAG 0x80000000 /* XXX what's this for ??? */
# define DEBUG_D_TEST (PL_debug & DEBUG_D_FLAG)
# define DEBUG_S_TEST (PL_debug & DEBUG_S_FLAG)
# define DEBUG_T_TEST (PL_debug & DEBUG_T_FLAG)
+# define DEBUG_R_TEST (PL_debug & DEBUG_R_FLAG)
# define DEB(a) a
# define DEBUG(a) if (PL_debug) a
# endif
# define DEBUG_T(a) if (DEBUG_T_TEST) a
+# define DEBUG_R(a) if (DEBUG_R_TEST) a
#else /* DEBUGGING */
# define DEBUG_D_TEST (0)
# define DEBUG_S_TEST (0)
# define DEBUG_T_TEST (0)
+# define DEBUG_R_TEST (0)
# define DEB(a)
# define DEBUG(a)
# define DEBUG_D(a)
# define DEBUG_S(a)
# define DEBUG_T(a)
+# define DEBUG_R(a)
#endif /* DEBUGGING */
32768 D Cleaning up
65536 S Thread synchronization
131072 T Tokenising
+ 262144 R Include reference counts of dumped variables (eg when using -Ds)
All these flags require B<-DDEBUGGING> when you compile the Perl
executable. See the F<INSTALL> file in the Perl source distribution