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

Side by Side Diff: runtime/lib/stacktrace.cc

Issue 12381030: Fix stack frame index numbers for full stack traces (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« no previous file with comments | « no previous file | runtime/vm/object.h » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "lib/error.h" 5 #include "lib/error.h"
6 6
7 #include "vm/bootstrap_natives.h" 7 #include "vm/bootstrap_natives.h"
8 #include "vm/exceptions.h" 8 #include "vm/exceptions.h"
9 #include "vm/object_store.h" 9 #include "vm/object_store.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 10 matching lines...) Expand all
21 return trace.FullStacktrace(); 21 return trace.FullStacktrace();
22 } 22 }
23 23
24 24
25 // Get a concise and pertinent stack trace. 25 // Get a concise and pertinent stack trace.
26 // Arg0: stack trace object. 26 // Arg0: stack trace object.
27 // Return value: String that represents the concise and pertinent stack trace. 27 // Return value: String that represents the concise and pertinent stack trace.
28 DEFINE_NATIVE_ENTRY(Stacktrace_getStacktrace, 1) { 28 DEFINE_NATIVE_ENTRY(Stacktrace_getStacktrace, 1) {
29 const Stacktrace& trace = 29 const Stacktrace& trace =
30 Stacktrace::CheckedHandle(arguments->NativeArgAt(0)); 30 Stacktrace::CheckedHandle(arguments->NativeArgAt(0));
31 return String::New(trace.ToCStringInternal()); 31 return String::New(trace.ToCStringInternal(0));
32 } 32 }
33 33
34 34
35 // Setup a full stack trace. 35 // Setup a full stack trace.
36 // Arg0: stack trace object. 36 // Arg0: stack trace object.
37 // Return value: None. 37 // Return value: None.
38 DEFINE_NATIVE_ENTRY(Stacktrace_setupFullStacktrace, 1) { 38 DEFINE_NATIVE_ENTRY(Stacktrace_setupFullStacktrace, 1) {
39 const Stacktrace& trace = 39 const Stacktrace& trace =
40 Stacktrace::CheckedHandle(arguments->NativeArgAt(0)); 40 Stacktrace::CheckedHandle(arguments->NativeArgAt(0));
41 const GrowableObjectArray& func_list = 41 const GrowableObjectArray& func_list =
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 const Array& func_array = Array::Handle(Array::MakeArray(func_list)); 95 const Array& func_array = Array::Handle(Array::MakeArray(func_list));
96 const Array& code_array = Array::Handle(Array::MakeArray(code_list)); 96 const Array& code_array = Array::Handle(Array::MakeArray(code_list));
97 const Array& pc_offset_array = 97 const Array& pc_offset_array =
98 Array::Handle(Array::MakeArray(pc_offset_list)); 98 Array::Handle(Array::MakeArray(pc_offset_list));
99 trace.SetCatchStacktrace(func_array, code_array, pc_offset_array); 99 trace.SetCatchStacktrace(func_array, code_array, pc_offset_array);
100 return Object::null(); 100 return Object::null();
101 } 101 }
102 102
103 } // namespace dart 103 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698