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

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

Issue 9117042: Fix local variable info in debugger stack trace. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/debugger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_index_table.h" 10 #include "vm/code_index_table.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 PcDescriptors::Handle(code.pc_descriptors()); 179 PcDescriptors::Handle(code.pc_descriptors());
180 OS::Print("%s", descriptors.ToCString()); 180 OS::Print("%s", descriptors.ToCString());
181 OS::Print("}\n"); 181 OS::Print("}\n");
182 OS::Print("Variable Descriptors for function '%s' {\n", function_fullname); 182 OS::Print("Variable Descriptors for function '%s' {\n", function_fullname);
183 const LocalVarDescriptors& var_descriptors = 183 const LocalVarDescriptors& var_descriptors =
184 LocalVarDescriptors::Handle(code.var_descriptors()); 184 LocalVarDescriptors::Handle(code.var_descriptors());
185 intptr_t var_desc_length = var_descriptors.Length(); 185 intptr_t var_desc_length = var_descriptors.Length();
186 String& var_name = String::Handle(); 186 String& var_name = String::Handle();
187 for (intptr_t i = 0; i < var_desc_length; i++) { 187 for (intptr_t i = 0; i < var_desc_length; i++) {
188 var_name = var_descriptors.GetName(i); 188 var_name = var_descriptors.GetName(i);
189 intptr_t scope_id, ignore; 189 intptr_t scope_id, begin_pos, end_pos;
190 var_descriptors.GetScopeInfo(i, &scope_id, &ignore, &ignore); 190 var_descriptors.GetScopeInfo(i, &scope_id, &begin_pos, &end_pos);
191 intptr_t slot = var_descriptors.GetSlotIndex(i); 191 intptr_t slot = var_descriptors.GetSlotIndex(i);
192 OS::Print(" var %s scope %ld offset %ld\n", 192 OS::Print(" var %s scope %ld (valid %d-%d) offset %ld\n",
193 var_name.ToCString(), scope_id, slot); 193 var_name.ToCString(), scope_id, begin_pos, end_pos, slot);
194 } 194 }
195 OS::Print("}\n"); 195 OS::Print("}\n");
196 OS::Print("Exception Handlers for function '%s' {\n", function_fullname); 196 OS::Print("Exception Handlers for function '%s' {\n", function_fullname);
197 const ExceptionHandlers& handlers = 197 const ExceptionHandlers& handlers =
198 ExceptionHandlers::Handle(code.exception_handlers()); 198 ExceptionHandlers::Handle(code.exception_handlers());
199 OS::Print("%s", handlers.ToCString()); 199 OS::Print("%s", handlers.ToCString());
200 OS::Print("}\n"); 200 OS::Print("}\n");
201 } 201 }
202 } 202 }
203 203
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 kNoArgumentNames)); 279 kNoArgumentNames));
280 if (result.IsUnhandledException()) { 280 if (result.IsUnhandledException()) {
281 // TODO(srdjan): implement proper exit from compiler. 281 // TODO(srdjan): implement proper exit from compiler.
282 UNIMPLEMENTED(); 282 UNIMPLEMENTED();
283 } 283 }
284 return result.raw(); 284 return result.raw();
285 } 285 }
286 286
287 287
288 } // namespace dart 288 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698