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

Unified Diff: runtime/vm/compiler.cc

Issue 8983034: Getting value of local variables on stack trace (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 12 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 | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 3014)
+++ runtime/vm/compiler.cc (working copy)
@@ -179,6 +179,20 @@
PcDescriptors::Handle(code.pc_descriptors());
OS::Print("%s", descriptors.ToCString());
OS::Print("}\n");
+ OS::Print("Variable Descriptors for function '%s' {\n", function_fullname);
+ const LocalVarDescriptors& var_descriptors =
+ LocalVarDescriptors::Handle(code.var_descriptors());
+ intptr_t var_desc_length = var_descriptors.Length();
+ String& var_name = String::Handle();
+ for (intptr_t i = 0; i < var_desc_length; i++) {
+ var_name = var_descriptors.GetName(i);
+ intptr_t scope_id, ignore;
+ var_descriptors.GetScopeInfo(i, &scope_id, &ignore, &ignore);
+ intptr_t slot = var_descriptors.GetSlotIndex(i);
+ OS::Print(" var %s scope %ld offset %ld\n",
+ var_name.ToCString(), scope_id, slot);
+ }
+ OS::Print("}\n");
OS::Print("Exception Handlers for function '%s' {\n", function_fullname);
const ExceptionHandlers& handlers =
ExceptionHandlers::Handle(code.exception_handlers());
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698