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

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') | 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 26441)
+++ runtime/vm/debugger.h (working copy)
@@ -144,6 +144,10 @@
intptr_t LineNumber();
void SetContext(const Context& ctx) { ctx_ = ctx.raw(); }
+ // Returns true if this frame is for a function that is visible
+ // to the user and can be debugged.
+ bool IsDebuggable() const;
+
// 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 +205,27 @@
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 {
- ASSERT(i < trace_.length());
- return trace_[i];
+ ActivationFrame* FrameAt(int i) const {
+ return user_trace_[i];
}
+
ActivationFrame* GetHandlerFrame(const Instance& exc_obj) const;
+
private:
+ intptr_t UnfilteredLength() const { return trace_.length(); }
+
+ ActivationFrame* UnfilteredFrameAt(int i) const {
+ return trace_[i];
+ }
+
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698