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

Issue 10826191: Improve the stack trace output to be more readable. (Closed)

Created:
8 years, 4 months ago by turnidge
Modified:
8 years, 4 months ago
Reviewers:
siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Improve the stack trace output to be more readable. BEFORE Unhandled exception: MyException 0. Function: '::baz' url: 'file:///Users/turnidge/dart/bug.dart' line:2 col:3 1. Function: '_OtherClass@11f7ef14._OtherClass@11f7ef14._named@11f7ef14' url: 'file:///Users/turnidge/dart/bug.dart' line:7 col:8 2. Function: '::set:globalVar' url: 'file:///Users/turnidge/dart/bug.dart' line:12 col:3 3. Function: '::_bar@11f7ef14' url: 'file:///Users/turnidge/dart/bug.dart' line:16 col:3 4. Function: 'MyClass.get:field' url: 'file:///Users/turnidge/dart/bug.dart' line:25 col:9 5. Function: 'MyClass.fooHelper' url: 'file:///Users/turnidge/dart/bug.dart' line:30 col:7 6. Function: 'MyClass.foo' url: 'file:///Users/turnidge/dart/bug.dart' line:32 col:14 7. Function: 'MyClass.function' url: 'file:///Users/turnidge/dart/bug.dart' line:21 col:15 8. Function: 'MyClass.MyClass.' url: 'file:///Users/turnidge/dart/bug.dart' line:21 col:18 9. Function: '::function' url: 'file:///Users/turnidge/dart/bug.dart' line:38 col:10 10. Function: '::main' url: 'file:///Users/turnidge/dart/bug.dart' line:38 col:24 AFTER Unhandled exception: MyException #0 baz (file:///Users/turnidge/dart/bug.dart:2:3) #1 _OtherClass._OtherClass._named (file:///Users/turnidge/dart/bug.dart:7:8) #2 globalVar= (file:///Users/turnidge/dart/bug.dart:12:3) #3 _bar (file:///Users/turnidge/dart/bug.dart:16:3) #4 MyClass.field (file:///Users/turnidge/dart/bug.dart:25:9) #5 MyClass.foo.fooHelper (file:///Users/turnidge/dart/bug.dart:30:7) #6 MyClass.foo (file:///Users/turnidge/dart/bug.dart:32:14) #7 MyClass.MyClass.<anonymous closure> (file:///Users/turnidge/dart/bug.dart:21:15) #8 MyClass.MyClass (file:///Users/turnidge/dart/bug.dart:21:18) #9 main.<anonymous closure> (file:///Users/turnidge/dart/bug.dart:38:10) #10 main (file:///Users/turnidge/dart/bug.dart:38:24) Committed: https://code.google.com/p/dart/source/detail?r=10408

Patch Set 1 #

Total comments: 12

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+217 lines, -151 lines) Patch
M platform/assert.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/vm/dart/isolate_mirror_local_test.dart View 1 2 7 chunks +7 lines, -11 lines 0 comments Download
M vm/dart_api_impl.cc View 1 2 10 chunks +8 lines, -111 lines 0 comments Download
M vm/dart_api_impl_test.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M vm/object.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M vm/object.cc View 1 2 7 chunks +132 lines, -24 lines 0 comments Download
M vm/object_test.cc View 1 2 1 chunk +60 lines, -0 lines 0 comments Download
M vm/parser.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M vm/symbols.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
turnidge
8 years, 4 months ago (2012-08-07 20:39:24 UTC) #1
siva
lgtm https://chromiumcodereview.appspot.com/10826191/diff/1/vm/object.cc File vm/object.cc (right): https://chromiumcodereview.appspot.com/10826191/diff/1/vm/object.cc#newcode109 vm/object.cc:109: // Internal getter and setter prefices are removed: ...
8 years, 4 months ago (2012-08-07 21:41:37 UTC) #2
turnidge
8 years, 4 months ago (2012-08-07 23:32:09 UTC) #3
https://chromiumcodereview.appspot.com/10826191/diff/1/vm/object.cc
File vm/object.cc (right):

https://chromiumcodereview.appspot.com/10826191/diff/1/vm/object.cc#newcode109
vm/object.cc:109: // Internal getter and setter prefices are removed:
On 2012/08/07 21:41:37, asiva wrote:
> prefixes

Done.

https://chromiumcodereview.appspot.com/10826191/diff/1/vm/object.cc#newcode112
vm/object.cc:112: //   set:foo -> foo
Discussed offline.  For now this lets me share the pretty name with the
embedding api, mirrors, and stack traces.  From talking with Gilad, I believe
that foo= will be the official name for the setter from a spec perspective.  For
now we will commit is as is and change it if it is confusing.

On 2012/08/07 21:41:37, asiva wrote:
> I am wondering get:foo should become 'get foo' and
> set:foo converted to 'set foo' in order to match the source code and have some
> way of differentiating setters from getters. What do you think?

https://chromiumcodereview.appspot.com/10826191/diff/1/vm/object.cc#newcode154
vm/object.cc:154: result = String::SubString(name, start, (limit - start));
On 2012/08/07 21:41:37, asiva wrote:
> const String& result = String::Handle(String::Sub.......)
> like the suffix setting below?

Done.

https://chromiumcodereview.appspot.com/10826191/diff/1/vm/object.cc#newcode4452
vm/object.cc:4452: tmp = String::Concat(tmp, suffix);
On 2012/08/07 21:41:37, asiva wrote:
> See comment above regarding setter/gettter, does it make sense to match the
> source code?

See above.

https://chromiumcodereview.appspot.com/10826191/diff/1/vm/object.cc#newcode11023
vm/object.cc:11023: const char* kFormat = "    at %s (%s:%d:%d)\n";
Replaced "at" with a frame number.

On 2012/08/07 21:41:37, asiva wrote:
> Looking at the sample output you have attached I am not sure adding the 'at'
> string to the stack trace adds any value.
> 
> Also I was wondering if we have recursive calls then it might be useful to
have
> the frame number in the trace as it provides a reference number.

https://chromiumcodereview.appspot.com/10826191/diff/1/vm/object_test.cc
File vm/object_test.cc (right):

https://chromiumcodereview.appspot.com/10826191/diff/1/vm/object_test.cc#newc...
vm/object_test.cc:2858: "    at baz (dart:test-lib:2:3)\n"
Discussed offline.  Will leave as is.

On 2012/08/07 21:41:37, asiva wrote:
> There seems to be too many ':' characters do you think it would be better if
you
> just had
> (dart:test-lib 2:3)

Powered by Google App Engine
This is Rietveld 408576698