Convert number formats in windbg

## Using .formats

1: kd> .formats 183616ac 
Evaluate expression:
  Hex:     183616ac

  Decimal: 406197932
  Octal:   03015413254
  Binary:  00011000 00110110 00010110 10101100
  Chars:   .6..
  Time:    Mon Nov 15 14:15:32 1982

  Float:   low 2.35344e-024 high 0
  Double:  2.00688e-315

##  or internal expression evaluator "?"

1: kd> ?183616ac 
Evaluate expression: 406197932 = 183616ac

## Magic!

1: kd> .formats 0n406197932
Evaluate expression:
  Hex:     183616ac
  Decimal: 406197932
  Octal:   03015413254
  Binary:  00011000 00110110 00010110 10101100
  Chars:   .6..
  Time:    Mon Nov 15 14:15:32 1982
  Float:   low 2.35344e-024 high 0
  Double:  2.00688e-315

0nXXX makes XXX treated as decimal number :)
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s