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

Unified Diff: runtime/vm/debugger.h

Issue 808643004: Support breakpoints in deferred libraries (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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/dart_api_impl.cc ('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
===================================================================
--- runtime/vm/debugger.h (revision 42490)
+++ runtime/vm/debugger.h (working copy)
@@ -25,12 +25,25 @@
// SourceBreakpoint represents a user-specified breakpoint location in
// Dart source. There may be more than one CodeBreakpoint object per
// SourceBreakpoint.
+// An unresolved breakpoint is one where the underlying code has not
+// been compiled yet. Since the code has not been compiled, we don't know
+// the definitive source location yet. The requested source location may
+// change when the underlying code gets compiled.
+// A latent breakpoint represents a breakpoint location in Dart source
+// that is not loaded in the VM when the breakpoint is requested.
+// When a script with matching url is loaded, a latent breakpoint
+// becomes an unresolved breakpoint.
class SourceBreakpoint {
public:
+ // Create a new unresolved breakpoint.
SourceBreakpoint(intptr_t id,
const Script& script,
intptr_t token_pos,
intptr_t end_token_pos);
+ // Create a new latent breakpoint.
+ SourceBreakpoint(intptr_t id,
+ const String& url,
+ intptr_t line_number);
RawFunction* function() const { return function_; }
intptr_t token_pos() const { return token_pos_; }
@@ -38,7 +51,7 @@
intptr_t id() const { return id_; }
RawScript* script() const { return script_; }
- RawString* SourceUrl();
+ RawString* url() const { return url_; }
intptr_t LineNumber();
void GetCodeLocation(Library* lib, Script* script, intptr_t* token_pos);
@@ -47,6 +60,7 @@
void Disable();
bool IsEnabled() const { return is_enabled_; }
bool IsResolved() const { return is_resolved_; }
+ bool IsLatent() const { return token_pos_ < 0; }
bool IsOneShot() const { return is_one_shot_; }
void SetIsOneShot() { is_one_shot_ = true; }
@@ -62,6 +76,7 @@
const intptr_t id_;
RawScript* script_;
+ RawString* url_;
intptr_t token_pos_;
intptr_t end_token_pos_;
bool is_resolved_;
@@ -342,6 +357,7 @@
void Shutdown();
void NotifyCompilation(const Function& func);
+ void NotifyDoneLoading();
RawFunction* ResolveFunction(const Library& library,
const String& class_name,
@@ -462,6 +478,7 @@
intptr_t last_token_pos);
void RemoveInternalBreakpoints();
void UnlinkCodeBreakpoints(SourceBreakpoint* src_bpt);
+ SourceBreakpoint* GetLatentBreakpoint(const String& url, intptr_t line);
void RegisterSourceBreakpoint(SourceBreakpoint* bpt);
void RegisterCodeBreakpoint(CodeBreakpoint* bpt);
SourceBreakpoint* GetSourceBreakpoint(const Script& script,
@@ -511,7 +528,7 @@
// ID number generator.
intptr_t next_id_;
-
+ SourceBreakpoint* latent_breakpoints_;
SourceBreakpoint* src_breakpoints_;
CodeBreakpoint* code_breakpoints_;
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698