# Abcdump for Flash Player

**URL:** <https://forum.kirupa.com/t/abcdump-for-flash-player/309023>\
**Category:** Uncategorized\
**Created:** [May 5, 2010, 7:16am UTC](https://forum.kirupa.com/t/abcdump-for-flash-player/309023 "2010-05-05T07:16:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![krilnon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/krilnon/32/34_2.png) [@krilnon](https://forum.kirupa.com/u/krilnon)\
**Post date:** [May 5, 2010, 7:16am UTC](https://forum.kirupa.com/t/abcdump-for-flash-player/309023/1 "2010-05-05T07:16:36Z")

</div>

Has anyone converted Adobe’s bytecode dumper _[abcdump.as (as seen here)](http://hg.mozilla.org/tamarin-central/file/fbecf6c8a86f/utils/abcdump.as)_ so that it’ll work with an ActionScript compiler that targets Flash Player? The one that’s distributed in the Tamarin source is targeted at _avmplus_ standalone. That’s fine, but I want to use it in a SWF that’s running in Flash Player. I made a conversion attempt myself just now, but it doesn’t seem to work correctly, so I was wondering if someone had already done the conversion before me.

If not, here’s my first stab at a conversion: [http://temp.reclipse.net/ABCDump.as](http://temp.reclipse.net/ABCDump.as)

The notable changes that I made are:  
[LIST]  
[_]changed ‘print’ to ‘trace’  
[_]moved everything out of the package block, because you’re only allowed one externally visible definition with this ASC  
[_]created a dummy ABCDump class that operates on a ABC file ByteArray that’s passed in  
[_]renamed ‘abc-constants.as’ because Flash Builder was complaining, but I changed the `include` statement to reflect that change  
[_]removed the tail section marked “// main”, since I’m passing ABC ByteArrays directly to the ABCDump constructor and making Abc instances from there  
[_]commented out most/all of the `throw` statements  
[/LIST]

The output that I get looks something like this:

```auto
/* ABC ByteArray size: 2095 */
// magic 1000000
// Cpool numbers size 874 41 %
// Cpool strings count 28 size 829 39 %
// Cpool namespaces count 8 size 8 0 %
// Cpool nssets count 9 size 85 4 %
// Cpool names count 11 size 11 0 %

```

Obviously it’s not a great idea to comment out the `throw`s, but I wasn’t getting any output other than that magic constant until I started removing them, because it didn’t like the constant. The output suggests that the parser is making sense of at least _some_ of the ABC file, but not all of it.

Anyway, it’d be neat if someone has already done this, or wants to help convert it with me. 🙂
