7

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)?

Mijalko
  • 529
  • 4
  • 13

2 Answers2

9

Use dt nt!_GUID <@ofobject> +4

plodoc
  • 2,783
  • 17
  • 17
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