| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 kBreakpointReached = 1, | 225 kBreakpointReached = 1, |
| 226 kBreakpointResolved = 2, | 226 kBreakpointResolved = 2, |
| 227 kExceptionThrown = 3, | 227 kExceptionThrown = 3, |
| 228 kIsolateCreated = 4, | 228 kIsolateCreated = 4, |
| 229 kIsolateShutdown = 5, | 229 kIsolateShutdown = 5, |
| 230 kIsolateInterrupted = 6, | 230 kIsolateInterrupted = 6, |
| 231 }; | 231 }; |
| 232 struct DebuggerEvent { | 232 struct DebuggerEvent { |
| 233 EventType type; | 233 EventType type; |
| 234 union { | 234 union { |
| 235 DebuggerStackTrace* stack_trace; | 235 ActivationFrame* top_frame; |
| 236 SourceBreakpoint* breakpoint; | 236 SourceBreakpoint* breakpoint; |
| 237 const Object* exception; | 237 const Object* exception; |
| 238 Dart_Port isolate_id; | 238 Dart_Port isolate_id; |
| 239 }; | 239 }; |
| 240 }; | 240 }; |
| 241 typedef void EventHandler(DebuggerEvent *event); | 241 typedef void EventHandler(DebuggerEvent *event); |
| 242 | 242 |
| 243 Debugger(); | 243 Debugger(); |
| 244 ~Debugger(); | 244 ~Debugger(); |
| 245 | 245 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 RawArray* GetLibraryFields(const Library& lib); | 284 RawArray* GetLibraryFields(const Library& lib); |
| 285 RawArray* GetGlobalFields(const Library& lib); | 285 RawArray* GetGlobalFields(const Library& lib); |
| 286 | 286 |
| 287 intptr_t CacheObject(const Object& obj); | 287 intptr_t CacheObject(const Object& obj); |
| 288 RawObject* GetCachedObject(intptr_t obj_id); | 288 RawObject* GetCachedObject(intptr_t obj_id); |
| 289 bool IsValidObjectId(intptr_t obj_id); | 289 bool IsValidObjectId(intptr_t obj_id); |
| 290 | 290 |
| 291 Dart_Port GetIsolateId() { return isolate_id_; } | 291 Dart_Port GetIsolateId() { return isolate_id_; } |
| 292 | 292 |
| 293 static void SetEventHandler(EventHandler* handler); | 293 static void SetEventHandler(EventHandler* handler); |
| 294 static void SetBreakpointHandler(BreakpointHandler* handler); | |
| 295 | 294 |
| 296 // Utility functions. | 295 // Utility functions. |
| 297 static const char* QualifiedFunctionName(const Function& func); | 296 static const char* QualifiedFunctionName(const Function& func); |
| 298 | 297 |
| 299 RawObject* GetInstanceField(const Class& cls, | 298 RawObject* GetInstanceField(const Class& cls, |
| 300 const String& field_name, | 299 const String& field_name, |
| 301 const Instance& object); | 300 const Instance& object); |
| 302 RawObject* GetStaticField(const Class& cls, | 301 RawObject* GetStaticField(const Class& cls, |
| 303 const String& field_name); | 302 const String& field_name); |
| 304 | 303 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 | 382 |
| 384 friend class Isolate; | 383 friend class Isolate; |
| 385 friend class SourceBreakpoint; | 384 friend class SourceBreakpoint; |
| 386 DISALLOW_COPY_AND_ASSIGN(Debugger); | 385 DISALLOW_COPY_AND_ASSIGN(Debugger); |
| 387 }; | 386 }; |
| 388 | 387 |
| 389 | 388 |
| 390 } // namespace dart | 389 } // namespace dart |
| 391 | 390 |
| 392 #endif // VM_DEBUGGER_H_ | 391 #endif // VM_DEBUGGER_H_ |
| OLD | NEW |