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

Unified Diff: runtime/vm/simulator_dbc.cc

Issue 2523053002: Implement rewind: drop one or more frames from the debugger. (Closed)
Patch Set: code review Created 4 years, 1 month 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/service.cc ('k') | runtime/vm/stub_code.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_dbc.cc
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index 8febf13468918bb2fb8946a1becdc1b78815e38e..445397360ed6cc2c8dd171dd0e10571b4124a958 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -3715,14 +3715,25 @@ void Simulator::JumpToFrame(uword pc, uword sp, uword fp, Thread* thread) {
fp_ = reinterpret_cast<RawObject**>(fp);
if (pc == StubCode::RunExceptionHandler_entry()->EntryPoint()) {
- // Instead of executing the RunException stub, we implement its
- // behavior here.
+ // The RunExceptionHandler stub is a placeholder. We implement
+ // its behavior here.
RawObject* raw_exception = thread->active_exception();
RawObject* raw_stacktrace = thread->active_stacktrace();
ASSERT(raw_exception != Object::null());
special_[kExceptionSpecialIndex] = raw_exception;
special_[kStacktraceSpecialIndex] = raw_stacktrace;
pc_ = thread->resume_pc();
+ } else if (pc == StubCode::DeoptForRewind_entry()->EntryPoint()) {
+ // The DeoptForRewind stub is a placeholder. We will eventually
+ // implement its behavior here.
+ //
+ // TODO(turnidge): Refactor the Deopt bytecode so that we can use
+ // the implementation here too. The deopt pc is stored in
+ // Thread::resume_pc(). After invoking deoptimization, we usually
+ // call into Debugger::RewindPostDeopt(), but I need to figure out
+ // if that makes any sense (it would JumpToFrame during a
+ // JumpToFrame, which seems wrong).
+ UNIMPLEMENTED();
} else {
pc_ = pc;
}
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/stub_code.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698