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

Unified Diff: runtime/vm/debugger.h

Issue 23000011: Fix debugger stack traces (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | runtime/vm/debugger.cc » ('j') | runtime/vm/debugger.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | runtime/vm/debugger.cc » ('j') | runtime/vm/debugger.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698