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

  • 相关阅读:
    python 第三方库大全
    windows CMD实现的信息收集工具
    ip协议是哪一层的协议
    MetaWeblog访问地址
    通过卸载程序触发恶意进程
    IP地址查询接口
    mysql 密码忘记解决办法
    查询IP地址的免费API
    showdan
    【译】android的审计和hacking工具
  • 原文地址:https://www.cnblogs.com/zzSoftware/p/3477233.html
Copyright © 2011-2022 走看看