Reviewers: Sven Panne, Michael Starzinger, Jakob,
Message:
Another trivial cleanup.
Description:
Get rid of duplicated CPU::DebugBreak() method.
We already have OS::DebugBreak(), which does the right thing.
Please review this at https://codereview.chromium.org/22893050/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/arm/cpu-arm.cc
M src/cpu.h
M src/ia32/cpu-ia32.cc
M src/mips/cpu-mips.cc
M src/runtime.cc
M src/x64/cpu-x64.cc
Index: src/arm/cpu-arm.cc
diff --git a/src/arm/cpu-arm.cc b/src/arm/cpu-arm.cc
index
8766a24bb2adc6d86e9247920bda1fde30cb84b8..cf531e1292bd8e4e7c1fa2e3e551b5167354a78f
100644
--- a/src/arm/cpu-arm.cc
+++ b/src/arm/cpu-arm.cc
@@ -106,15 +106,6 @@ void CPU::FlushICache(void* start, size_t size) {
#endif
}
-
-void CPU::DebugBreak() {
-#if !defined (__arm__)
- UNIMPLEMENTED(); // when building ARM emulator target
-#else
- asm volatile("bkpt 0");
-#endif
-}
-
} } // namespace v8::internal
#endif // V8_TARGET_ARCH_ARM
Index: src/cpu.h
diff --git a/src/cpu.h b/src/cpu.h
index
247af71aa357c63de1feabe13117952b89d7ca02..f8d33e4741d428dd70d28e0ae21ff8b411be5066
100644
--- a/src/cpu.h
+++ b/src/cpu.h
@@ -59,9 +59,6 @@ class CPU : public AllStatic {
// Flush instruction cache.
static void FlushICache(void* start, size_t size);
-
- // Try to activate a system level debugger.
- static void DebugBreak();
};
} } // namespace v8::internal
Index: src/ia32/cpu-ia32.cc
diff --git a/src/ia32/cpu-ia32.cc b/src/ia32/cpu-ia32.cc
index
77ff169b52bd1758ba5f9dab860d33e0ff9139ff..5fb04fc727282324a3ce103835939870010e5b7d
100644
--- a/src/ia32/cpu-ia32.cc
+++ b/src/ia32/cpu-ia32.cc
@@ -72,20 +72,6 @@ void CPU::FlushICache(void* start, size_t size) {
#endif
}
-
-void CPU::DebugBreak() {
-#ifdef _MSC_VER
- // To avoid Visual Studio runtime support the following code can be used
- // instead
- // __asm { int 3 }
- __debugbreak();
-#elif defined(__native_client__)
- asm("hlt");
-#else
- asm("int $3");
-#endif
-}
-
} } // namespace v8::internal
#endif // V8_TARGET_ARCH_IA32
Index: src/mips/cpu-mips.cc
diff --git a/src/mips/cpu-mips.cc b/src/mips/cpu-mips.cc
index
d13b23330fe6b2ec7e9d4896aa7f1c5e4857833f..49d0b377ebc3c64af19bf44cc03e2fc6029c83e8
100644
--- a/src/mips/cpu-mips.cc
+++ b/src/mips/cpu-mips.cc
@@ -87,14 +87,6 @@ void CPU::FlushICache(void* start, size_t size) {
#endif // USE_SIMULATOR.
}
-
-void CPU::DebugBreak() {
-#ifdef __mips
- asm volatile("break");
-#endif // #ifdef __mips
-}
-
-
} } // namespace v8::internal
#endif // V8_TARGET_ARCH_MIPS
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index
1202f059bdcad7b6163ca91dd91dea9d5c0c47e8..ad18cfc02097d9fbb00b7c6cf601185c1e775fdc
100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -12972,7 +12972,7 @@ RUNTIME_FUNCTION(MaybeObject*,
Runtime_DebugSetScriptSource) {
RUNTIME_FUNCTION(MaybeObject*, Runtime_SystemBreak) {
SealHandleScope shs(isolate);
ASSERT(args.length() == 0);
- CPU::DebugBreak();
+ OS::DebugBreak();
return isolate->heap()->undefined_value();
}
Index: src/x64/cpu-x64.cc
diff --git a/src/x64/cpu-x64.cc b/src/x64/cpu-x64.cc
index
96c5330832689c50a74255088f4dd056b8623b77..4fa290a8b5ff19380b69ea23c759b20e7582efbf
100644
--- a/src/x64/cpu-x64.cc
+++ b/src/x64/cpu-x64.cc
@@ -72,18 +72,6 @@ void CPU::FlushICache(void* start, size_t size) {
#endif
}
-
-void CPU::DebugBreak() {
-#ifdef _MSC_VER
- // To avoid Visual Studio runtime support the following code can be used
- // instead
- // __asm { int 3 }
- __debugbreak();
-#else
- asm("int $3");
-#endif
-}
-
} } // namespace v8::internal
#endif // V8_TARGET_ARCH_X64
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.