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

Unified Diff: src/debug.cc

Issue 20176: Moved some IA32 specific code from to the architecture dependent part of the ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug.h ('k') | src/debug-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.cc
===================================================================
--- src/debug.cc (revision 1236)
+++ src/debug.cc (working copy)
@@ -285,15 +285,8 @@
}
if (RelocInfo::IsJSReturn(rmode())) {
- // This path is currently only used on IA32 as JSExitFrame on ARM uses a
- // stub.
- // Patch the JS frame exit code with a debug break call. See
- // VisitReturnStatement and ExitJSFrame in codegen-ia32.cc for the
- // precise return instructions sequence.
- ASSERT(Debug::kIa32JSReturnSequenceLength >=
- Debug::kIa32CallInstructionLength);
- rinfo()->patch_code_with_call(Debug::debug_break_return_entry()->entry(),
- Debug::kIa32JSReturnSequenceLength - Debug::kIa32CallInstructionLength);
+ // Patch the frame exit code with a break point.
+ SetDebugBreakAtReturn();
} else {
// Patch the original code with the current address as the current address
// might have changed by the inline caching since the code was copied.
@@ -310,9 +303,8 @@
void BreakLocationIterator::ClearDebugBreak() {
if (RelocInfo::IsJSReturn(rmode())) {
- // Restore the JS frame exit code.
- rinfo()->patch_code(original_rinfo()->pc(),
- Debug::kIa32JSReturnSequenceLength);
+ // Restore the frame exit code.
+ ClearDebugBreakAtReturn();
} else {
// Patch the code to the original invoke.
rinfo()->set_target_address(original_rinfo()->target_address());
@@ -359,12 +351,7 @@
// Check whether there is a debug break at the current position.
bool BreakLocationIterator::IsDebugBreak() {
if (RelocInfo::IsJSReturn(rmode())) {
- // This is IA32 specific but works as long as the ARM version
- // still uses a stub for JSExitFrame.
- //
- // TODO(1240753): Make the test architecture independent or split
- // parts of the debugger into architecture dependent files.
- return (*(rinfo()->pc()) == 0xE8);
+ return IsDebugBreakAtReturn();
} else {
return Debug::IsDebugBreak(rinfo()->target_address());
}
« no previous file with comments | « src/debug.h ('k') | src/debug-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698