NetRoc's Blog

N-Tech

 

WinDbg 文档翻译----73

cc682/NetRoc

http://netroc682.spaces.live.com/

!mui

!mui 扩展命令显示多语言用户接口(Multilingual User Interface (MUI))缓存信息。MUI的实现在Windows Vista中被显著的改良了。所以该功能在早期的实现上可能是不明确的。

语法

用户模式语法

!mui –c
!mui –f
!mui -i
!mui -r ModuleAddress
!mui -t
!mui -? 

内核模式语法

!mui -c
!mui –f
!mui -i
!mui -s
!mui -r ModuleAddress
!mui -t
!mui -? 

参数

-c

输出中包含语言标识符(language identifier (ID))、指向模块的指针、指向资源配置数据(resource configuration data)的指针、以及指向每个模块关联的MUI DLL的指针。

-f

输出中包含加载器合并的语言后备列表(loader merged language fallback list)。

-i

输出中包含已安装和授权的MUI语言,以及它们的关联信息。

-r ModuleAddress

显示ModuleAddress 模块的资源配置数据(resource configuration data)。包括文件类型、校验和的值、以及资源类型。

-s

(仅内核模式) 输出中包含模块和每个模块关联的MUI DLL的完整路径。

-t

输出中包含线程的首选语言(preference language)。

-?

在调试器命令窗口中显示该扩展命令的简要帮助文本。

DLL

Windows NT 4.0

不可用

Windows 2000

不可用

Windows XP

不可用

Windows Vista 和之后

Exts.dll

 

附加信息

关于MUI和资源配置数据格式(resource configuration data format)的更多信息,查看Microsoft Windows SDK 文档。

!net_send

!net_send 扩展通过本地网络发送一条消息。

语法

!net_send SendingMachine TargetMachine Sender Message 

参数

SendingMachine

指定要处理该命令的计算机。建议使用调试器所运行的计算机的名字,因为网络配置可能会拒绝发送这条消息。SendingMachine 不能在开头包括反斜线(\\)。

TargetMachine

指定发送消息的对象。TargetMachine 不能在开头包含反斜线(\\)。

Sender

指定消息的发送者。建议SenderSendingMachine 一样,因为网络配置可能会拒绝发送该消息。当这条消息被显示出来时,该字符串会作为消息的发送者。

Message

指定消息本身。Sender 参数后面的所有文本都会被当作Message 的一部分,包括空格和引号,分号会结束Message并且开始一条新的命令。

DLL

Windows NT 4.0

Ext.dll

Windows 2000

Ext.dll

Windows XP和之后

Ext.dll

!obja

!obja 扩展命令显示对象管理器中某个对象的属性。

语法

!obja Address 

参数

Address

指定要查看的对象头的16进制地址。

DLL

Windows NT 4.0

Ext.dll
Kdextx86.dll

Windows 2000

Ext.dll
Kdextx86.dll

Windows XP和之后

Ext.dll

注释

指定对象所具备的属性会被列举出来。合法的属性包括:

#define OBJ_INHERIT             0x00000002L
#define OBJ_PERMANENT           0x00000010L
#define OBJ_EXCLUSIVE           0x00000020L
#define OBJ_CASE_INSENSITIVE    0x00000040L
#define OBJ_OPENIF              0x00000080L
#define OBJ_OPENLINK            0x00000100L
#define OBJ_VALID_ATTRIBUTES    0x000001F2L

下面是一个示例:

kd> !obja 80967768
Obja +80967768 at 80967768:
        OBJ_INHERIT
        OBJ_PERMANENT
        OBJ_EXCLUSIVE

附加信息

关于对象和对象管理器的更多信息,查看Microsoft Windows SDK 文档、Windows Driver Kit (WDK) 文档、以及Mark Russinovich 和David Solomon 编著的Microsoft Windows Internals

!owner

!owner 扩展用于显示某个模块或者函数的所有者。

语法

!owner [Module[!Symbol]] 

参数

Module

指定要查看所有者的模块。Module 后面如果带一个星号(*),则表示任意多个其他字符。

Symbol

指定要查看所有者的Module 模块中的符号。Symbol 后如果带一个星号 (*) ,表示任意多个其他字符。如果省略Symbol ,则显示整个模块的所有者。

DLL

Windows NT 4.0

Ext.dll

Windows 2000

Ext.dll

Windows XP和之后

Ext.dll

注释

如果没有使用参数并且发生了错误,!owner 会显示发生错误的模块或函数的所有者名字。

传递了模块或函数名给!owner 时,调试器会显示单词 Followup ,后面跟指定的模块或函数的所有者。

要该命令显示有用的信息,必须首先创建包含模块和函数所有者名字的triage.ini 文件。

triage.ini 文件的详细信息和!owner 命令的示例,查看指定模块和函数的所有者

!peb

