Branch: Tag:

2000-09-30

2000-09-30 23:31:42 by Per Hedbor <ph@opera.com>

More debug

Rev: src/las.c:1.219

5:   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.218 2000/09/30 19:19:48 grubba Exp $"); + RCSID("$Id: las.c,v 1.219 2000/09/30 23:31:42 per Exp $");      #include "language.h"   #include "interpret.h"
370: Inside #if defined(SHARED_NODES)
     static void add_node(node *n)   { -  size_t hval = n->hash % node_hash.size; +  size_t hval = (n->hash % node_hash.size);      #ifdef PIKE_DEBUG    node *probe = node_hash.table[hval];    while(probe) { -  if (probe == n) { -  fatal("add_node(%p): Node already added!\n"); +  if (probe == n) +  { +  fprintf(stderr, "add_node(%p == %p): Node already added!\n", probe, n); +  fprintf( stderr, " %d <-> %d\n", hval, (n->hash % node_hash.size) ); +  probe = node_hash.table[hval]; +  while( probe ) +  { +  fprintf(stderr, " %p\n", probe); +  probe = probe->next;    } -  +  fatal( "Node already added!\n" ); +  }    probe = probe->next;    }   #endif /* PIKE_DEBUG */