zoukankan      html  css  js  c++  java
  • about !dbgprint to analyze BSOD dump file.

    基本规则:

    只有debug mode enable的机器,产生的dump file才会保存dbgprint的buffer。

    默认!dbgprint的buffer size是4k.

    增加buffer size:

    ...Windows Kits8.1Debuggersx86kdbgctrl.exe

    比如设成 1M大小,kdbgctrl.exe -sdb 0x100000

    设置每次重启之后都会失效,所以重启后都需要敲这个命令.

    Take care:

    当我把buffer设置成0x100000(1M)之后,!dbgprint却只能显示20KB左右的ascii的打印.

    这应该是!dbgprint的bug,剩余的部分没能打出来,但实际上是在dump file里面的.

    Then 怎么去拿全部的buffer?

    0: kd> x nt!kdprint*
    fffff802`758a1a18 nt!KdPrintWritePointer = <no type information>
    fffff802`758e05e0 nt!KdPrintRolloverCount = <no type information>
    fffff802`758e05f0 nt!KdPrintDefaultCircularBuffer = <no type information>
    fffff802`758a1a10 nt!KdPrintCircularBuffer = <no type information>
    fffff802`758f06c0 nt!KdPrintBufferChanges = <no type information>
    fffff802`758a1a08 nt!KdPrintBufferSize = <no type information>

    dd fffff802`758a1a10   (nt!KdPrintCircularBuffer),得到的就是buffer的start address

    从这里开始,大小为nt!KdPrintBufferSize,就是buffer的区域.

    nt!KdPrintWritePointer是当前printk 写buffer的指针.

    Notice:

    这个buffer是cyclic的,根据KdPrintWritePointer来决定buffer的起始位置:)

  • 相关阅读:
    市值
    01-HTML基础与进阶-day3-录像237
    01-HTML基础与进阶-day3-录像236
    01-HTML基础与进阶-day3-录像235
    01-HTML基础与进阶-day2-HTML第二讲
    01-HTML基础与进阶-day2-HTML第一讲
    01H5-fe-html5-006插入视频
    MySQL 备份和恢复数据
    MySQL 索引
    MySQL 视图
  • 原文地址:https://www.cnblogs.com/zzSoftware/p/3477233.html
Copyright © 2011-2022 走看看