Changeset 553


Ignore:
Timestamp:
Apr 29, 2011, 1:39:28 AM (6 years ago)
Author:
Sam Hocevar
Message:

lisp: remove old debug code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/lisp/lisp_gc.cpp

    r524 r553  
    4242static uint8_t *cstart, *cend, *collected_start, *collected_end;
    4343
    44 static void dump_memory(void *mem, int before, int after)
    45 {
    46   uint8_t *p = (uint8_t *)mem;
    47 
    48   fprintf(stderr, "dumping memory around %p:\n", p);
    49   for (int i = -before; i < after; i++)
    50   {
    51     if (!(i & 15))
    52       fprintf(stderr, "%p: ", p + i);
    53     fprintf(stderr, "%c%02x%c", i ? ' ' : '[', p[i], i ? ' ' : ']');
    54     if (!((i + 1) & 15))
    55       fprintf(stderr, "\n");
    56   }
    57 }
    58 
    5944void register_pointer(void **addr)
    6045{
     
    131116  if (((uint8_t *)x) >= cstart && ((uint8_t *)x) < cend)
    132117  {
    133     //dump_memory(x, 32, 48);
    134118    switch (item_type(x))
    135119    {
     
    193177        break;
    194178      default:
    195         dump_memory(x, 8, 196);
    196         //*(char *)NULL = 0;
    197         lbreak("shouldn't happen. collecting bad object 0x%x\n",
    198                item_type(x));
     179        lbreak("shouldn't happen. collecting bad object 0x%x\n", item_type(x));
    199180        break;
    200181    }
     
    266247  collected_end = new_space + space_size[GC_SPACE];
    267248
    268 //dump_memory((char *)lsym_root->name, 128, 196);
    269 //dump_memory((char *)0xb6782025, 32, 48);
    270249  collect_symbols(LSymbol::root);
    271250  collect_stacks();
Note: See TracChangeset for help on using the changeset viewer.