Branch: Tag:

2003-09-24

2003-09-24 00:57:58 by Martin Stjernholm <mast@lysator.liu.se>

Improved handling of frames in locate_references a little more.

Rev: src/gc.c:1.234
Rev: src/interpret.c:1.331

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: gc.c,v 1.233 2003/09/23 22:27:50 mast Exp $ + || $Id: gc.c,v 1.234 2003/09/24 00:57:58 mast Exp $   */      #include "global.h"
33:      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.233 2003/09/23 22:27:50 mast Exp $"); + RCSID("$Id: gc.c,v 1.234 2003/09/24 00:57:58 mast Exp $");      int gc_enabled = 1;   
600:    }    break;    } +  +  case T_PIKE_FRAME: { +  struct pike_frame *f = (struct pike_frame *) descblock; +  if (f->locals) { /* Paranoia. */ +  ptrdiff_t pos = (struct svalue *) location - f->locals; +  if (pos >= 0) { +  if (pos < f->num_args) +  fprintf (stderr, "%*s **In argument %"PRINTPTRDIFFT"d\n", +  indent, "", pos); +  else +  fprintf (stderr, "%*s **At position %"PRINTPTRDIFFT"d among locals\n", +  indent, "", pos - f->num_args);    } -  +  } +  break; +  } +  }       if(memblock && depth>0)    describe_something(memblock,type,indent+2,depth-1,flags | DESCRIBE_MEM,inblock);