tags:

views:

303

answers:

2

I am trying to debug some COM components and want to track down CLSID and IIDs in calls to CoCreateInstance.

I am not sure how to display GUID in windbg. Any pointers for that.

+2  A: 

Use the "display type" command:

dt GUID [address-of-guid]

For more information see the documentation.

If it is in a local variable (local to the stack frame you're in), use dv /V to dump all local variables.

jeffamaphone
Thanks for pointer , but this command need to be tweaked little bit.Following will workdt nt!_GUID address-of-guid.
Alien01
Yeah, if you don't tell it nt! it will search all loaded modules till it finds it. And, yeah, I guess GUID turns into _GUID. Good catch.
jeffamaphone
A: 

I don't know anything about COM, but if this is just a normal variable (even if it's a global one), then you can always do:

alt+2 to bring up the watch window and enter the name of the variable there, eg

blahblah.dll!guid

You'll need the symbols for that, possibly need t be in source mode aswell. This is slightly nicer than dv/dt in that you don't have to type it in constantly. You can enter the address as well, I think. Note that if you don't put blahblah! then it can occasionally cause windbg to stall for a few seconds as it searches every module for something called guid.

Pod