| 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 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 jsobj->AddProperty("tokenPos", TokenPos()); | 903 jsobj->AddProperty("tokenPos", TokenPos()); |
| 904 jsobj->AddProperty("function", function(), !full); | 904 jsobj->AddProperty("function", function(), !full); |
| 905 jsobj->AddProperty("code", code()); | 905 jsobj->AddProperty("code", code()); |
| 906 { | 906 { |
| 907 JSONArray jsvars(jsobj, "vars"); | 907 JSONArray jsvars(jsobj, "vars"); |
| 908 const int num_vars = NumLocalVariables(); | 908 const int num_vars = NumLocalVariables(); |
| 909 for (intptr_t v = 0; v < num_vars; v++) { | 909 for (intptr_t v = 0; v < num_vars; v++) { |
| 910 JSONObject jsvar(&jsvars); | 910 JSONObject jsvar(&jsvars); |
| 911 String& var_name = String::Handle(); | 911 String& var_name = String::Handle(); |
| 912 Instance& var_value = Instance::Handle(); | 912 Instance& var_value = Instance::Handle(); |
| 913 intptr_t unused; | 913 intptr_t token_pos; |
| 914 VariableAt(v, &var_name, &unused, &unused, &var_value); | 914 intptr_t end_token_pos; |
| 915 VariableAt(v, &var_name, &token_pos, &end_token_pos, &var_value); |
| 915 jsvar.AddProperty("name", var_name.ToCString()); | 916 jsvar.AddProperty("name", var_name.ToCString()); |
| 916 jsvar.AddProperty("value", var_value, !full); | 917 jsvar.AddProperty("value", var_value, !full); |
| 918 jsvar.AddProperty("tokenPos", token_pos); |
| 919 jsvar.AddProperty("endTokenPos", end_token_pos); |
| 917 } | 920 } |
| 918 } | 921 } |
| 919 } | 922 } |
| 920 | 923 |
| 921 | 924 |
| 922 | 925 |
| 923 void DebuggerStackTrace::AddActivation(ActivationFrame* frame) { | 926 void DebuggerStackTrace::AddActivation(ActivationFrame* frame) { |
| 924 if (FLAG_show_invisible_frames || frame->function().is_visible()) { | 927 if (FLAG_show_invisible_frames || frame->function().is_visible()) { |
| 925 trace_.Add(frame); | 928 trace_.Add(frame); |
| 926 } | 929 } |
| (...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2692 } | 2695 } |
| 2693 | 2696 |
| 2694 | 2697 |
| 2695 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 2698 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 2696 ASSERT(bpt->next() == NULL); | 2699 ASSERT(bpt->next() == NULL); |
| 2697 bpt->set_next(code_breakpoints_); | 2700 bpt->set_next(code_breakpoints_); |
| 2698 code_breakpoints_ = bpt; | 2701 code_breakpoints_ = bpt; |
| 2699 } | 2702 } |
| 2700 | 2703 |
| 2701 } // namespace dart | 2704 } // namespace dart |
| OLD | NEW |