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

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 286363006: Add flag —enable-debugger (default true) in order to disable debugger single stepping code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 | « runtime/vm/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_ia32.cc
===================================================================
--- runtime/vm/stub_code_ia32.cc (revision 36530)
+++ runtime/vm/stub_code_ia32.cc (working copy)
@@ -29,6 +29,7 @@
DECLARE_FLAG(bool, trace_optimized_ic_calls);
DEFINE_FLAG(bool, verify_incoming_contexts, false, "");
+DECLARE_FLAG(bool, enable_debugger);
// Input parameters:
// ESP : points to return address.
@@ -1301,19 +1302,21 @@
}
#endif // DEBUG
- // Check single stepping.
- Label not_stepping;
- __ movl(EAX, FieldAddress(CTX, Context::isolate_offset()));
- __ movzxb(EAX, Address(EAX, Isolate::single_step_offset()));
- __ cmpl(EAX, Immediate(0));
- __ j(EQUAL, &not_stepping, Assembler::kNearJump);
+ if (FLAG_enable_debugger) {
+ // Check single stepping.
+ Label not_stepping;
+ __ movl(EAX, FieldAddress(CTX, Context::isolate_offset()));
+ __ movzxb(EAX, Address(EAX, Isolate::single_step_offset()));
+ __ cmpl(EAX, Immediate(0));
+ __ j(EQUAL, &not_stepping, Assembler::kNearJump);
- __ EnterStubFrame();
- __ pushl(ECX);
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ popl(ECX);
- __ LeaveFrame();
- __ Bind(&not_stepping);
+ __ EnterStubFrame();
+ __ pushl(ECX);
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ popl(ECX);
+ __ LeaveFrame();
+ __ Bind(&not_stepping);
+ }
// ECX: IC data object (preserved).
// Load arguments descriptor into EDX.
@@ -1526,19 +1529,21 @@
__ Bind(&ok);
}
#endif // DEBUG
- // Check single stepping.
- Label not_stepping;
- __ movl(EAX, FieldAddress(CTX, Context::isolate_offset()));
- __ movzxb(EAX, Address(EAX, Isolate::single_step_offset()));
- __ cmpl(EAX, Immediate(0));
- __ j(EQUAL, &not_stepping, Assembler::kNearJump);
+ if (FLAG_enable_debugger) {
+ // Check single stepping.
+ Label not_stepping;
+ __ movl(EAX, FieldAddress(CTX, Context::isolate_offset()));
+ __ movzxb(EAX, Address(EAX, Isolate::single_step_offset()));
+ __ cmpl(EAX, Immediate(0));
+ __ j(EQUAL, &not_stepping, Assembler::kNearJump);
- __ EnterStubFrame();
- __ pushl(ECX);
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ popl(ECX);
- __ LeaveFrame();
- __ Bind(&not_stepping);
+ __ EnterStubFrame();
+ __ pushl(ECX);
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ popl(ECX);
+ __ LeaveFrame();
+ __ Bind(&not_stepping);
+ }
// ECX: IC data object (preserved).
__ movl(EBX, FieldAddress(ECX, ICData::ic_data_offset()));
@@ -1620,17 +1625,19 @@
// Called only from unoptimized code.
void StubCode::GenerateDebugStepCheckStub(Assembler* assembler) {
- // Check single stepping.
- Label not_stepping;
- __ movl(EAX, FieldAddress(CTX, Context::isolate_offset()));
- __ movzxb(EAX, Address(EAX, Isolate::single_step_offset()));
- __ cmpl(EAX, Immediate(0));
- __ j(EQUAL, &not_stepping, Assembler::kNearJump);
+ if (FLAG_enable_debugger) {
+ // Check single stepping.
+ Label not_stepping;
+ __ movl(EAX, FieldAddress(CTX, Context::isolate_offset()));
+ __ movzxb(EAX, Address(EAX, Isolate::single_step_offset()));
+ __ cmpl(EAX, Immediate(0));
+ __ j(EQUAL, &not_stepping, Assembler::kNearJump);
- __ EnterStubFrame();
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ LeaveFrame();
- __ Bind(&not_stepping);
+ __ EnterStubFrame();
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ LeaveFrame();
+ __ Bind(&not_stepping);
+ }
__ ret();
}
@@ -1873,17 +1880,19 @@
// Returns ZF set.
void StubCode::GenerateUnoptimizedIdenticalWithNumberCheckStub(
Assembler* assembler) {
- // Check single stepping.
- Label not_stepping;
- __ movl(EAX, FieldAddress(CTX, Context::isolate_offset()));
- __ movzxb(EAX, Address(EAX, Isolate::single_step_offset()));
- __ cmpl(EAX, Immediate(0));
- __ j(EQUAL, &not_stepping, Assembler::kNearJump);
+ if (FLAG_enable_debugger) {
+ // Check single stepping.
+ Label not_stepping;
+ __ movl(EAX, FieldAddress(CTX, Context::isolate_offset()));
+ __ movzxb(EAX, Address(EAX, Isolate::single_step_offset()));
+ __ cmpl(EAX, Immediate(0));
+ __ j(EQUAL, &not_stepping, Assembler::kNearJump);
- __ EnterStubFrame();
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ LeaveFrame();
- __ Bind(&not_stepping);
+ __ EnterStubFrame();
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ LeaveFrame();
+ __ Bind(&not_stepping);
+ }
const Register left = EAX;
const Register right = EDX;
« no previous file with comments | « runtime/vm/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698