zoukankan      html  css  js  c++  java
  • 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([]);
  • 相关阅读:
    java 数字补齐0
    Ubuntu 12.04中文输入法的安装
    mac 更改word的默认显示比例为125
    接口测试的简介
    接口测试和功能测试的区别
    session、token、cookie的区别
    python接口自动化--get请求
    测试用例之正交排列法
    编写测试用例的方法
    jquery选择器
  • 原文地址:https://www.cnblogs.com/snip3r/p/12894735.html
Copyright © 2011-2022 走看看