db2
db2

Reputation: 517

Set breakpoint on COM class method in windbg

Is there some way, similar to "bm Module!Symbol" to set a breakpoint on a specific method of a COM class in windbg? It looks like a COM DLL only exports four symbols (DllCanUnloadNow, DllGetClassObject, DllRegisterServer, and DllUnregisterServer), so the usual "bm" approach doesn't work. I'm assuming there's some other way to do it, but I haven't been able to find it in the past hour or so.

Upvotes: 3

Views: 2091

Answers (2)

Nathan Kidd
Nathan Kidd

Reputation: 2959

COM methods are still regular symbols, even if they're not exported. Say you have MyFoo.dll which contains a MyBar::Baz() method. In WinDbg if you have symbols loaded you can eXamine the symbols with:

X MyFoo!*Baz*
00007ffa`204cbb00 MyFoo!MyBar::Baz (void)

You can set a breakpoint on it with

bp MyFoo!MyBar::Baz

Upvotes: 0

Luke
Luke

Reputation: 11421

You should be able to use bu (unresolved breakpoint). I believe the syntax is as follows, but my memory may be rusty:

bu MyDll!MyClass::MyMethod

Upvotes: 2

Related Questions