| 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 #include "vm/debugger.h" | 5 #include "vm/debugger.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 case kBreakpointResolved: | 515 case kBreakpointResolved: |
| 516 return "BreakpointResolved"; | 516 return "BreakpointResolved"; |
| 517 case kExceptionThrown: | 517 case kExceptionThrown: |
| 518 return "ExceptionThrown"; | 518 return "ExceptionThrown"; |
| 519 case kIsolateCreated: | 519 case kIsolateCreated: |
| 520 return "IsolateCreated"; | 520 return "IsolateCreated"; |
| 521 case kIsolateShutdown: | 521 case kIsolateShutdown: |
| 522 return "IsolateShutdown"; | 522 return "IsolateShutdown"; |
| 523 case kIsolateInterrupted: | 523 case kIsolateInterrupted: |
| 524 return "IsolateInterrupted"; | 524 return "IsolateInterrupted"; |
| 525 case kIsolateResumed: |
| 526 return "IsolateResumed"; |
| 525 default: | 527 default: |
| 526 UNREACHABLE(); | 528 UNREACHABLE(); |
| 527 return "Unknown"; | 529 return "Unknown"; |
| 528 } | 530 } |
| 529 } | 531 } |
| 530 | 532 |
| 531 | 533 |
| 532 void DebuggerEvent::PrintJSON(JSONStream* js) const { | 534 void DebuggerEvent::PrintJSON(JSONStream* js) const { |
| 533 JSONObject jsobj(js); | 535 JSONObject jsobj(js); |
| 534 jsobj.AddProperty("type", "ServiceEvent"); | 536 jsobj.AddProperty("type", "ServiceEvent"); |
| 535 // TODO(turnidge): Drop the 'id' for things like DebuggerEvent. | 537 // TODO(turnidge): Drop the 'id' for things like DebuggerEvent. |
| 536 jsobj.AddProperty("id", ""); | 538 jsobj.AddProperty("id", ""); |
| 537 jsobj.AddProperty("eventType", EventTypeToCString(type())); | 539 jsobj.AddProperty("eventType", EventTypeToCString(type())); |
| 538 jsobj.AddProperty("isolate", isolate()); | 540 jsobj.AddProperty("isolate", isolate()); |
| 539 if ((type() == kBreakpointResolved || type() == kBreakpointReached) && | 541 if ((type() == kBreakpointResolved || type() == kBreakpointReached) && |
| 540 breakpoint() != NULL) { | 542 breakpoint() != NULL) { |
| 543 // TODO(turnidge): Make this a breakpoint ref. |
| 541 jsobj.AddProperty("breakpoint", breakpoint()); | 544 jsobj.AddProperty("breakpoint", breakpoint()); |
| 542 } | 545 } |
| 543 if (type() == kExceptionThrown) { | 546 if (type() == kExceptionThrown) { |
| 544 jsobj.AddProperty("exception", *(exception())); | 547 jsobj.AddProperty("exception", *(exception())); |
| 545 } | 548 } |
| 546 } | 549 } |
| 547 | 550 |
| 548 | 551 |
| 549 ActivationFrame* DebuggerStackTrace::GetHandlerFrame( | 552 ActivationFrame* DebuggerStackTrace::GetHandlerFrame( |
| 550 const Instance& exc_obj) const { | 553 const Instance& exc_obj) const { |
| (...skipping 2077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2628 } | 2631 } |
| 2629 | 2632 |
| 2630 | 2633 |
| 2631 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 2634 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 2632 ASSERT(bpt->next() == NULL); | 2635 ASSERT(bpt->next() == NULL); |
| 2633 bpt->set_next(code_breakpoints_); | 2636 bpt->set_next(code_breakpoints_); |
| 2634 code_breakpoints_ = bpt; | 2637 code_breakpoints_ = bpt; |
| 2635 } | 2638 } |
| 2636 | 2639 |
| 2637 } // namespace dart | 2640 } // namespace dart |
| OLD | NEW |