OLD | NEW |
---|---|
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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
500 ASSERT(errno == EINTR); | 500 ASSERT(errno == EINTR); |
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 void OS::DebugBreak() { | 507 void OS::DebugBreak() { |
508 #if defined(HOST_ARCH_X64) || defined(HOST_ARCH_IA32) | 508 #if defined(HOST_ARCH_X64) || defined(HOST_ARCH_IA32) |
509 asm("int $3"); | 509 asm("int $3"); |
510 #elif defined(HOST_ARCH_ARM) | 510 #elif defined(HOST_ARCH_ARM) && !defined(__THUMBEL__) |
511 asm("svc #0x9f0001"); // __ARM_NR_breakpoint | 511 asm("svc #0x9f0001"); // __ARM_NR_breakpoint |
zra
2015/03/30 17:25:00
This is not a valid thumb instruction.
srdjan
2015/03/30 17:39:50
Is there a breakpoint instruction in thumb instruc
zra
2015/03/30 20:02:05
After cleanup, only the Intel instruction should b
| |
512 #elif defined(HOST_ARCH_ARM) && defined(__THUMBEL__) | |
513 UNIMPLEMENTED(); | |
512 #elif defined(HOST_ARCH_MIPS) || defined(HOST_ARCH_ARM64) | 514 #elif defined(HOST_ARCH_MIPS) || defined(HOST_ARCH_ARM64) |
513 UNIMPLEMENTED(); | 515 UNIMPLEMENTED(); |
regis
2015/03/30 18:12:43
I am wondering how you figured out that this instr
zra
2015/03/30 20:02:05
gcc refuses to compile the inline assembly if you
| |
514 #else | 516 #else |
515 #error Unsupported architecture. | 517 #error Unsupported architecture. |
516 #endif | 518 #endif |
517 } | 519 } |
518 | 520 |
519 | 521 |
520 char* OS::StrNDup(const char* s, intptr_t n) { | 522 char* OS::StrNDup(const char* s, intptr_t n) { |
521 return strndup(s, n); | 523 return strndup(s, n); |
522 } | 524 } |
523 | 525 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
616 } | 618 } |
617 | 619 |
618 | 620 |
619 void OS::Exit(int code) { | 621 void OS::Exit(int code) { |
620 exit(code); | 622 exit(code); |
621 } | 623 } |
622 | 624 |
623 } // namespace dart | 625 } // namespace dart |
624 | 626 |
625 #endif // defined(TARGET_OS_LINUX) | 627 #endif // defined(TARGET_OS_LINUX) |
OLD | NEW |