Chromium Code Reviews| Index: runtime/vm/os_linux.cc |
| =================================================================== |
| --- runtime/vm/os_linux.cc (revision 17504) |
| +++ runtime/vm/os_linux.cc (working copy) |
| @@ -310,6 +310,19 @@ |
| } |
| +void OS::DebugBreak() { |
| +#if defined(HOST_ARCH_X64) || defined(HOST_ARCH_IA32) |
| + asm("int $3"); |
| +#elif defined(HOST_ARCH_ARM) |
| + asm("svc #0x9f0001"); // __ARM_NR_breakpoint |
| +#elif defined(HOST_ARCH_MIPS) |
| + UNIMPLEMENTED(); |
| +#else |
| +#error Unsupported architecture. |
| +#endif |
|
siva
2013/01/24 02:03:09
As discussed offline we have moved away from using
Kevin Millikin (Google)
2013/01/24 08:26:36
It's pretty minor, but it's nice to have because g
Ivan Posva
2013/01/24 18:25:57
Since this is in a OS specific file we can add the
regis
2013/01/24 21:47:48
As Kevin, I think that DebugBreak() is nice to hav
|
| +} |
| + |
| + |
| void OS::Print(const char* format, ...) { |
| va_list args; |
| va_start(args, format); |
| @@ -385,6 +398,10 @@ |
| } |
| +// Cache the null page size. |
| +uword OS::null_page_size_ = 0; |
| + |
| + |
| void OS::InitOnce() { |
| // TODO(5411554): For now we check that initonce is called only once, |
| // Once there is more formal mechanism to call InitOnce we can move |
| @@ -392,6 +409,9 @@ |
| static bool init_once_called = false; |
| ASSERT(init_once_called == false); |
| init_once_called = true; |
| + |
| + // Initialize the null page size. |
| + null_page_size_ = static_cast<uword>(getpagesize()); |
| } |