Monday, November 05, 2007

mdb display options (64-bit vs 32-bit) [42]

To see whether to use the \D or \E display option in mdb: You can run nm and see whether the variable is 4 or 8 bytes. If it's 8 bytes (64 bit) then you need to use /E otherwise /D.
-bash-3.00$ /usr/ccs/bin/nm /dev/ksyms |grep maxpgio
[23962] | 25553712| 8|OBJT |GLOB |0 |ABS |maxpgio
In the above example the third column tells us that this maxpgio is 8 byte object therefore we need to use /E
[root@db31:/] mdb -k
Loading modules: [ unix krtld genunix specfs dtrace ufs sd pcisch ip sctp usba fcp fctl ssd md fcip cpc random crypto logindmux ptm nfs ]
> maxpgio/E
maxpgio:
maxpgio: 40
> maxpgio/J
maxpgio:
maxpgio: 28

Use the option /J when you want the value to be displayed as hex.

No comments: