Branch: Tag:

1998-01-20

1998-01-20 00:43:14 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

more debug in gc()

Rev: src/gc.c:1.26
Rev: src/gc.h:1.15
Rev: src/program.c:1.51

158: Inside #if defined(DEBUG)
   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;   
188: Inside #if defined(DEBUG)
      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;
260: Inside #if defined(DEBUG)
   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;