workingmailing@163.com wrote:
I category the windbg debugging use case:
Why are you doing this?
Questions:
- what is connect to remote session and remote stub usage?
Windbg has a client/server ability, where you run a small windbg server
on the machine that would ordinarily be the “host”, and the windbg
client on a machine far across a network. The client machine sees the
user interface.
Note that there are THREE computers in this case. The target machine
(the one being debugged, with the kernel debugger enabled), the host
machine (connected by RS232 or 1394 or local Ethernet), and the remote
client where the human being sits.
The diagram here explains this:
http://msdn.microsoft.com/en-us/library/windows/hardware/hh451173.aspx
It’s also possible to do user-mode debugging like this, although I’m not
sure how useful that is.
- about Windbg x86 and x64
a. the host pc is win7 64, the target is Win8 or Win8.1 32/64 with bcdedit /debug on
I found in host, both x86 and x64 could be used for debugging target
So in this case, no matter target, and no matter host, both x86 and x64 is useful.
Right. You don’t have to worry about this. Seriously. Any combination
will work.
b. host pc is win7 64, bcdedit /debug on
x86 could not be used for kernel debug, while x64 is ok. why this case happen?
Are you talking about “local kernel debugging”? That’s just a weird
special case. In general, on a 64-bit system, you should run the 64-bit
windbg.
c. for user mode, host pc WIN7 64
both x86 and x64 windbg could used to debug a .exe file
Here is the ONLY case where I sometimes think about which debugger to
use. All processes on a 64-bit system start out as 64-bit processes and
then switch over to 32-bit if needed. You can certainly use the 64-bit
windbg to debug a 32-bit executable. When you do so, the debugger
starts up controlling the 64-bit loader. When you press F5, you get
another startup breakpoint when the process switches to 32-bit. That
doesn’t cause any problems at all (except for one extra keystroke), but
sometimes I will run the 32-bit windbg just to eliminate that first step.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.