2020-03-31 11:48:38 +00:00
|
|
|
#include <string.h>
|
2020-04-02 04:06:31 +00:00
|
|
|
#include "debugger/views/funcview.h"
|
2020-03-31 11:48:38 +00:00
|
|
|
|
|
|
|
@implementation FuncView
|
|
|
|
|
|
|
|
-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;
|
|
|
|
}
|
|
|
|
|
|
|
|
+(FuncView *)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 ("FIXME [%x]", data[0]);
|
2020-04-01 10:57:24 +00:00
|
|
|
[self mvprintf:{0, 0}, "%*.*s", xlen, xlen, val];
|
2020-03-31 11:48:38 +00:00
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|