Chromium Code Reviews| Index: runtime/vm/debugger.h |
| =================================================================== |
| --- runtime/vm/debugger.h (revision 26390) |
| +++ runtime/vm/debugger.h (working copy) |
| @@ -144,6 +144,8 @@ |
| intptr_t LineNumber(); |
| void SetContext(const Context& ctx) { ctx_ = ctx.raw(); } |
| + bool IsDebuggable() const; |
|
srdjan
2013/08/21 16:27:03
Please document what that means (e.g. which frames
hausner
2013/08/21 20:26:13
Done.
|
| + |
| // The context level of a frame is the context level at the |
| // PC/token index of the frame. It determines the depth of the context |
| // chain that belongs to the function of this activation frame. |
| @@ -201,18 +203,29 @@ |
| class DebuggerStackTrace : public ZoneAllocated { |
| public: |
| explicit DebuggerStackTrace(int capacity) |
| - : trace_(capacity) { } |
| + : trace_(capacity), |
| + user_trace_(capacity) { } |
| - intptr_t Length() const { return trace_.length(); } |
| + intptr_t Length() const { return user_trace_.length(); } |
| - ActivationFrame* ActivationFrameAt(int i) const { |
| + ActivationFrame* FrameAt(int i) const { |
| + ASSERT(i < user_trace_.length()); |
|
srdjan
2013/08/21 16:27:03
Redundant assert, it should be part of arrays []
hausner
2013/08/21 20:26:13
Agree. Happy to remove it.
|
| + return user_trace_[i]; |
| + } |
| + |
| + ActivationFrame* GetHandlerFrame(const Instance& exc_obj) const; |
| + |
| + private: |
| + intptr_t UnfilteredLength() const { return trace_.length(); } |
| + |
| + ActivationFrame* UnfilteredFrameAt(int i) const { |
| ASSERT(i < trace_.length()); |
|
srdjan
2013/08/21 16:27:03
ditto.
hausner
2013/08/21 20:26:13
ditto
|
| return trace_[i]; |
| } |
| - ActivationFrame* GetHandlerFrame(const Instance& exc_obj) const; |
| - private: |
| + |
| void AddActivation(ActivationFrame* frame); |
| ZoneGrowableArray<ActivationFrame*> trace_; |
| + ZoneGrowableArray<ActivationFrame*> user_trace_; |
| friend class Debugger; |
| DISALLOW_COPY_AND_ASSIGN(DebuggerStackTrace); |
| @@ -315,6 +328,8 @@ |
| uword GetPatchedStubAddress(uword breakpoint_address); |
| + static bool IsDebuggable(const Function& func); |
| + |
| private: |
| enum ResumeAction { |
| kContinue, |
| @@ -350,8 +365,6 @@ |
| void SignalBpResolved(SourceBreakpoint *bpt); |
| void SignalPausedEvent(ActivationFrame* top_frame); |
| - static bool IsDebuggable(const Function& func); |
| - |
| intptr_t nextId() { return next_id_++; } |
| bool ShouldPauseOnException(DebuggerStackTrace* stack_trace, |