Windbg命令系列---.printf
作者:互联网
.printf的行为跟C语言的printf函数类似。
语法
.printf [/D] [Option] "FormatString" [, Argument , ...]
参数
/D
指定格式字符串包含调试器标记语言(DML)。
Option
指定WinDbg应将FormatString解释为的文本消息类型。WinDbg为每种类型的调试器命令窗口消息分配背景和文本颜色;选择其中一个选项会使消息以适当的颜色显示。默认情况下,文本显示为正常级别的 消息。以下选项可用:
Option | Type of message | Title of colors in Options dialog box |
---|---|---|
/od |
debuggee |
Debuggee level command window |
/oD |
debuggee prompt |
Debuggee prompt level command window |
/oe |
error |
Error level command window |
/on |
normal |
Normal level command window |
/op |
prompt |
Prompt level command window |
/oP |
prompt registers |
Prompt registers level command window |
/os |
symbols |
Symbol message level command window |
/ov |
verbose |
Verbose level command window |
/ow |
warning |
Warning level command window |
Character | Argument type | Argument | Text printed |
---|---|---|---|
%p |
ULONG64 |
A pointer in the target's virtual address space. |
The value of the pointer. |
%N |
DWORD_PTR (32 or 64 bits, depending on the host's architecture) |
A pointer in the host's virtual address space. |
The value of the pointer. (This is equivalent to the standard C %p character.) |
%I |
ULONG64 |
Any 64-bit value. |
The specified value. If this is greater than 0xFFFFFFFF, it is printed as a 64-bit address; otherwise it is printed as a 32-bit address. |
%ma |
ULONG64 |
The address of a NULL-terminated ASCII string in the target's virtual address space. |
The specified string. |
%mu |
ULONG64 |
The address of a NULL-terminated Unicode string in the target's virtual address space. |
The specified string. |
%msa |
ULONG64 |
The address of an ANSI_STRING structure in the target's virtual address space. |
The specified string. |
%msu |
ULONG64 |
The address of a UNICODE_STRING structure in the target's virtual address space. |
The specified string. |
%y |
ULONG64 |
The address of a debugger symbol in the target's virtual address space. |
A string containing the name of the specified symbol (and displacement, if any). |
%ly |
ULONG64 |
The address of a debugger symbol in the target's virtual address space. |
A string containing the name of the specified symbol (and displacement, if any), as well as any available source line information. |
说明
默认情况下,可以使用Options参数选择的颜色设置。要充分利用这些选项,必须首先使用“查看|选项”打开“选项”对话框,并更改调试器命令窗口消息的颜色设置。下面的示例演示如何在格式字符串中包含DML标记:
.printf /D "Click <link cmd=\".chain /D\">here</link> to see extensions DLLs."
上图中显示的输出有一个链接,您可以单击该链接执行<link>标记中指定的命令。下图显示了单击链接的结果。
标签:Windbg,level,printf,space,virtual,window,---.,command,address 来源: https://www.cnblogs.com/yilang/p/15632557.html