summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2015-07-02 17:22:09 -0400
committerTony Cook <tony@develop-help.com>2015-07-08 15:47:00 +1000
commitbb3b7d7b82b9d2ba93dc99ecf064f0c701ef2c59 (patch)
tree98abda4831ccbdc83807e17976a0113fb3797bcf
parentc85f23b236fa90fedd9cceed2da12481184d5bbf (diff)
downloadperl-bb3b7d7b82b9d2ba93dc99ecf064f0c701ef2c59.tar.gz
all SV inheriter types have DEBUG_LEAKING_SCALARS data, so always show it
I noticed AV *s in my C debugger didn't the sv_debug_* members, but if I casted the AV * to a SV * in my C debugger using a expession in my watch tab, all the info was there. Put the DEBUG_LEAKING_SCALARS in _SV_HEAD_UNION so the sv_debug_* members appear everywhere (CV/HV/AV/etc), not just for SVs.
-rw-r--r--sv.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/sv.h b/sv.h
index 49cafe47bf..0076ddd76c 100644
--- a/sv.h
+++ b/sv.h
@@ -212,20 +212,24 @@ typedef struct hek HEK;
HE** svu_hash; \
GP* svu_gp; \
PerlIO *svu_fp; \
- } sv_u
+ } sv_u \
+ _SV_HEAD_DEBUG
+#ifdef DEBUG_LEAKING_SCALARS
+#define _SV_HEAD_DEBUG ;\
+ PERL_BITFIELD32 sv_debug_optype:9; /* the type of OP that allocated us */ \
+ PERL_BITFIELD32 sv_debug_inpad:1; /* was allocated in a pad for an OP */ \
+ PERL_BITFIELD32 sv_debug_line:16; /* the line where we were allocated */ \
+ UV sv_debug_serial; /* serial number of sv allocation */ \
+ char * sv_debug_file; /* the file where we were allocated */ \
+ SV * sv_debug_parent /* what we were cloned from (ithreads)*/
+#else
+#define _SV_HEAD_DEBUG
+#endif
struct STRUCT_SV { /* struct sv { */
_SV_HEAD(void*);
_SV_HEAD_UNION;
-#ifdef DEBUG_LEAKING_SCALARS
- PERL_BITFIELD32 sv_debug_optype:9; /* the type of OP that allocated us */
- PERL_BITFIELD32 sv_debug_inpad:1; /* was allocated in a pad for an OP */
- PERL_BITFIELD32 sv_debug_line:16; /* the line where we were allocated */
- UV sv_debug_serial; /* serial number of sv allocation */
- char * sv_debug_file; /* the file where we were allocated */
- SV * sv_debug_parent; /* what we were cloned from (ithreads)*/
-#endif
};
struct gv {