| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 void Simulator::PrintProcessorState() { | 1151 void Simulator::PrintProcessorState() { |
| 1152 PrintSystemRegisters(); | 1152 PrintSystemRegisters(); |
| 1153 PrintRegisters(); | 1153 PrintRegisters(); |
| 1154 PrintFPRegisters(); | 1154 PrintFPRegisters(); |
| 1155 } | 1155 } |
| 1156 | 1156 |
| 1157 | 1157 |
| 1158 void Simulator::PrintWrite(uint8_t* address, | 1158 void Simulator::PrintWrite(uint8_t* address, |
| 1159 uint64_t value, | 1159 uint64_t value, |
| 1160 unsigned num_bytes) { | 1160 unsigned num_bytes) { |
| 1161 // Define some color codes to use for memory logging. | |
| 1162 const char* const clr_normal = (FLAG_log_colour) ? ("\033[m") | |
| 1163 : (""); | |
| 1164 const char* const clr_memory_value = (FLAG_log_colour) ? ("\033[1;32m") | |
| 1165 : (""); | |
| 1166 const char* const clr_memory_address = (FLAG_log_colour) ? ("\033[32m") | |
| 1167 : (""); | |
| 1168 | |
| 1169 // The template is "# value -> address". The template is not directly used | 1161 // The template is "# value -> address". The template is not directly used |
| 1170 // in the printf since compilers tend to struggle with the parametrized | 1162 // in the printf since compilers tend to struggle with the parametrized |
| 1171 // width (%0*). | 1163 // width (%0*). |
| 1172 const char* format = "# %s0x%0*" PRIx64 "%s -> %s0x%016" PRIx64 "%s\n"; | 1164 const char* format = "# %s0x%0*" PRIx64 "%s -> %s0x%016" PRIx64 "%s\n"; |
| 1173 fprintf(stream_, | 1165 fprintf(stream_, |
| 1174 format, | 1166 format, |
| 1175 clr_memory_value, | 1167 clr_memory_value, |
| 1176 num_bytes * 2, // The width in hexa characters. | 1168 num_bytes * 2, // The width in hexa characters. |
| 1177 value, | 1169 value, |
| 1178 clr_normal, | 1170 clr_normal, |
| (...skipping 2466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3645 default: | 3637 default: |
| 3646 UNIMPLEMENTED(); | 3638 UNIMPLEMENTED(); |
| 3647 } | 3639 } |
| 3648 } | 3640 } |
| 3649 | 3641 |
| 3650 #endif // USE_SIMULATOR | 3642 #endif // USE_SIMULATOR |
| 3651 | 3643 |
| 3652 } } // namespace v8::internal | 3644 } } // namespace v8::internal |
| 3653 | 3645 |
| 3654 #endif // V8_TARGET_ARCH_A64 | 3646 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |