debugging user mode code in kernel

is it possible to debug a user mode process conected to the system remotely
in kernel debuging mode??

thanks

ap

> is it possible to debug a user mode process conected to the system

remotely in kernel debuging mode??

Yup, see .process /i.

There are also two other options:

  1. See the documentation on Controlling the User-Mode Debugger from the
    Kernel Debugger. This just pipes a user mode debugging session over the
    kernel debug hookup (when you do .process you’re still in a kernel debugging
    session, it’s just that the current user process is switched to your process
    so that you can set breakpoints in it).

  2. Change your process to have a __debugbreak() embedded in it. This will
    trap into the debugger and effectively give you the same thing as .process
    /i

-scott


Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com

“A P” wrote in message news:xxxxx@windbg…
is it possible to debug a user mode process conected to the system remotely
in kernel debuging mode??

thanks

ap

Yes it is. I do it all the time.

–Mark Cariddi

OSR, Open Systems Resources, Inc.

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of A P
Sent: Wednesday, July 22, 2009 5:40 AM
To: Kernel Debugging Interest List
Subject: [windbg] debugging user mode code in kernel

is it possible to debug a user mode process conected to the system
remotely in kernel debuging mode??

thanks

ap

— WINDBG is sponsored by OSR For our schedule of WDF, WDM, debugging
and other seminars visit: http://www.osr.com/seminars To unsubscribe,
visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Yes, it is.

You can control ntsd through kd, effectively replacing console I/O with DbgPrint/DbgPrompt.

Or you can directly control the target through the kernel debugger.

However, I would avoid doing so unless you really have no other option, as neither of these options provides anywhere near as convenient or full-featured a debugging experience as conventional debugging techniques.

What sort of problem are you trying to solve that is leading you towards this path?

  • S

From: A P
Sent: Wednesday, July 22, 2009 06:40
To: Kernel Debugging Interest List
Subject: [windbg] debugging user mode code in kernel

is it possible to debug a user mode process conected to the system remotely in kernel debuging mode??

thanks

ap
— WINDBG is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer