| 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);
|
|
|