My app has a.exe which launches b.exe and communicates with it. The sequence is:
- a.exe launches b.exe, and waits on an event from b.exe with a 10-second timeout
- b.exe starts, registers as a COM server, and signals the event
- a.exe calls a method in the COM interface
- b.exe interface method is called. <<<<< I want to break here
I want to break in b.exe interface method call. Currently, I do it like this:
- Run a.exe under windbg
- Enter
.childdbg 1
- Wait until b.exe starts, and its initial breakpoint breaks.
- Set another breakpoint in b.exe and continue. I must do it within 10 seconds, otherwise a.exe will timeout and kill b.exe.
I managed to do it, but the 10-second timeout sometimes passes. Is there a better way to do it?
Reading my question, I found the answer - let the initial breakpoint set the real breakpoint:
.childdbg 1
sxe -c "bm b!*MyMethod*;g" ibp
sxd epr