Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 3675bfb32ff3382e8771900b79c80636bf4cdfb1..66a547261a5e898d6494427eebd6f987ac17a0a5 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -10659,7 +10659,17 @@ RawLibrary* Library::NewLibraryHelper(const String& url, bool import_core_lib) { |
result.set_native_entry_symbol_resolver(NULL); |
result.set_is_in_fullsnapshot(false); |
result.StoreNonPointer(&result.raw_ptr()->corelib_imported_, true); |
- result.set_debuggable(!dart_private_scheme); |
+ if (dart_private_scheme) { |
+ // Never debug dart:_ libraries. |
+ result.set_debuggable(false); |
+ } else if (dart_scheme) { |
+ // Only debug dart: libraries if we have been requested to show invisible |
+ // frames. |
+ result.set_debuggable(FLAG_show_invisible_frames); |
+ } else { |
+ // Default to debuggable for all other libraries. |
+ result.set_debuggable(true); |
+ } |
result.set_is_dart_scheme(dart_scheme); |
result.StoreNonPointer(&result.raw_ptr()->load_state_, |
RawLibrary::kAllocated); |
@@ -14066,6 +14076,16 @@ RawCode* Code::GetStaticCallTargetCodeAt(uword pc) const { |
} |
+void Code::SetAwaitTokenPositions(const Array& await_token_positions) const { |
+#if defined(DART_PRECOMPILED_RUNTIME) |
+ UNREACHABLE(); |
+#else |
+ ASSERT(await_token_positions.IsOld()); |
+ StorePointer(&raw_ptr()->await_token_positions_, await_token_positions.raw()); |
+#endif |
+} |
+ |
+ |
void Code::SetStaticCallTargetCodeAt(uword pc, const Code& code) const { |
#if defined(DART_PRECOMPILED_RUNTIME) |
UNREACHABLE(); |
@@ -22625,8 +22645,16 @@ const char* StackTrace::ToCStringInternal(intptr_t* frame_index, |
intptr_t total_len = 0; |
GrowableArray<char*> frame_strings; |
for (intptr_t i = 0; (i < Length()) && (*frame_index < max_frames); i++) { |
+ code = CodeAtFrame(i); |
function = FunctionAtFrame(i); |
- if (function.IsNull()) { |
+ if (code.raw() == StubCode::AsynchronousGapMarker_entry()->code()) { |
+ const char* kAsynchronousGap = "<asynchronous suspension>\n"; |
+ intptr_t asynchronous_gap_len = strlen(kAsynchronousGap) + 1; |
+ char* chars = zone->Alloc<char>(asynchronous_gap_len); |
+ OS::SNPrint(chars, asynchronous_gap_len, "%s", kAsynchronousGap); |
+ frame_strings.Add(chars); |
+ total_len += asynchronous_gap_len; |
+ } else if (function.IsNull()) { |
// Check for a null function, which indicates a gap in a StackOverflow or |
// OutOfMemory trace. |
if ((i < (Length() - 1)) && |
@@ -22642,7 +22670,6 @@ const char* StackTrace::ToCStringInternal(intptr_t* frame_index, |
(*frame_index) += Smi::Value(PcOffsetAtFrame(i)); |
} |
} else { |
- code = CodeAtFrame(i); |
ASSERT(function.raw() == code.function()); |
uword pc = code.PayloadStart() + Smi::Value(PcOffsetAtFrame(i)); |
if (code.is_optimized() && expand_inlined() && |