Home | History | Annotate | Download | only in a64

Lines Matching defs:Format

77 // Format: wn or xn with 0 <= n < 32 or a name in the aliases list.
102 // Format: sn or dn with 0 <= n < 32.
120 // Format: Alphanumeric string starting with a letter.
143 // Format: 0x... with up to 16 hexadecimal digits.
162 // Format: n.
178 // Format: .ln
205 template<typename T> class Format : public FormatToken {
207 Format(const char* fmt, char type_code) : fmt_(fmt), type_code_(type_code) {}
327 PrintCommand(Token* name, Token* target, FormatToken* format)
328 : DebugCommand(name), target_(target), format_(format) {}
335 FormatToken* format() { return format_; }
354 FormatToken* format,
356 : DebugCommand(name), target_(target), format_(format), count_(count) {}
364 FormatToken* format() { return format_; }
428 const char* PrintCommand::kArguments = "<entity>[.format]";
430 " Print the given entity according to the given format.\n"
431 " The format parameter only affects individual registers; it is ignored\n"
442 const char* ExamineCommand::kArguments = "<addr>[.format] [n = 10]";
445 " the given [.format].\n"
447 " Format is made of a type letter: 'x' (hexadecimal), 's' (signed), 'u'\n"
451 " hexadecimal format."
572 const FormatToken* format,
579 int size = format->SizeOf();
592 format->PrintData(&data);
601 const FormatToken* format) {
603 const uint64_t format_size = format->SizeOf() * 8;
615 format->PrintData(&data);
623 const FormatToken* format) {
625 const uint64_t format_size = format->SizeOf() * 8;
640 format->PrintData(&data);
1092 if (length == 1) return new Format<uint32_t>("%08" PRIx32, 'i');
1118 case 8: return new Format<uint8_t>("%02" PRIx8, 'x');
1119 case 16: return new Format<uint16_t>("%04" PRIx16, 'x');
1120 case 32: return new Format<uint32_t>("%08" PRIx32, 'x');
1121 case 64: return new Format<uint64_t>("%016" PRIx64, 'x');
1126 case 8: return new Format<int8_t>("%4" PRId8, 's');
1127 case 16: return new Format<int16_t>("%6" PRId16, 's');
1128 case 32: return new Format<int32_t>("%11" PRId32, 's');
1129 case 64: return new Format<int64_t>("%20" PRId64, 's');
1134 case 8: return new Format<uint8_t>("%3" PRIu8, 'u');
1135 case 16: return new Format<uint16_t>("%5" PRIu16, 'u');
1136 case 32: return new Format<uint32_t>("%10" PRIu32, 'u');
1137 case 64: return new Format<uint64_t>("%20" PRIu64, 'u');
1142 case 32: return new Format<float>("%13g", 'f');
1143 case 64: return new Format<double>("%13g", 'f');
1154 void Format<T>::Print(FILE* out) const {
1156 fprintf(out, "[Format %c%u - %s]", type_code_, size, fmt_);
1189 // 'Token.format'.
1190 Token* format = FormatToken::Tokenize(dot + 1);
1191 if (format != NULL) {
1194 args.push_back(format);
1196 // Error while parsing the format, push the UnknownToken so an error
1348 FormatToken* format = new Format<uint32_t>("%08" PRIx32, 'i');
1349 return new ExamineCommand(args[0], target, format, count);
1356 if (format() != NULL) format()->Print(out);
1381 FormatToken* format_tok = format();
1385 printf(" ** unsupported format: instructions **\n");
1419 FormatToken* format = NULL;
1428 // If the target is an identifier there must be no format. This is checked
1435 case 4: format = new Format<uint32_t>("%08" PRIx32, 'x'); break;
1436 case 8: format = new Format<uint64_t>("%016" PRIx64, 'x'); break;
1441 case 4: format = new Format<float>("%8g", 'f'); break;
1442 case 8: format = new Format<double>("%8g", 'f'); break;
1451 "format is only allowed with registers");
1456 return new InvalidCommand(args, 2, "expects format");
1458 format = FormatToken::Cast(second);
1460 if (format->SizeOf() > target_size) {
1461 return new InvalidCommand(args, 2, "format too wide");
1470 return new PrintCommand(args[0], target, format);
1479 if (format()->type_code() == 'i') {
1482 debugger->PrintMemory(address, format(), amount);
1491 format()->Print(out);
1506 FormatToken* format = NULL;
1511 format = new Format<uint64_t>("%016" PRIx64, 'x');
1515 case 3: { // mem addr.format [10]
1519 format = FormatToken::Cast(second);
1523 format = new Format<uint64_t>("%016" PRIx64, 'x');
1526 return new InvalidCommand(args, 2, "expects format or integer");
1531 case 4: { // mem addr.format n
1535 return new InvalidCommand(args, -1, "expects addr[.format] [n]");
1537 format = FormatToken::Cast(second);
1545 return new ExamineCommand(args[0], target, format, count);