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

Unified Diff: dart/runtime/vm/debugger_arm.cc

Issue 119673004: Version 1.1.0-dev.5.2 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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 | « dart/runtime/vm/debugger_api_impl_test.cc ('k') | dart/runtime/vm/debugger_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/vm/debugger_arm.cc
===================================================================
--- dart/runtime/vm/debugger_arm.cc (revision 31530)
+++ dart/runtime/vm/debugger_arm.cc (working copy)
@@ -31,36 +31,6 @@
*reinterpret_cast<uword*>(closure_addr));
}
-
-void CodeBreakpoint::PatchFunctionReturn() {
- uword* code = reinterpret_cast<uword*>(pc_ - 3 * Instr::kInstrSize);
- ASSERT(code[0] == 0xe8bd4c00); // ldmia sp!, {pp, fp, lr}
- ASSERT(code[1] == 0xe28dd004); // add sp, sp, #4
- ASSERT(code[2] == 0xe12fff1e); // bx lr
-
- // Smash code with call instruction and target address.
- uword stub_addr = StubCode::BreakpointReturnEntryPoint();
- uint16_t target_lo = stub_addr & 0xffff;
- uint16_t target_hi = stub_addr >> 16;
- uword movw = 0xe300c000 | ((target_lo >> 12) << 16) | (target_lo & 0xfff);
- uword movt = 0xe340c000 | ((target_hi >> 12) << 16) | (target_hi & 0xfff);
- uword blx = 0xe12fff3c;
- code[0] = movw; // movw ip, #target_lo
- code[1] = movt; // movt ip, #target_hi
- code[2] = blx; // blx ip
- CPU::FlushICache(pc_ - 3 * Instr::kInstrSize, 3 * Instr::kInstrSize);
-}
-
-
-void CodeBreakpoint::RestoreFunctionReturn() {
- uword* code = reinterpret_cast<uword*>(pc_ - 3 * Instr::kInstrSize);
- ASSERT((code[0] & 0xfff0f000) == 0xe300c000);
- code[0] = 0xe8bd4c00; // ldmia sp!, {pp, fp, lr}
- code[1] = 0xe28dd004; // add sp, sp, #4
- code[2] = 0xe12fff1e; // bx lr
- CPU::FlushICache(pc_ - 3 * Instr::kInstrSize, 3 * Instr::kInstrSize);
-}
-
} // namespace dart
#endif // defined TARGET_ARCH_ARM
« no previous file with comments | « dart/runtime/vm/debugger_api_impl_test.cc ('k') | dart/runtime/vm/debugger_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698