I've got virtual machine with VirtualKD
drivers installed and attached to windbg running on the host machine.
So far I've managed to set breakpoints on user-space processes by switching to the desired process context in the following manner :
# get procID
!process 0 0 myproc.exe
# use procID to switch context
.process /i <procID>
# continue till scheduler context switch to the desired process
g
# set break point on process' context (symbols should be visible)
...
the problem here is that the process must already be available (otherwise we won't be able to get its context).
Perhaps there's an easier way to state the process name in the breakpoint command with the ability to wait for the process to come up ?
EDIT :
Found out that with sxe ld myproc.exe
I can get my breakpoint on process load .. However, in this stage, not all its libraries are loaded so I cannot set breakpoint on their method. Perhaps there's a way to get better notice when a library x.dll is being loaded in process myproc.exe ?