views:

99

answers:

2

Lets say thers is one interface

interface Ifoo
{
   HRESULT foo();
};

which is part of a binary dll. I dont have source code for this.

Can I put a breakpoint on foo() API exposed from the interface Ifoo of this binary dll using Windbg?

I know we can put breakpoints on binary dll's using windbg but using COM I am not sure.

+1  A: 

Regardless of whether you use COM or not, you cannot put breakpoints on an interface: An interface is never executed, so there is no way to "break" on an interface.

If, however, you know that Ifoo is implemented by CFoo, you could, of course, set a breakpoint on CFoo::foo.

Johannes Passing
+1  A: 

Well thanks for pointing out, I actually meant putting breakpoint on implementation of foo.

So I found out. In my case I wanted to put breakpoint on one of windows system dll.

So I ran commands on Windbg as

> x  dllname*!foo*

It gave me list of foo implementations in in dlls with name matching dllname.

like

7331122 dllname!CFoo::foo

Then with using this address I put breakpoints

bp 7331122

U can view the set breakpoints using command

 >bl
Alien01