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

Unified Diff: runtime/vm/service.cc

Issue 2603383004: Sane asynchronous debugging and stack traces (Closed)
Patch Set: rebase Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/scopes.cc ('k') | runtime/vm/service/service.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index bdc71e989bc89aeac33119903309465443afa505..e43f64ec8e75f5942bf1248cefe4a9a1f624b06e 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -1334,6 +1334,9 @@ static bool GetStack(Thread* thread, JSONStream* js) {
}
ASSERT(isolate->compilation_allowed());
DebuggerStackTrace* stack = isolate->debugger()->StackTrace();
+ DebuggerStackTrace* async_return_stack =
+ isolate->debugger()->AsyncReturnStack();
+
// Do we want the complete script object and complete local variable objects?
// This is true for dump requests.
const bool full = BoolParameter::Parse(js->LookupParam("_full"), false);
@@ -1351,6 +1354,18 @@ static bool GetStack(Thread* thread, JSONStream* js) {
}
}
+ if (async_return_stack != NULL) {
+ JSONArray jsarr(&jsobj, "asyncFrames");
+
+ intptr_t num_frames = async_return_stack->Length();
+ for (intptr_t i = 0; i < num_frames; i++) {
+ ActivationFrame* frame = async_return_stack->FrameAt(i);
+ JSONObject jsobj(&jsarr);
+ frame->PrintToJSONObject(&jsobj, full);
+ jsobj.AddProperty("index", i);
+ }
+ }
+
{
MessageHandler::AcquiredQueues aq(isolate->message_handler());
jsobj.AddProperty("messages", aq.queue());
« no previous file with comments | « runtime/vm/scopes.cc ('k') | runtime/vm/service/service.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698