Flutter Engine
The Flutter Engine
|
This package provides libraries and a utility for decoding non-symbolic stack traces generated by an AOT-compiled Dart application.
In some modes of AOT compilation, information on mapping execution points to source locations is no longer stored in the Dart image. Instead, this information is translated to separately stored debugging information. This debugging information can then be stripped from the application before shipping.
However, there is a drawback. Stack traces generated by such an application no longer includes file, function, and line number information (i.e., symbolic stack traces). Instead, stack trace frames simply include program counter information. Thus, to find the source information for these frames, we must use the debugging information. This means either keeping the original unstripped application, or saving the debugging information into a separate file.
Given this debugging information, the libraries in this package can turn non-symbolic stack traces back into symbolic stack traces. In addition, this package includes a command line tool decode
whose output is the same as its input except that non-symbolic stack traces are translated.
Take the following Dart code, which we put in throws.dart
. The inlining pragmas are here just to ensure that bar
is inlined into foo
and that foo
is not inlined into bar
, to illustrate how inlined code is handled in the translated output.
Now we run the following commands:
Please file feature requests and bugs at the issue tracker.