切换系统不起作用
Switching the system does not work
我遇到了以下情况:我处于实时用户模式调试会话中,我想显示 win32k!_W32Process
结构。不幸的是,win32k 是一个内核模式 SYS 文件,所以这些符号在用户模式会话中不可用。
我知道我总是可以将 DLL、EXE 或 SYS 作为转储文件加载,然后检查符号。通常我会通过 File/Open 崩溃转储来做到这一点。
这一次,我想向调试研讨会的参与者展示同时调试多个系统是可能的,所以我通过 WinDbg 的命令提示符打开 Win32K.sys:
0:003> |
. 0 id: 10fc attach name: [...]\NetHeaps.exe
0:003> .opendump C:\Windows\winsxs\[...]\win32k.sys
Loading Dump File [C:\Windows\winsxs\[...]\win32k.sys]
Opened 'C:\Windows\winsxs\[...]\win32k.sys'
||0:0:003>
我们现在可以看到,我们有 2 个系统,我目前正在调试系统:
||0:0:003> ||
. 0 Live user mode: <Local>
1 Image file: C:\Windows\winsxs\[...]\win32k.sys
我想我现在可以切换到另一个系统,但是那不起作用:
||0:0:003> ||1s
^ Illegal debuggee error in '||1s'
我不会太担心,但在这种情况下找不到 win32k
的符号:
||0:0:003> .reload
Reloading current modules
...........................
||0:0:003> dt win32k!_W32Process
Symbol win32k!_W32Process not found.
问题不在 ||
命令中,而是在 .opendump
命令中。
帮助说:
After you use the .opendump command, you must use the g (Go) command to finish loading the dump file.
请注意,这也会 运行 您的实时进程。因此,先冻结线程 (~*f
),然后再解冻 (~*u
)。
之后可以切换系统显示类型:
||1:1:004> ||
0 Live user mode: <Local>
. 1 Image file: C:\Windows\winsxs\[...]\win32k.sys
||1:1:004> dt _W32Process
win32k!_W32PROCESS
+0x000 Process : Ptr64 _EPROCESS
+0x008 RefCount : Uint4B
+0x00c W32PF_Flags : Uint4B
[...]
我遇到了以下情况:我处于实时用户模式调试会话中,我想显示 win32k!_W32Process
结构。不幸的是,win32k 是一个内核模式 SYS 文件,所以这些符号在用户模式会话中不可用。
我知道我总是可以将 DLL、EXE 或 SYS 作为转储文件加载,然后检查符号。通常我会通过 File/Open 崩溃转储来做到这一点。
这一次,我想向调试研讨会的参与者展示同时调试多个系统是可能的,所以我通过 WinDbg 的命令提示符打开 Win32K.sys:
0:003> |
. 0 id: 10fc attach name: [...]\NetHeaps.exe
0:003> .opendump C:\Windows\winsxs\[...]\win32k.sys
Loading Dump File [C:\Windows\winsxs\[...]\win32k.sys]
Opened 'C:\Windows\winsxs\[...]\win32k.sys'
||0:0:003>
我们现在可以看到,我们有 2 个系统,我目前正在调试系统:
||0:0:003> ||
. 0 Live user mode: <Local>
1 Image file: C:\Windows\winsxs\[...]\win32k.sys
我想我现在可以切换到另一个系统,但是那不起作用:
||0:0:003> ||1s
^ Illegal debuggee error in '||1s'
我不会太担心,但在这种情况下找不到 win32k
的符号:
||0:0:003> .reload
Reloading current modules
...........................
||0:0:003> dt win32k!_W32Process
Symbol win32k!_W32Process not found.
问题不在 ||
命令中,而是在 .opendump
命令中。
帮助说:
After you use the .opendump command, you must use the g (Go) command to finish loading the dump file.
请注意,这也会 运行 您的实时进程。因此,先冻结线程 (~*f
),然后再解冻 (~*u
)。
之后可以切换系统显示类型:
||1:1:004> ||
0 Live user mode: <Local>
. 1 Image file: C:\Windows\winsxs\[...]\win32k.sys
||1:1:004> dt _W32Process
win32k!_W32PROCESS
+0x000 Process : Ptr64 _EPROCESS
+0x008 RefCount : Uint4B
+0x00c W32PF_Flags : Uint4B
[...]