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

Unified Diff: runtime/vm/debugger.h

Issue 1699153002: Add step OverAwait to service protocol (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/debugger.h
diff --git a/runtime/vm/debugger.h b/runtime/vm/debugger.h
index d6904d56a656b054e34cc3dffba293d283ce2f02..900438b117ceacf77793d4b16b9f4133a1422b3c 100644
--- a/runtime/vm/debugger.h
+++ b/runtime/vm/debugger.h
@@ -30,7 +30,8 @@ class Breakpoint {
kind_(Breakpoint::kNone),
next_(NULL),
closure_(Instance::null()),
- bpt_location_(bpt_location) {}
+ bpt_location_(bpt_location),
+ is_synthetic_async_(false) {}
intptr_t id() const { return id_; }
Breakpoint* next() const { return next_; }
@@ -60,6 +61,14 @@ class Breakpoint {
closure_ = closure.raw();
}
+ // Mark that this breakpoint is a result of a step OverAwait request.
+ void set_is_synthetic_async(bool is_synthetic_async) {
+ is_synthetic_async_ = is_synthetic_async;
+ }
+ bool is_synthetic_async() const {
+ return is_synthetic_async_;
+ }
+
void PrintJSON(JSONStream* stream);
private:
@@ -77,6 +86,7 @@ class Breakpoint {
Breakpoint* next_;
RawInstance* closure_;
BreakpointLocation* bpt_location_;
+ bool is_synthetic_async_;
friend class BreakpointLocation;
DISALLOW_COPY_AND_ASSIGN(Breakpoint);
@@ -128,7 +138,9 @@ class BreakpointLocation {
Breakpoint* AddRepeated(Debugger* dbg);
Breakpoint* AddSingleShot(Debugger* dbg);
- Breakpoint* AddPerClosure(Debugger* dbg, const Instance& closure);
+ Breakpoint* AddPerClosure(Debugger* dbg,
+ const Instance& closure,
+ bool for_over_await);
bool AnyEnabled() const;
bool IsResolved() const { return is_resolved_; }
@@ -467,7 +479,8 @@ class Debugger {
// Set breakpoint at closest location to function entry.
Breakpoint* SetBreakpointAtEntry(const Function& target_function,
bool single_shot);
- Breakpoint* SetBreakpointAtActivation(const Instance& closure);
+ Breakpoint* SetBreakpointAtActivation(const Instance& closure,
+ bool for_over_await);
Breakpoint* BreakpointAtActivation(const Instance& closure);
// TODO(turnidge): script_url may no longer be specific enough.
@@ -486,6 +499,8 @@ class Debugger {
void RemoveBreakpoint(intptr_t bp_id);
Breakpoint* GetBreakpointById(intptr_t id);
+ // Will return false if we are not at an await.
+ bool SetupStepOverAwait();
void SetStepOver();
void SetSingleStep();
void SetStepOut();

Powered by Google App Engine
This is Rietveld 408576698