2003-01-29
2003-01-29 15:55:26 by Martin Stjernholm <mast@lysator.liu.se>
-
0bc69416c77d546e8489c69bf2a3ec5d7ca8e56a
(24 lines)
(+14/-10)
[
Show
| Annotate
]
Branch: 7.2
Enabled some consistency checks in the gc when compiled without rtldebug
(only activated on debug level 1 or higher). Always define _verify_internals
to be able to use this. Made it possible to turn on trace messages for the
gc only with trace(1,"gc").
Rev: src/array.c:1.108
Rev: src/builtin.cmod:1.31
Rev: src/builtin_functions.c:1.367
Rev: src/gc.c:1.152
Rev: src/gc.h:1.76
Rev: src/mapping.c:1.125
Rev: src/multiset.c:1.34
Rev: src/object.c:1.165
Rev: src/program.c:1.316
5:
\*/
/**/
#include "global.h"
- RCSID("$Id: builtin_functions.c,v 1.366 2002/10/15 14:57:38 grubba Exp $");
+ RCSID("$Id: builtin_functions.c,v 1.367 2003/01/29 15:55:25 mast Exp $");
#include "interpret.h"
#include "svalue.h"
#include "pike_macros.h"
3818:
push_array(a);
}
-
- #ifdef PIKE_DEBUG
+
/*! @decl void _verify_internals()
*!
*! Perform sanity checks.
3829: Inside #if defined(PIKE_DEBUG)
*! It is only used for debugging.
*!
*! @note
- *! This function is only available if the Pike runtime has been compiled
- *! with RTL debug.
+ *! This function does a much more thorough check if the Pike runtime
+ *! has been compiled with RTL debug.
*/
PMOD_EXPORT void f__verify_internals(INT32 args)
{
3838: Inside #if defined(PIKE_DEBUG)
CHECK_SECURITY_OR_ERROR(SECURITY_BIT_SECURITY,
("_verify_internals: permission denied.\n"));
d_flag=0x7fffffff;
- do_debug();
- d_flag=tmp;
+ #ifdef PIKE_DEBUG
+ do_debug(); /* Calls do_gc() since d_flag > 3. */
+ #else
do_gc();
-
+ #endif
+ d_flag=tmp;
pop_n_elems(args);
}
-
+ #ifdef PIKE_DEBUG
+
/*! @decl int _debug(int(0..) level)
*!
*! Set the run-time debug level.
3944: Inside #if defined(PIKE_DEBUG) and #if defined(YYDEBUG)
}
#endif /* YYDEBUG */
- #endif
+ #endif /* PIKE_DEBUG */
#if defined(HAVE_LOCALTIME) || defined(HAVE_GMTIME)
static void encode_struct_tm(struct tm *tm)
7733:
tFunc(tOr(tObj,tMapping),tInt)),OPT_TRY_OPTIMIZE);
#endif
- #ifdef PIKE_DEBUG
-
+
/* function(:void) */
ADD_EFUN("_verify_internals",f__verify_internals,
tFunc(tNone,tVoid),OPT_SIDE_EFFECT|OPT_EXTERNAL_DEPEND);
-
+ #ifdef PIKE_DEBUG
+
/* function(int:int) */
ADD_EFUN("_debug",f__debug,
tFunc(tInt,tInt),OPT_SIDE_EFFECT|OPT_EXTERNAL_DEPEND);