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_ANDROID) | 6 #if defined(TARGET_OS_ANDROID) |
7 | 7 |
8 #include "vm/os.h" | 8 #include "vm/os.h" |
9 | 9 |
10 #include <android/log.h> // NOLINT | 10 #include <android/log.h> // NOLINT |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 req = rem; | 269 req = rem; |
270 } | 270 } |
271 } | 271 } |
272 | 272 |
273 | 273 |
274 void OS::DebugBreak() { | 274 void OS::DebugBreak() { |
275 __builtin_trap(); | 275 __builtin_trap(); |
276 } | 276 } |
277 | 277 |
278 | 278 |
| 279 uintptr_t DART_NOINLINE OS::GetProgramCounter() { |
| 280 return reinterpret_cast<uintptr_t>( |
| 281 __builtin_extract_return_addr(__builtin_return_address(0))); |
| 282 } |
| 283 |
| 284 |
279 char* OS::StrNDup(const char* s, intptr_t n) { | 285 char* OS::StrNDup(const char* s, intptr_t n) { |
280 return strndup(s, n); | 286 return strndup(s, n); |
281 } | 287 } |
282 | 288 |
283 | 289 |
284 intptr_t OS::StrNLen(const char* s, intptr_t n) { | 290 intptr_t OS::StrNLen(const char* s, intptr_t n) { |
285 return strnlen(s, n); | 291 return strnlen(s, n); |
286 } | 292 } |
287 | 293 |
288 | 294 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 } | 444 } |
439 | 445 |
440 | 446 |
441 void OS::Exit(int code) { | 447 void OS::Exit(int code) { |
442 exit(code); | 448 exit(code); |
443 } | 449 } |
444 | 450 |
445 } // namespace dart | 451 } // namespace dart |
446 | 452 |
447 #endif // defined(TARGET_OS_ANDROID) | 453 #endif // defined(TARGET_OS_ANDROID) |
OLD | NEW |