Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(769)

Side by Side Diff: runtime/vm/os_linux.cc

Issue 1156053006: - Determine whether the simulator is being used in globals.h (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/os_android.cc ('k') | runtime/vm/os_macos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_OS_LINUX) 6 #if defined(TARGET_OS_LINUX)
7 7
8 #include "vm/os.h" 8 #include "vm/os.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 // Copy remainder into requested and repeat. 501 // Copy remainder into requested and repeat.
502 req = rem; 502 req = rem;
503 } 503 }
504 } 504 }
505 505
506 506
507 // TODO(regis, iposva): When this function is no longer called from the 507 // TODO(regis, iposva): When this function is no longer called from the
508 // CodeImmutability test in object_test.cc, it will be called only from the 508 // CodeImmutability test in object_test.cc, it will be called only from the
509 // simulator, which means that only the Intel implementation is needed. 509 // simulator, which means that only the Intel implementation is needed.
510 void OS::DebugBreak() { 510 void OS::DebugBreak() {
511 #if defined(HOST_ARCH_X64) || defined(HOST_ARCH_IA32) 511 __builtin_trap();
512 asm("int $3");
513 #elif defined(HOST_ARCH_ARM) && !defined(__THUMBEL__)
514 asm("svc #0x9f0001"); // __ARM_NR_breakpoint
515 #elif defined(HOST_ARCH_ARM) && defined(__THUMBEL__)
516 UNIMPLEMENTED();
517 #elif defined(HOST_ARCH_MIPS) || defined(HOST_ARCH_ARM64)
518 UNIMPLEMENTED();
519 #else
520 #error Unsupported architecture.
521 #endif
522 } 512 }
523 513
524 514
525 char* OS::StrNDup(const char* s, intptr_t n) { 515 char* OS::StrNDup(const char* s, intptr_t n) {
526 return strndup(s, n); 516 return strndup(s, n);
527 } 517 }
528 518
529 519
530 void OS::Print(const char* format, ...) { 520 void OS::Print(const char* format, ...) {
531 va_list args; 521 va_list args;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 } 611 }
622 612
623 613
624 void OS::Exit(int code) { 614 void OS::Exit(int code) {
625 exit(code); 615 exit(code);
626 } 616 }
627 617
628 } // namespace dart 618 } // namespace dart
629 619
630 #endif // defined(TARGET_OS_LINUX) 620 #endif // defined(TARGET_OS_LINUX)
OLDNEW
« no previous file with comments | « runtime/vm/os_android.cc ('k') | runtime/vm/os_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698