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 "vm/code_index_table.h" |
7 #include "vm/code_generator.h" | 8 #include "vm/code_generator.h" |
8 #include "vm/code_patcher.h" | 9 #include "vm/code_patcher.h" |
9 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
10 #include "vm/dart_entry.h" | 11 #include "vm/dart_entry.h" |
11 #include "vm/flags.h" | 12 #include "vm/flags.h" |
12 #include "vm/globals.h" | 13 #include "vm/globals.h" |
13 #include "vm/longjump.h" | 14 #include "vm/longjump.h" |
14 #include "vm/object.h" | 15 #include "vm/object.h" |
15 #include "vm/object_store.h" | 16 #include "vm/object_store.h" |
16 #include "vm/os.h" | 17 #include "vm/os.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 function_(Function::ZoneHandle()), | 94 function_(Function::ZoneHandle()), |
94 token_index_(-1), | 95 token_index_(-1), |
95 line_number_(-1), | 96 line_number_(-1), |
96 var_descriptors_(NULL), | 97 var_descriptors_(NULL), |
97 desc_indices_(8) { | 98 desc_indices_(8) { |
98 } | 99 } |
99 | 100 |
100 | 101 |
101 const Function& ActivationFrame::DartFunction() { | 102 const Function& ActivationFrame::DartFunction() { |
102 if (function_.IsNull()) { | 103 if (function_.IsNull()) { |
103 Isolate* isolate = Isolate::Current(); | 104 ASSERT(Isolate::Current() != NULL); |
104 ASSERT(isolate != NULL); | 105 CodeIndexTable* code_index_table = Isolate::Current()->code_index_table(); |
105 const Code& code = Code::Handle(StackFrame::LookupCode(isolate, pc_)); | 106 ASSERT(code_index_table != NULL); |
| 107 const Code& code = Code::Handle(code_index_table->LookupCode(pc_)); |
106 function_ = code.function(); | 108 function_ = code.function(); |
107 } | 109 } |
108 return function_; | 110 return function_; |
109 } | 111 } |
110 | 112 |
111 | 113 |
112 const char* Debugger::QualifiedFunctionName(const Function& func) { | 114 const char* Debugger::QualifiedFunctionName(const Function& func) { |
113 const String& func_name = String::Handle(func.name()); | 115 const String& func_name = String::Handle(func.name()); |
114 Class& func_class = Class::Handle(func.owner()); | 116 Class& func_class = Class::Handle(func.owner()); |
115 String& class_name = String::Handle(func_class.Name()); | 117 String& class_name = String::Handle(func_class.Name()); |
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1096 } | 1098 } |
1097 | 1099 |
1098 | 1100 |
1099 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 1101 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
1100 ASSERT(bpt->next() == NULL); | 1102 ASSERT(bpt->next() == NULL); |
1101 bpt->set_next(code_breakpoints_); | 1103 bpt->set_next(code_breakpoints_); |
1102 code_breakpoints_ = bpt; | 1104 code_breakpoints_ = bpt; |
1103 } | 1105 } |
1104 | 1106 |
1105 } // namespace dart | 1107 } // namespace dart |
OLD | NEW |