> Hi, > How to dump SquirrelFish opcode and machine code? > Here is what I would like to do, for each JS file that WebCore passes to > SquirrelFish, configure SquirrelFish to dump opcode and machine code. > > Thank you for any tips.
I am not sure you can do SF byte code dump out of the box since SF opcode dump is only availible if you build your standalone JavaScriptCore in debug mode. In that case you just have to pass -d option to jsc. Fortunately, all neccessary helper functions can be found here: JavaScriptCore/bytecode/CodeBlock.cpp : CodeBlock::dump You only need to do some hand coding to make it available under WebCore, and perhaps dump the output into a file instead of the console. Machine code dump is not supported by JavaScriptCore. However, all machine code goes through this function: JavaScriptCore/assembler/AssemblerBuffer.h : AssemblerBuffer::executableCopy You can dump the raw x86 code here, and a disassembler can do the rest of the work. Zoltan _______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

