pike.git / src / modules / _Debug / debug.cmod

version» Context lines:

pike.git/src/modules/_Debug/debug.cmod:5:   */      #include "module.h"   #include "pike_error.h"   #include "interpret.h"   #include "pike_embed.h"   #include "module_support.h"   #include "builtin_functions.h"   #include "gc.h"   #include "opcodes.h" + #include "bignum.h"      DECLARATIONS      /*! @module Debug    */      /*! @decl int(0..) map_all_objects(function(object:void) cb)    *!    *! Call cb for all objects that currently exist. The callback will    *! not be called with destructed objects as it's argument.
pike.git/src/modules/_Debug/debug.cmod:582:    if(p->flags & PROGRAM_FINISHED) {    for (i = 0; i < p->num_identifier_references; i++) {    struct reference *ref = p->identifier_references + i;    struct identifier *id = ID_FROM_PTR(p, ref);       if ((id->identifier_flags & IDENTIFIER_TYPE_MASK)    == IDENTIFIER_PIKE_FUNCTION    && !ref->inherit_offset) {    PIKE_OPCODE_T *pc = p->program + id->func.offset;    struct svalue sv; -  SET_SVAL(sv, PIKE_T_INT, NUMBER_NUMBER, integer, PTR_TO_INT(pc)); +  +  ulongest_to_svalue_no_free(&sv, (UINT64)PTR_TO_INT(pc)); +     mapping_string_insert(m, id->name, &sv); -  +  free_svalue(&sv);    }    }       {    struct svalue key, value;       SET_SVAL(key, PIKE_T_INT, NUMBER_NUMBER, integer, 0);    SET_SVAL(value, PIKE_T_INT, NUMBER_NUMBER, integer,    p->num_program * sizeof(PIKE_OPCODE_T));    mapping_insert(m, &key, &value);