• javascriptcore调试笔记


    dwfault tql

    1.输出各阶段的asm

    /Tools/Scripts/run-jsc <arg> /path/to/jsfile &> ~/out

    其中arg可以为

    JSC_dumpDisassembly = true    转储所有JIT编译函数的反汇编。
    JSC_dumpDFGDisassembly = true    转储DFG和FTL编译函数的反汇编。
    JSC_dumpFTLDisassembly = true    转储FTL编译函数的反汇编。
    JSC_dumpSourceAtDFGTime = true    转储DFG/FTL编译函数的来源。
    JSC_dumpBytecodeAtDFGTime = true    转储DFG/FTL编译函数的字节码。
    JSC_dumpGraphAfterParsing = true    在DFG/FTL编译时解析函数字节码后转储DFG图。
    JSC_dumpGraphAtEachPhase = true    在DFG/FTL编译的每个阶段之后转储DFG图。

    一例

    ./Tools/Scripts/run-jsc --JSC_dumpDisassembly=true --JSC_dumpDFGDisassembly=true --JSC_dumpFTLDisassembly=true --JSC_dumpSourceAtDFGTime=true --JSC_dumpBytecodeAtDFGTime=true --JSC_dumpGraphAfterParsing=true --JSC_dumpGraphAtEachPhase=true /home/r00t/workspace/poc3.js &> ~/log

    https://webkit.org/blog/6411/

    2.lldb输出崩溃信息

    bugreport unwind -outfile </path/to/logfile>

     也可以在lldb shell里使用log enable,语法

    log enable <cmd-options> <log-channel> <log-category> [<log-category> [...]]

    一例

    log enable lldb all -f ~/test

     3.js代码断点(类似v8的%SystemBreak();)

    b arrayProtoFuncSlice

    在js代码中调用

    Array.prototype.slice([]);
  • 相关阅读:
    Python与常见加密方式
    ERROR 2002 (HY000):Can't connect to local MySQL server though socket '/var/lib/mysql/mysql.sock'(2)
    hive的分区表
    内部表和外部表的区别
    hive之SQL
    执行wc的时候提示连接被拒绝。Connection refused
    hive的简介
    hive的部署
    top命令信息
    web界面解读
  • 原文地址:https://www.cnblogs.com/snip3r/p/12894735.html
Copyright © 2020-2023  润新知