pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:151: Inside #if defined(DEBUG)
      for(o=first_object;o;o=o->next)    if(o==(struct object *)something)    return T_OBJECT;       for(p=first_program;p;p=p->next)    if(p==(struct program *)something)    return T_PROGRAM;       for(m=first_mapping;m;m=m->next) -  if(m==(struct program *)something) -  return T_MAPPING; -  -  for(m=first_mapping;m;m=m->next) +     if(m==(struct mapping *)something)    return T_MAPPING;       for(mu=first_multiset;mu;mu=mu->next)    if(mu==(struct multiset *)something)    return T_MULTISET;       if(safe_debug_findstring((struct pike_string *)something))    return T_STRING;   
pike.git/src/gc.c:181: Inside #if defined(DEBUG)
  static int found_in_type=0;   void *gc_svalue_location=0;      void describe_location(void *memblock, TYPE_T type, void *location)   {    if(!location) return;    fprintf(stderr,"**Location of (short) svalue: %p\n",location);       switch(type)    { +  case T_PROGRAM: +  { +  struct program *p=(struct program *)memblock; +  char *ptr=(char *)location; +  if(ptr >= (char *)p->inherits && ptr<(char*)(p->inherits+p->num_inherits)) +  fprintf(stderr,"**In inherit block.\n"); +  +  if(ptr >= (char *)p->strings && ptr<(char*)(p->strings+p->num_strings)) +  fprintf(stderr,"**In string block.\n"); +  +  if(ptr >= (char *)p->identifiers && ptr<(char*)(p->identifiers+p->num_identifiers)) +  fprintf(stderr,"**In identifier block.\n"); +  +  return; +  } +     case T_OBJECT:    {    struct object *o=(struct object *)memblock;    if(o->prog)    {    INT32 e,d;    for(e=0;e<(INT32)o->prog->num_inherits;e++)    {    struct inherit tmp=o->prog->inherits[e];    char *base=o->storage + tmp.storage_offset;
pike.git/src/gc.c:253: Inside #if defined(DEBUG)
     void debug_gc_check_short_svalue(union anything *u, TYPE_T type, TYPE_T t, void *data)   {    found_in=data;    found_in_type=t;    gc_check_short_svalue(u,type);    found_in_type=T_UNKNOWN;    found_in=0;   }    +  + int debug_gc_check(void *x, TYPE_T t, void *data) + { +  int ret; +  found_in=data; +  found_in_type=t; +  ret=gc_check(x); +  found_in_type=T_UNKNOWN; +  found_in=0; +  return ret; + } +    void describe_something(void *a, int t)   {    struct program *p=(struct program *)a;    if(!a) return;    if(t==-1)    {    fprintf(stderr,"**Location description: %s\n",(char *)a);    return;    }