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

Unified Diff: runtime/vm/debugger.h

Issue 2785243003: Implement support for single stepping out of an async function. (Closed)
Patch Set: fschneider review Created 3 years, 9 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/observatory/tests/service/step_over_await_test.dart ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.h
diff --git a/runtime/vm/debugger.h b/runtime/vm/debugger.h
index 63de2f5a8eb04449823f520dd128a77409da83a6..9bf4d969dfa8ffd4eb96a81274ec0ac9c8b92a34 100644
--- a/runtime/vm/debugger.h
+++ b/runtime/vm/debugger.h
@@ -361,6 +361,8 @@ class ActivationFrame : public ZoneAllocated {
RawObject* GetAsyncCompleter();
void ExtractTokenPositionFromAsyncClosure();
+ bool IsAsyncMachinery() const;
+
static const char* KindToCString(Kind kind) {
switch (kind) {
case kRegular:
@@ -715,6 +717,12 @@ class Debugger {
const Code& code,
intptr_t post_deopt_frame_index);
+ void ResetSteppingFramePointers();
+ bool SteppedForSyntheticAsyncBreakpoint() const;
+ void CleanupSyntheticAsyncBreakpoint();
+ void RememberTopFrameAwaiter();
+ void SetAsyncSteppingFramePointer();
+
Isolate* isolate_;
Dart_Port isolate_id_; // A unique ID for the isolate in the debugger.
bool initialized_;
@@ -754,6 +762,9 @@ class Debugger {
// frame corresponds to this fp value, or if the top frame is
// lower on the stack.
uword stepping_fp_;
+ // Used to track the current async/async* function.
+ uword async_stepping_fp_;
+ RawObject* top_frame_awaiter_;
// If we step while at a breakpoint, we would hit the same pc twice.
// We use this field to let us skip the next single-step after a
« no previous file with comments | « runtime/observatory/tests/service/step_over_await_test.dart ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698