Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: runtime/vm/debugger.cc

Issue 1033483002: Separate is_debuggable and is_visible again. The outer async functions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 VariableAt(v, &var_name, &unused, &unused, &var_value); 891 VariableAt(v, &var_name, &unused, &unused, &var_value);
892 jsvar.AddProperty("name", var_name.ToCString()); 892 jsvar.AddProperty("name", var_name.ToCString());
893 jsvar.AddProperty("value", var_value); 893 jsvar.AddProperty("value", var_value);
894 } 894 }
895 } 895 }
896 } 896 }
897 897
898 898
899 899
900 void DebuggerStackTrace::AddActivation(ActivationFrame* frame) { 900 void DebuggerStackTrace::AddActivation(ActivationFrame* frame) {
901 if (FLAG_show_invisible_frames || frame->function().is_debuggable()) { 901 if (FLAG_show_invisible_frames || frame->function().is_visible()) {
902 trace_.Add(frame); 902 trace_.Add(frame);
903 } 903 }
904 } 904 }
905 905
906 906
907 const uint8_t kSafepointKind = 907 const uint8_t kSafepointKind =
908 RawPcDescriptors::kIcCall | RawPcDescriptors::kOptStaticCall | 908 RawPcDescriptors::kIcCall | RawPcDescriptors::kOptStaticCall |
909 RawPcDescriptors::kUnoptStaticCall | RawPcDescriptors::kClosureCall | 909 RawPcDescriptors::kUnoptStaticCall | RawPcDescriptors::kClosureCall |
910 RawPcDescriptors::kRuntimeCall; 910 RawPcDescriptors::kRuntimeCall;
911 911
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 const Array& deopt_frame = Array::Handle(); 1310 const Array& deopt_frame = Array::Handle();
1311 const intptr_t deopt_frame_offset = -1; 1311 const intptr_t deopt_frame_offset = -1;
1312 1312
1313 for (intptr_t i = 0; i < ex_trace.Length(); i++) { 1313 for (intptr_t i = 0; i < ex_trace.Length(); i++) {
1314 function = ex_trace.FunctionAtFrame(i); 1314 function = ex_trace.FunctionAtFrame(i);
1315 // Pre-allocated Stacktraces may include empty slots, either (a) to indicate 1315 // Pre-allocated Stacktraces may include empty slots, either (a) to indicate
1316 // where frames were omitted in the case a stack has more frames than the 1316 // where frames were omitted in the case a stack has more frames than the
1317 // pre-allocated trace (such as a stack overflow) or (b) because a stack has 1317 // pre-allocated trace (such as a stack overflow) or (b) because a stack has
1318 // fewer frames that the pre-allocated trace (such as memory exhaustion with 1318 // fewer frames that the pre-allocated trace (such as memory exhaustion with
1319 // a shallow stack). 1319 // a shallow stack).
1320 if (!function.IsNull() && function.is_debuggable()) { 1320 if (!function.IsNull() && function.is_visible()) {
1321 code = ex_trace.CodeAtFrame(i); 1321 code = ex_trace.CodeAtFrame(i);
1322 ASSERT(function.raw() == code.function()); 1322 ASSERT(function.raw() == code.function());
1323 uword pc = code.EntryPoint() + Smi::Value(ex_trace.PcOffsetAtFrame(i)); 1323 uword pc = code.EntryPoint() + Smi::Value(ex_trace.PcOffsetAtFrame(i));
1324 if (code.is_optimized() && ex_trace.expand_inlined()) { 1324 if (code.is_optimized() && ex_trace.expand_inlined()) {
1325 // Traverse inlined frames. 1325 // Traverse inlined frames.
1326 for (InlinedFunctionsIterator it(code, pc); !it.Done(); it.Advance()) { 1326 for (InlinedFunctionsIterator it(code, pc); !it.Done(); it.Advance()) {
1327 function = it.function(); 1327 function = it.function();
1328 code = it.code(); 1328 code = it.code();
1329 ASSERT(function.raw() == code.function()); 1329 ASSERT(function.raw() == code.function());
1330 uword pc = it.pc(); 1330 uword pc = it.pc();
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
2638 } 2638 }
2639 2639
2640 2640
2641 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 2641 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
2642 ASSERT(bpt->next() == NULL); 2642 ASSERT(bpt->next() == NULL);
2643 bpt->set_next(code_breakpoints_); 2643 bpt->set_next(code_breakpoints_);
2644 code_breakpoints_ = bpt; 2644 code_breakpoints_ = bpt;
2645 } 2645 }
2646 2646
2647 } // namespace dart 2647 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/observatory/test/async_generator_breakpoint_test.dart ('k') | runtime/vm/megamorphic_cache_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698