| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include <math.h> // for isnan. | 5 #include <math.h> // for isnan. |
| 6 #include <setjmp.h> | 6 #include <setjmp.h> |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #if defined(TARGET_ARCH_MIPS) | 10 #if defined(TARGET_ARCH_MIPS) |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 #undef STR | 461 #undef STR |
| 462 #undef XSTR | 462 #undef XSTR |
| 463 } | 463 } |
| 464 | 464 |
| 465 | 465 |
| 466 char* SimulatorDebugger::ReadLine(const char* prompt) { | 466 char* SimulatorDebugger::ReadLine(const char* prompt) { |
| 467 char* result = NULL; | 467 char* result = NULL; |
| 468 char line_buf[256]; | 468 char line_buf[256]; |
| 469 int offset = 0; | 469 int offset = 0; |
| 470 bool keep_going = true; | 470 bool keep_going = true; |
| 471 fprintf(stdout, "%s", prompt); | 471 OS::Print("%s", prompt); |
| 472 fflush(stdout); | |
| 473 while (keep_going) { | 472 while (keep_going) { |
| 474 if (fgets(line_buf, sizeof(line_buf), stdin) == NULL) { | 473 if (fgets(line_buf, sizeof(line_buf), stdin) == NULL) { |
| 475 // fgets got an error. Just give up. | 474 // fgets got an error. Just give up. |
| 476 if (result != NULL) { | 475 if (result != NULL) { |
| 477 delete[] result; | 476 delete[] result; |
| 478 } | 477 } |
| 479 return NULL; | 478 return NULL; |
| 480 } | 479 } |
| 481 int len = strlen(line_buf); | 480 int len = strlen(line_buf); |
| 482 if (len > 1 && | 481 if (len > 1 && |
| (...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1878 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 1877 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
| 1879 } | 1878 } |
| 1880 buf->Longjmp(); | 1879 buf->Longjmp(); |
| 1881 } | 1880 } |
| 1882 | 1881 |
| 1883 } // namespace dart | 1882 } // namespace dart |
| 1884 | 1883 |
| 1885 #endif // !defined(HOST_ARCH_MIPS) | 1884 #endif // !defined(HOST_ARCH_MIPS) |
| 1886 | 1885 |
| 1887 #endif // defined TARGET_ARCH_MIPS | 1886 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |