When I use !do in windbg for System.Guid object I got list of fields for that GUID object. How can I see what is value of this GUID (string representation)?
Asked
Active
Viewed 2,033 times
2 Answers
9
Use dt nt!_GUID <@ofobject> +4

plodoc
- 2,783
- 17
- 17
-
Actually, I am testing on 64bit machine so in my case dt nt!_GUID <@ofobject> +8 is OK. Thanks. – Mijalko Sep 28 '11 at 10:21
-
For me when I do managed debugging and get the address via SOS, the correct value is shown when I do dt nt!_GUID <@ofobject> – Ganesh R. May 05 '14 at 08:48
-
If this object is a value type. Use dt nt!_guid <@ofobject> – fresky Jun 03 '14 at 04:45
0
Guid is stored as ints and bytes. String representation is created when you call ToString(). You can not call methods if you analyzing a 'dead' dump file. So your best bet is to just copy the values and use this constructor and ToString() in a new console app or in a unit test:
public Guid(
uint a,
ushort b,
ushort c,
byte d,
byte e,
byte f,
byte g,
byte h,
byte i,
byte j,
byte k
)
Not the answer you were looking for probably. Hope you only need to do it once.

Dmitry
- 17,078
- 2
- 44
- 70
-
Unfortunately... If you need to check dozen of GUIDs it will be painful. – Mijalko Sep 18 '11 at 15:08
-
Sorry to hear that. Using WinDbg frequently may indicate that you missing unit tests and that design needs to be improved. The answer I provided is good for 'once in a while' session with windbg. Good luck. – Dmitry Sep 18 '11 at 15:17