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

Unified Diff: runtime/vm/debugger.h

Issue 117133005: Change how debugger handles source breakpoints (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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/tests/vm/vm.status ('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 31370)
+++ runtime/vm/debugger.h (working copy)
@@ -27,42 +27,43 @@
// SourceBreakpoint.
class SourceBreakpoint {
public:
- SourceBreakpoint(intptr_t id, const Function& func, intptr_t token_pos);
+ SourceBreakpoint(intptr_t id, const Script& script, intptr_t token_pos);
RawFunction* function() const { return function_; }
intptr_t token_pos() const { return token_pos_; }
- void set_token_pos(intptr_t value) { token_pos_ = value; }
intptr_t id() const { return id_; }
- RawScript* SourceCode();
+ RawScript* script() { return script_; }
RawString* SourceUrl();
intptr_t LineNumber();
- void GetCodeLocation(Library* lib,
- Script* script,
- intptr_t* token_pos) const;
+ void GetCodeLocation(Library* lib, Script* script, intptr_t* token_pos);
void Enable();
void Disable();
bool IsEnabled() const { return is_enabled_; }
+ bool IsResolved() { return is_resolved_; }
- void PrintToJSONStream(JSONStream* stream) const;
+ void PrintToJSONStream(JSONStream* stream);
private:
void VisitObjectPointers(ObjectPointerVisitor* visitor);
- void set_function(const Function& func);
+ void SetResolved(const Function& func, intptr_t token_pos);
void set_next(SourceBreakpoint* value) { next_ = value; }
SourceBreakpoint* next() const { return this->next_; }
const intptr_t id_;
- RawFunction* function_;
+ RawScript* script_;
intptr_t token_pos_;
- intptr_t line_number_;
+ bool is_resolved_;
bool is_enabled_;
-
SourceBreakpoint* next_;
+ // Valid for resolved breakpoints:
+ RawFunction* function_;
+ intptr_t line_number_;
+
friend class Debugger;
DISALLOW_COPY_AND_ASSIGN(SourceBreakpoint);
};
@@ -378,11 +379,18 @@
kSingleStep
};
+ void FindEquivalentFunctions(const Script& script,
+ intptr_t start_pos,
+ intptr_t end_pos,
+ GrowableObjectArray* function_list);
+ RawFunction* FindBestFit(const Script& script, intptr_t token_pos);
+ RawFunction* FindInnermostClosure(const Function& function,
+ intptr_t token_pos);
intptr_t ResolveBreakpointPos(const Function& func,
- intptr_t first_token_pos,
- intptr_t last_token_pos);
+ intptr_t requested_token_pos);
void DeoptimizeWorld();
void InstrumentForStepping(const Function& target_function);
+ SourceBreakpoint* SetBreakpoint(const Script& script, intptr_t token_pos);
SourceBreakpoint* SetBreakpoint(const Function& target_function,
intptr_t first_token_pos,
intptr_t last_token_pos);
@@ -390,10 +398,9 @@
void UnlinkCodeBreakpoints(SourceBreakpoint* src_bpt);
void RegisterSourceBreakpoint(SourceBreakpoint* bpt);
void RegisterCodeBreakpoint(CodeBreakpoint* bpt);
- SourceBreakpoint* GetSourceBreakpoint(const Function& func,
+ SourceBreakpoint* GetSourceBreakpoint(const Script& script,
intptr_t token_pos);
void MakeCodeBreakpointsAt(const Function& func,
- intptr_t token_pos,
SourceBreakpoint* bpt);
// Returns NULL if no breakpoint exists for the given address.
CodeBreakpoint* GetCodeBreakpoint(uword breakpoint_address);
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698