!peb 扩展显示进程环境块(PEB)信息的格式化形式。

语法

!peb [PEB-Address

参数

PEB-Address

要查看的PEB的16进制地址。(不是从进程的内核进程块中获得的PEB地址。) 如果在用户模式下省略PEB-Address,则使用当前进程的PEB。如果在内核模式下省略,则显示当前进程上下文对应的PEB。

DLL

Windows NT 4.0

Kdextx86.dll
Ntsdexts.dll

Windows 2000

Kdextx86.dll
Ntsdexts.dll

Windows XP和之后

Exts.dll

注释

PEB是Microsoft Windows进程控制结构的用户模式部分。

如果内核模式下不带参数使用!peb 命令时出错,则需要用!process扩展命令来 获得需要的进程的PEB地址。 要确认进程上下文是设置成需要的进程的,并且将该PEB地址作为!peb的参数。

具体显示出来的输出根据不同的Windows版本以及是在内核模式还是用户模式下调试会有所不同。下面是一个附加到Windows Server 2003目标机上的内核调试器的输出示例:

kd> !peb
PEB at 7ffdf000
    InheritedAddressSpace:    No
    ReadImageFileExecOptions: No
    BeingDebugged:            No
    ImageBaseAddress:         4ad00000
    Ldr                       77fbe900
    Ldr.Initialized:          Yes
    Ldr.InInitializationOrderModuleList: 00241ef8 . 00242360
    Ldr.InLoadOrderModuleList:           00241e90 . 00242350
    Ldr.InMemoryOrderModuleList:         00241e98 . 00242358
            Base TimeStamp                     Module
        4ad00000 3d34633c Jul 16 11:17:32 2002 D:\WINDOWS\system32\cmd.exe
        77f40000 3d346214 Jul 16 11:12:36 2002 D:\WINDOWS\system32\ntdll.dll
        77e50000 3d3484ef Jul 16 13:41:19 2002 D:\WINDOWS\system32\kernel32.dll
....
    SubSystemData:     00000000
    ProcessHeap:       00140000
    ProcessParameters: 00020000
    WindowTitle:  'D:\Documents and Settings\Administrator\Desktop\Debuggers.lnk'
    ImageFile:    'D:\WINDOWS\system32\cmd.exe'
    CommandLine:  '"D:\WINDOWS\system32\cmd.exe" '
    DllPath:      'D:\WINDOWS\system32;D:\WINDOWS\system32;....
    Environment:  00010000
        ALLUSERSPROFILE=D:\Documents and Settings\All Users
        APPDATA=D:\Documents and Settings\UserTwo\Application Data
        CLIENTNAME=Console
....
        windir=D:\WINDOWS

类似的!teb 扩展命令用于显示线程环境块。

附加信息

关于进程环境块的更多信息,查看Mark Russinovich 和David Solomon 编写的Microsoft Windows Internals

!psr

!psr 扩展显示Itanium处理器状态字(processor status word (PSR))。

语法

!psr PSR [DisplayLevel
!psr @ipsr [DisplayLevel

参数

PSR

指定要显示的PSR的16进制地址。

@ipsr

显示ipsr寄存器。

DisplayLevel

可以使下面选项中任意一个:

0

只显示每个PSR字段(field)的值。这是默认情况。

1

显示中包含非保留或者忽略的PSR字段的更深入的信息。

2

显示中包含所有的PSR字段的深入信息,包括忽略和保留(ignored or reserved)的那些。

DLL

Windows NT 4.0

不可用

Windows 2000

不可用

Windows XP和之后

Exts.dll

该命令只能在Itanium的目标机上使用。

注释

下面是两个例子:

0:000> !psr @ipsr
psr:ia bn ed ri ss dd da id it mc is cpl rt tb lp db
 0  1  0  0  0  0  0  0  1  0  0  3   1  0  0  0
si di pp sp dfh dfl dt pk i ic | mfh mfl ac up be
 0  0  1  0  0   0   1  0 1  1 |  0   1   0  0  0

kd> !psr @ipsr 1

  be : 0 : Big-Endian
  up : 0 : User Performance monitor enable
  ac : 1 : Alignment Check
 mfl : 1 : Lower floating-point registers written
 mfh : 0 : Upper floating-point registers written
  ic : 1 : Interruption Collection
   i : 0 : Interrupt enable
  pk : 0 : Protection Key enable
  dt : 1 : Data Address Translation enable
 dfl : 0 : Disabled Floating-point Low  register set
 dfh : 1 : Disabled Floating-point High register set
  sp : 0 : Secure Performance monitors
  pp : 1 : Privileged Performance monitor enable
  di : 0 : Disable Instruction set transition
  si : 0 : Secure Interval timer
  db : 0 : Debug Breakpoint fault enable
  lp : 0 : Lower Privilege transfer trap enable
  tb : 0 : Taken Branch trap enable
  rt : 1 : Register stack translation enable
 cpl : 0 : Current Privilege Level
  is : 0 : Instruction Set
  mc : 0 : Machine Abort Mask delivery disable
  it : 1 : Instruction address Translation enable
  id : 0 : Instruction Debug fault disable
  da : 0 : Disable Data Access and Dirty-bit faults
  dd : 0 : Data Debug fault disable
  ss : 0 : Single Step enable
  ri : 0 : Restart Instruction
  ed : 0 : Exception Deferral
  bn : 1 : register Bank
  ia : 0 : Disable Instruction Access-bit faults

附加信息

更多信息,查看Itanium 架构,或者Intel架构手册。

!rtlavl

!rtlavl 扩展显示某个RTL_AVL_TABLE 结构的条目。

语法

!rtlavl Address [Module!Type]
!rtlavl -?

参数

Address

指定要显示的RTL_AVL_TABLE 的地址。

Module

指定定义该数据结构的模块。

Type

指定数据结构的名字。

-?

在调试器命令窗口中显示该命令的简要帮助文本。

DLL

Windows NT 4.0

Ext.dll

Windows 2000

Ext.dll

Windows XP和之后

Ext.dll

注释

包含Module!Type 选项会使得列表中每个条目都被当成给定类型的。

任何时候通过按下CTRL+BREAK (WinDbg中) 或者CTRL+C (KD 或CDB中)都可以打断命令的输出。

附加信息

使用!gentable 扩展命令来显示AVL表。

!sd

!sd 显示指定地址处的安全描述符(security descriptor)。

语法

Windows NT 4.0 和Windows 2000中的语法:

!sd Address 

Windows XP和之后的语法:

!sd Address [Flags

参数

Address

指定SECURITY_DESCRIPTOR 结构的16进制地址。

Flags

(Windows XP 和之后) 如果设置为1,则显示更友好的名字。包括安全描述符(security identifier (SID))类型,以及该SID的域(domain)和用户名。

DLL

Windows NT 4.0

Kdextx86.dll

Windows 2000

Kdextx86.dll

Windows XP和之后

Exts.dll

注释

这里有一个例子:

kd> !sd e1a96a80 1
->Revision: 0x1
->Sbz1    : 0x0
->Control : 0x8004
            SE_DACL_PRESENT
            SE_SELF_RELATIVE
->Owner   : S-1-5-21-518066528-515770016-299552555-2981724 (User: MYDOMAIN\myuser)
->Group   : S-1-5-21-518066528-515770016-299552555-513 (Group: MYDOMAIN\Domain Users)
->Dacl    :
->Dacl    : ->AclRevision: 0x2
->Dacl    : ->Sbz1       : 0x0
->Dacl    : ->AclSize    : 0x40
->Dacl    : ->AceCount   : 0x2
->Dacl    : ->Sbz2       : 0x0
->Dacl    : ->Ace[0]: ->AceType: ACCESS_ALLOWED_ACE_TYPE
->Dacl    : ->Ace[0]: ->AceFlags: 0x0
->Dacl    : ->Ace[0]: ->AceSize: 0x24
->Dacl    : ->Ace[0]: ->Mask : 0x001f0003
->Dacl    : ->Ace[0]: ->SID: S-1-5-21-518066528-515770016-299552555-2981724 (User: MYDOMAIN\myuser)

->Dacl    : ->Ace[1]: ->AceType: ACCESS_ALLOWED_ACE_TYPE
->Dacl    : ->Ace[1]: ->AceFlags: 0x0
->Dacl    : ->Ace[1]: ->AceSize: 0x14
->Dacl    : ->Ace[1]: ->Mask : 0x001f0003
->Dacl    : ->Ace[1]: ->SID: S-1-5-18 (Well Known Group: NT AUTHORITY\SYSTEM)

->Sacl    :  is NULL

附加信息

关于该命令的应用和例子,查看查看对象的ACL。关于安全描述符的更多信息,查看 Microsoft Windows SDK文档、 Windows Driver Kit (WDK)文档、以及Mark Russinovich和David Solomon编写的 Microsoft Windows Internals。还可以参见!sid!acl

!sid

!sid 扩展显示指定地址处的安全描述符 (SID)。

语法

Windows NT 4.0 和Windows 2000的语法:

!sid Address 

Windows XP和之后的系统中的语法:

!sid Address [Flags

参数

Address

指定SID结构的地址。

Flags

(Windows XP和之后) 如果设置为1,则SID类型、域和该SID的用户名都会显示出来。

(Windows XP and later) 如果设置为1,则显示更加友好的名字。包括安全描述符(SID)类型,以及该SID的域(domain)和用户名。

DLL

Windows NT 4.0

Kdextx86.dll

Windows 2000

Kdextx86.dll

Windows XP和之后

Exts.dll

注释

这里有两个示例,一个没有显示友好名,一个有显示:

kd> !sid 0xe1bf35b8
SID is: S-1-5-21-518066528-515770016-299552555-513

kd> !sid 0xe1bf35b8 1
SID is: S-1-5-21-518066528-515770016-299552555-513 (Group: MYGROUP\Domain Users)

附加信息

关于SID的更多信息,查看Microsoft Windows SDK 文档、Windows Driver Kit (WDK)文档,或者Mark Russinovich 和David Solomon编写的 Microsoft Windows Internals 。也可以参见!sd!acl

!slist

!slist 扩展显示一个单链表(singly-linked list (SList))。

语法

!slist Address [ Symbol [Offset] ] 
!slist -? 

参数

Address

指定SLIST_HEADER 的地址。

Symbol

指定要用来显示的数据类型。如果指定了Symbol,调试器显示的时候会假定单链表中每个实例具有该数据类型。

Offset

指定单链表指针在该结构中的字节偏移。

-?

在调试器命令窗口中显示该命令的简要帮助文本。

DLL

Windows NT 4.0

不可用

Windows 2000

不可用

Windows XP和之后

Exts.dll

注释

如果知道链接的结构的类型,那么SymbolOffset 参数是非常有用的。要查看区别,这里有两个例子;第一个省略了Symbol Offset 参数,第二个包含了。

0:000> !slist ListHead
SLIST HEADER:
   +0x000 Alignment          : a000a002643e8
   +0x000 Next               : 2643e8
   +0x004 Depth              : a
   +0x006 Sequence           : a

SLIST CONTENTS:
002643e8  002642c0 0000000a 6e676953 72757461
002642c0  00264198 00000009 6e676953 72757461
00264198  00264070 00000008 6e676953 72757461
00264070  00263f48 00000007 6e676953 72757461
00263f48  00261420 00000006 6e676953 72757461
00261420  002612f8 00000005 6e676953 72757461
002612f8  002611d0 00000004 6e676953 72757461
002611d0  002610a8 00000003 6e676953 72757461
002610a8  00260f80 00000002 6e676953 72757461
00260f80  00000000 00000001 6e676953 72757461

0:000> !slist ListHead _PROGRAM_ITEM 0
SLIST HEADER:
   +0x000 Alignment          : a000a002643e8
   +0x000 Next               : 2643e8
   +0x004 Depth              : a
   +0x006 Sequence           : a

SLIST CONTENTS:
002643e8
   +0x000 ItemEntry        : _SINGLE_LIST_ENTRY
   +0x004 Signature        : 0xa
   +0x008 Description      : [260]  "Signature is: 10"
002642c0
   +0x000 ItemEntry        : _SINGLE_LIST_ENTRY
   +0x004 Signature        : 9
   +0x008 Description      : [260]  "Signature is: 9"
00264198
   +0x000 ItemEntry        : _SINGLE_LIST_ENTRY
   +0x004 Signature        : 8
   +0x008 Description      : [260]  "Signature is: 8"
00264070
   +0x000 ItemEntry        : _SINGLE_LIST_ENTRY
   +0x004 Signature        : 7
   +0x008 Description      : [260]  "Signature is: 7"
00263f48
   +0x000 ItemEntry        : _SINGLE_LIST_ENTRY
   +0x004 Signature        : 6
   +0x008 Description      : [260]  "Signature is: 6"
00261420
   +0x000 ItemEntry        : _SINGLE_LIST_ENTRY
   +0x004 Signature        : 5
   +0x008 Description      : [260]  "Signature is: 5"
002612f8
   +0x000 ItemEntry        : _SINGLE_LIST_ENTRY
   +0x004 Signature        : 4
   +0x008 Description      : [260]  "Signature is: 4"
002611d0
   +0x000 ItemEntry        : _SINGLE_LIST_ENTRY
   +0x004 Signature        : 3
   +0x008 Description      : [260]  "Signature is: 3"
002610a8
   +0x000 ItemEntry        : _SINGLE_LIST_ENTRY
   +0x004 Signature        : 2
   +0x008 Description      : [260]  "Signature is: 2"
00260f80
   +0x000 ItemEntry        : _SINGLE_LIST_ENTRY
   +0x004 Signature        : 1
   +0x008 Description      : [260]  "Signature is: 1"

posted on 2008-07-16 15:09 NetRoc 阅读(362) 评论(1)  编辑 收藏 引用

评论

# re: WinDbg 文档翻译----73 2008-07-19 10:33 金碧酒店

来看看  回复  更多评论   

只有注册用户登录后才能发表评论。

导航

统计

常用链接

留言簿(7)

随笔档案(99)

文章分类(35)

文章档案(32)

Friends

Mirror

搜索

最新评论

阅读排行榜

评论排行榜