在用windbg调试代码的时候,以前一直很苦恼想要知道某个地址指针对应的value。。怎么看呢?其实太简单了。。。。
用dp命令
以下内容来自于windbg的help文件:
====================================================
Debugging Tools for Windows (Microsoft Confidential Version)
dda, ddp, ddu, dpa, dpp, dpu, dqa, dqp, dqu (Display Referenced Memory)
The dda, ddp, ddu, dpa, dpp, dpu, dqa, dqp, and dqu commands display the pointer at the specified location, dereference that pointer, and then display the memory at the resulting location in a variety of formats.
Syntax
ddp [Options] [Range]
dqp [Options] [Range]
dpp [Options] [Range]
dda [Options] [Range]
dqa [Options] [Range]
dpa [Options] [Range]
ddu [Options] [Range]
dqu [Options] [Range]
dpu [Options] [Range]
Parameters
Options
Specifies one or more display options. Any of the following options can be included, except that no more than one /p* option can be indicated:
/c Width
Specifies the number of columns to use in the display. If this is omitted, the default number of columns depends on the display type. Because of the way pointers are displayed by these commands, it is usually best to use the default of only one data column.
/p
(Kernel-mode only) Uses physical memory addresses for the display. The range specified by Range will be taken from physical memory rather than virtual memory.
/p[c]
(Kernel-mode only) Same as /p, except that cached memory will be read. The brackets around c must be included.
/p[uc]
(Kernel-mode only) Same as /p, except that uncached memory will be read. The brackets around uc must be included.
/p[wc]
(Kernel-mode only) Same as /p, except that write-combined memory will be read. The brackets around wc must be included.
Range
Specifies the memory area to display. For more syntax details, see Address and Address Range Syntax. If you omit Range, the command will display memory starting at the ending location of the last display command. If Range is omitted and no previous display command has been used, the display begins at the current instruction pointer. If a simple address is given, the default range length is 128 bytes.
Environment
Modes user mode, kernel mode
Targets live, crash dump
Platforms all
Comments
The second and third characters of this command are case-sensitive.
The second character of this command determines the pointer size used:
Command Display
dd* 32-bit pointers used
dq* 64-bit pointers used
dp* Standard pointer sizes used: 32-bit or 64-bit, depending on the target's processor architecture
The third character of this command determines how the dereferenced memory is displayed:
Command Display
d*p Displays the contents of the memory referenced by the pointer in DWORD or QWORD format, depending on the pointer size of the target's processor architecture. If this value matches any known symbol, this symbol is displayed as well.
d*a Displays the contents of the memory referenced by the pointer in ASCII character format.
d*u Displays the contents of the memory referenced by the pointer in Unicode character format.
If line number information has been enabled, source file names and line numbers will be displayed when available.
Additional Information
For an overview of memory manipulation and a description of other memory-related commands, see Reading and Writing Memory.
© 2008 Microsoft Corporation
Debugging Tools for Windows (Internal)
June 6, 2008
Build machine: EMNET
Additional Information
For an overview of memory manipulation and a description of other memory-related commands, see Reading and Writing Memory.
分享到:
相关推荐
Windbg使用详解 Windbg使用详解 Windbg使用详解
WINDBG调试介绍 方式
最新版WinDbg离线安装包
windbg 加亮版 beta-2009.2.5 说明: 为windbg添加语法加亮的功能 用法: 把文件解压到windbg安装目录,再运行windbg_color_xxx.exe即可。 或者先备份windbg.exe,再用windbg_color_xxx.exe替换原来的windbg.exe。...
WindbgABC Windbg基本命令 Windbg详解 三个不错的windbg入门资料。
windbg轻量级调试工具的中文教程,助你轻松掌握windbg
windbg调试命令 很详细,很适合windbg初学者。
WinDbg 的中文帮助翻译 前6章。。来自看雪论坛,希望对大家有所帮助。。
windbg-sos参考
windbg工具的中文调试手册
windbg工具关于在window调试内核与应用程序的软件以及winDbg中文使用文档
一本关于Windows 下 利用 Windbg 调试入门的书。
WinDBG教程-中文版.pdf
windbg 调试内核和驱动代码的最好工具
windbg用的人很少,通常被用作内核调试器。 这对于windbg来说,确实大大限制了windbg的功能发挥。 因为工作的关系,楼主常常需要远程调试和到客户现场排查问题。需要一款顺手的调试器。VC由于太大,安装也麻烦,不能...
WinDbg 主要功能. Windbg是Microsoft公司免费调试器调试集合中的GUI的调试器,支持Source和Assembly两种模式的调试。 Windbg不仅可以调试应用程序,还可以进行Kernel Debug。结合Microsoft的Symbol Server,可以获取...
WinDbg是微软开发的免费源码级调试工具。Windbg可以用于Kernel模式调试和用户模式调试,还可以调试Dump文件. 文章主要介绍了WINDBG的主要功能以及相关的命令和WINDBG的基本调试技术
WinDbg 微软的源码级调试工具。 内含汉化和原版
WinDbg用法详解,包括WinDbg用法入门及命令用法讲解。 WinDbg用法详解,包括WinDbg用法入门及命令用法讲解。
windbg的一系列文章,方便学习其调试的方法