void debuggerPrintBaseType(Type *t, u32 value, u32 location, LocationType type, int bitSize, int bitOffset)
static void debuggerPrintBaseType(Type *t, u32 value, u32 location, LocationType type, int bitSize, int bitOffset)
void debuggerPrintBaseType(Type *t, u32 value, u32 location,                           LocationType type,                           int bitSize, int bitOffset){  if(bitSize) {    if(bitOffset)      value >>= ((t->size*8)-bitOffset-bitSize);    value &= (1 << bitSize)-1;  } else {    if(t->size == 2)      value &= 0xFFFF;    else if(t->size == 1)      value &= 0xFF;  }  if(t->size == 8) {    u64 value = 0;    if(type == LOCATION_memory) {      value = debuggerReadMemory(location) |        ((u64)debuggerReadMemory(location+4)<<32);    } else if(type == LOCATION_register) {      value = reg[location].I | ((u64)reg[location+1].I << 32);    }    switch(t->encoding) {    case DW_ATE_signed:      switch(debuggerRadix) {      case 0:        printf("%lld", value);        break;      case 1:        printf("0x%llx", value);        break;      case 2:        printf("0%llo", value);        break;      }      break;    case DW_ATE_unsigned:      switch(debuggerRadix) {      case 0:        printf("%llu", value);        break;      case 1:        printf("0x%llx", value);        break;      case 2:        printf("0%llo", value);        break;      }      break;    default:      printf("Unknowing 64-bit encoding\n");    }    return;  }    switch(t->encoding) {  case DW_ATE_boolean:    if(value)      printf("true");    else      printf("false");    break;  case DW_ATE_signed:    switch(debuggerRadix) {    case 0:      printf("%d", value);      break;    case 1:      printf("0x%x", value);      break;    case 2:      printf("0%o", value);      break;    }    break;  case DW_ATE_unsigned:  case DW_ATE_unsigned_char:    switch(debuggerRadix) {    case 0:      printf("%u", value);      break;    case 1:      printf("0x%x", value);      break;    case 2:      printf("0%o", value);      break;    }    break;  default:    printf("UNKNOWN BASE %d %08x", t->encoding, value);  }}