开发者

Flash ABC : What does the number part of <file>.as$<number> in a swfdump

开发者 https://www.devze.com 2023-02-20 01:46 出处:网络
If I take a swf, and run it through swfdump swfdump.exe -abc file.swf > ABC.txt One the first run I may get some output in ABC.txt like this

If I take a swf, and run it through swfdump

swfdump.exe -abc file.swf > ABC.txt

One the first run I may get some output in ABC.txt like this

ObjectConfig.as$60

And on a subsequent run of the same SWF get a different output

Object开发者_开发知识库Config.as$61

What is the meaning of the number after the $ ?


This is part of the debug metadata that the mxmlc compiler adds to the bytecode when you do a debug compile, debug=true. If you do a normal release compile, this info is omitted.

This metadata stores filenames and line numbers so that you can see the location in your source while debugging. Although I'm not sure on the exact meaning of these particular numbers, they seem to be a unique identifier or index of that file for the debugger, perhaps in case of two classes with the same name.


The best I can see is in the source code for swfdump, it calls swf_GetString. Somewhere in this chain it adds what looks like a debugLine or a scopeDepth to the end of the class name:

char* swf_GetString(TAG*t)
{
    int pos = t->pos;
    while(t->pos < t->len && swf_GetU8(t));
    /* make sure we always have a trailing zero byte */
    if(t->pos == t->len) {
      if(t->len == t->memsize) {
    swf_ResetWriteBits(t);
    swf_SetU8(t, 0);
    t->len = t->pos;
      }
      t->data[t->len] = 0;
    }
    return (char*)&(t->data[pos]);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消