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

Unified Diff: src/debug-ia32.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-arm.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug-ia32.cc
===================================================================
--- src/debug-ia32.cc (revision 1236)
+++ src/debug-ia32.cc (working copy)
@@ -34,6 +34,31 @@
namespace v8 { namespace internal {
+// A debug break in the frame exit code is identified by a call instruction.
+bool BreakLocationIterator::IsDebugBreakAtReturn() {
+ // Opcode E8 is call.
+ return (*(rinfo()->pc()) == 0xE8);
+}
+
+
+// Patch the JS frame exit code with a debug break call. See
+// CodeGenerator::VisitReturnStatement and VirtualFrame::Exit in codegen-ia32.cc
+// for the precise return instructions sequence.
+void BreakLocationIterator::SetDebugBreakAtReturn() {
+ ASSERT(Debug::kIa32JSReturnSequenceLength >=
+ Debug::kIa32CallInstructionLength);
+ rinfo()->PatchCodeWithCall(Debug::debug_break_return_entry()->entry(),
+ Debug::kIa32JSReturnSequenceLength - Debug::kIa32CallInstructionLength);
+}
+
+
+// Restore the JS frame exit code.
+void BreakLocationIterator::ClearDebugBreakAtReturn() {
+ rinfo()->PatchCode(original_rinfo()->pc(),
+ Debug::kIa32JSReturnSequenceLength);
+}
+
+
#define __ masm->
« no previous file with comments | « src/debug-arm.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698