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

Unified Diff: runtime/vm/stub_code_x64.cc

Issue 17846009: Better single stepping in VM debugger (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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
Index: runtime/vm/stub_code_x64.cc
===================================================================
--- runtime/vm/stub_code_x64.cc (revision 24600)
+++ runtime/vm/stub_code_x64.cc (working copy)
@@ -1416,6 +1416,19 @@
}
#endif // DEBUG
+ // Check single stepping.
+ Label not_stepping;
+ __ movq(RAX, FieldAddress(CTX, Context::isolate_offset()));
+ __ movzxb(RAX, Address(RAX, Isolate::single_step_offset()));
+ __ cmpq(RAX, Immediate(0));
+ __ j(EQUAL, &not_stepping, Assembler::kNearJump);
+ __ EnterStubFrame();
+ __ pushq(RBX);
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry);
+ __ popq(RBX);
+ __ LeaveFrame();
+ __ Bind(&not_stepping);
+
// Load arguments descriptor into R10.
__ movq(R10, FieldAddress(RBX, ICData::arguments_descriptor_offset()));
// Loop that checks if there is an IC data match.
@@ -1636,6 +1649,19 @@
}
#endif // DEBUG
+ // Check single stepping.
+ Label not_stepping;
+ __ movq(RAX, FieldAddress(CTX, Context::isolate_offset()));
+ __ movzxb(RAX, Address(RAX, Isolate::single_step_offset()));
+ __ cmpq(RAX, Immediate(0));
+ __ j(EQUAL, &not_stepping, Assembler::kNearJump);
+ __ EnterStubFrame();
+ __ pushq(RBX); // Preserve IC data object.
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry);
+ __ popq(RBX);
+ __ LeaveFrame();
+ __ Bind(&not_stepping);
+
// RBX: IC data object (preserved).
__ movq(R12, FieldAddress(RBX, ICData::ic_data_offset()));
// R12: ic_data_array with entries: target functions and count.
@@ -2098,6 +2124,17 @@
// Returns ZF set.
void StubCode::GenerateUnoptimizedIdenticalWithNumberCheckStub(
Assembler* assembler) {
+ // Check single stepping.
+ Label not_stepping;
+ __ movq(RAX, FieldAddress(CTX, Context::isolate_offset()));
+ __ movzxb(RAX, Address(RAX, Isolate::single_step_offset()));
+ __ cmpq(RAX, Immediate(0));
+ __ j(EQUAL, &not_stepping, Assembler::kNearJump);
+ __ EnterStubFrame();
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry);
+ __ LeaveFrame();
+ __ Bind(&not_stepping);
+
const Register left = RAX;
const Register right = RDX;

Powered by Google App Engine
This is Rietveld 408576698