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的起始位置:)

  • 相关阅读:
    AtCoder Grand Contest 001F Wide Swap
    生成函数/母函数入门学习
    树的点分治入门小结
    树链剖分入门小结
    有重复元素的全排列
    二项式界
    二项系数
    排列问题、组合问题
    容斥原理
    P3372 【模板】线段树 1
  • 原文地址:https://www.cnblogs.com/zzSoftware/p/3477233.html
Copyright © 2011-2022 走看看