| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_DEBUGGER_H_ | 5 #ifndef VM_DEBUGGER_H_ |
| 6 #define VM_DEBUGGER_H_ | 6 #define VM_DEBUGGER_H_ |
| 7 | 7 |
| 8 #include "include/dart_debugger_api.h" | 8 #include "include/dart_debugger_api.h" |
| 9 | 9 |
| 10 #include "vm/object.h" | 10 #include "vm/object.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 friend class Debugger; | 210 friend class Debugger; |
| 211 friend class DebuggerStackTrace; | 211 friend class DebuggerStackTrace; |
| 212 DISALLOW_COPY_AND_ASSIGN(ActivationFrame); | 212 DISALLOW_COPY_AND_ASSIGN(ActivationFrame); |
| 213 }; | 213 }; |
| 214 | 214 |
| 215 | 215 |
| 216 // Array of function activations on the call stack. | 216 // Array of function activations on the call stack. |
| 217 class DebuggerStackTrace : public ZoneAllocated { | 217 class DebuggerStackTrace : public ZoneAllocated { |
| 218 public: | 218 public: |
| 219 explicit DebuggerStackTrace(int capacity) | 219 explicit DebuggerStackTrace(int capacity) |
| 220 : trace_(capacity), | 220 : trace_(capacity) { } |
| 221 user_trace_(capacity) { } | |
| 222 | 221 |
| 223 intptr_t Length() const { return user_trace_.length(); } | 222 intptr_t Length() const { return trace_.length(); } |
| 224 | 223 |
| 225 ActivationFrame* FrameAt(int i) const { | 224 ActivationFrame* FrameAt(int i) const { |
| 226 return user_trace_[i]; | 225 return trace_[i]; |
| 227 } | 226 } |
| 228 | 227 |
| 229 ActivationFrame* GetHandlerFrame(const Instance& exc_obj) const; | 228 ActivationFrame* GetHandlerFrame(const Instance& exc_obj) const; |
| 230 | 229 |
| 231 private: | 230 private: |
| 232 intptr_t UnfilteredLength() const { return trace_.length(); } | |
| 233 | |
| 234 ActivationFrame* UnfilteredFrameAt(int i) const { | |
| 235 return trace_[i]; | |
| 236 } | |
| 237 | |
| 238 void AddActivation(ActivationFrame* frame); | 231 void AddActivation(ActivationFrame* frame); |
| 239 ZoneGrowableArray<ActivationFrame*> trace_; | 232 ZoneGrowableArray<ActivationFrame*> trace_; |
| 240 ZoneGrowableArray<ActivationFrame*> user_trace_; | |
| 241 | 233 |
| 242 friend class Debugger; | 234 friend class Debugger; |
| 243 DISALLOW_COPY_AND_ASSIGN(DebuggerStackTrace); | 235 DISALLOW_COPY_AND_ASSIGN(DebuggerStackTrace); |
| 244 }; | 236 }; |
| 245 | 237 |
| 246 | 238 |
| 247 typedef void BreakpointHandler(Dart_Port isolate_id, | 239 typedef void BreakpointHandler(Dart_Port isolate_id, |
| 248 SourceBreakpoint* bpt, | 240 SourceBreakpoint* bpt, |
| 249 DebuggerStackTrace* stack); | 241 DebuggerStackTrace* stack); |
| 250 | 242 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 | 424 |
| 433 friend class Isolate; | 425 friend class Isolate; |
| 434 friend class SourceBreakpoint; | 426 friend class SourceBreakpoint; |
| 435 DISALLOW_COPY_AND_ASSIGN(Debugger); | 427 DISALLOW_COPY_AND_ASSIGN(Debugger); |
| 436 }; | 428 }; |
| 437 | 429 |
| 438 | 430 |
| 439 } // namespace dart | 431 } // namespace dart |
| 440 | 432 |
| 441 #endif // VM_DEBUGGER_H_ | 433 #endif // VM_DEBUGGER_H_ |
| OLD | NEW |