#include #include "debugger/voidview.h" @implementation VoidView -initWithType:(qfot_type_t *)type at:(unsigned)offset in:(void *)data { if (!(self = [super initWithType:type])) { return nil; } self.data = (unsigned *) (data + offset); return self; } +(VoidView *)withType:(qfot_type_t *)type at:(unsigned)offset in:(void *)data { return [[[self alloc] initWithType:type at:offset in:data] autorelease]; } -draw { [super draw]; string val = sprintf ("%08x %08x %08x %08x", data[0], data[1], data[2], data[3]); [self mvaddstr:{0, 0}, str_mid (val, 0, xlen)]; return self; } @end