NAME
rd - read memory
SYNOPSIS
rd [-dDsup][-8|-16|-32|-64][-o offs][-e addr] [address|symbol] [count]
DESCRIPTION
This command displays the contents of memory, with the output formatted
in several different manners. The starting address may be entered either
symbolically or by address. The default output size is the size of a long
data type, and the default output format is hexadecimal. When hexadecimal
output is used, the output will be accompanied by an ASCII translation.
-p address argument is a physical address.
-u address argument is a user virtual address; only required on
processors with common user and kernel virtual address spaces.
-d display output in signed decimal format (default is hexadecimal).
-D display output in unsigned decimal format (default is hexadecimal).
-s displays output symbolically when appropriate.
-8 display output in 8-bit values.
-16 display output in 16-bit values.
-32 display output in 32-bit values (default on 32-bit machines).
-64 display output in 64-bit values (default on 64-bit machines).
-o offs offset the starting address by offs.
-e addr display memory until reaching specified ending hexadecimal address.
address starting hexadecimal address:
1 the default presumes a kernel virtual address.
2. -p specifies a physical address.
3. -u specifies a user virtual address, but is only necessary on
processors with common user and kernel virtual address spaces.
symbol symbol of starting address to read.
count number of memory locations to display (default is 1).
EXAMPLES
Display the kernel_version string:
crash> rd kernel_version 4
c0226a6c: 2e322e32 35312d35 00000000 00000001 2.2.5-15........
Display the same block of memory, with and without symbols:
crash> rd c1157f00 52
c1157f00: c0131f7a 00000400 00000015 c013206e z...........n ..
c1157f10: 00000100 c3d4c140 00000100 00000246 ....@.......F...
c1157f20: 019b2065 c2a5bb90 080ac618 c02a83d0 e ............*.
c1157f30: 40000025 01a45067 c1156000 00000000 %..@gP...`......
c1157f40: c011b4f7 c1156000 c2a5bb90 080ac618 .....`..........
c1157f50: 00000001 00000000 c1a45000 c19b2000 .........P... ..
c1157f60: c1157f84 0000003b c022c000 c1156000 ....;....."..`..
c1157f70: 00000000 fffffe00 bffff6fc 0000002e ................
c1157f80: c022c000 ffffffff c01178ba c1156000 .."......x...`..
c1157f90: 00000000 080ac618 bffff6ac 00000001 ................
c1157fa0: c1156000 c1156000 c1157fb8 c1156000 .`...`.......`..
c1157fb0: c1157fb8 c1156000 c1156000 c115608c .....`...`...`..
c1157fc0: c01096c8 ffffffff bffff6fc 00000002 ................
crash> rd -s c1157f00 52
c1157f00: alloc_fd_array+0x1a 00000400 00000015 expand_fd_array+0x72
c1157f10: 00000100 c3d4c140 00000100 00000246
c1157f20: 019b2065 c2a5bb90 080ac618 c02a83d0
c1157f30: 40000025 01a45067 c1156000 00000000
c1157f40: do_wp_page+0x17f c1156000 c2a5bb90 080ac618
c1157f50: 00000001 00000000 c1a45000 c19b2000
c1157f60: c1157f84 0000003b init_task_union c1156000
c1157f70: 00000000 fffffe00 bffff6fc 0000002e
c1157f80: init_task_union ffffffff sys_wait4+0x2be c1156000
c1157f90: 00000000 080ac618 bffff6ac 00000001
c1157fa0: c1156000 c1156000 c1157fb8 c1156000
c1157fb0: c1157fb8 c1156000 c1156000 c115608c
c1157fc0: system_call+0x34 ffffffff bffff6fc 00000002
Read jiffies in hexadecimal and decimal format:
crash> rd jiffies
c0213ae0: 0008cc3a :...
crash> rd -d jiffies
c0213ae0: 577376
Access the same memory in different sizes:
crash> rd -64 kernel_version
c0226a6c: 35312d352e322e32 2.2.5-15
crash> rd -32 kernel_version 2
c0226a6c: 2e322e32 35312d35 2.2.5-15
crash> rd -16 kernel_version 4
c0226a6c: 2e32 2e32 2d35 3531 2.2.5-15
crash> rd -8 kernel_version 8
c0226a6c: 32 2e 32 2e 35 2d 31 35 2.2.5-15
Read the range of memory from c009bf2c to c009bf60:
crash> rd c009bf2c -e c009bf60
c009bf2c: c009bf64 c01328c3 c009bf64 c0132838 d....(..d...8(..
c009bf3c: 0000002a 00000004 c57d77e8 00000104 *........w}.....
c009bf4c: 0000000b c009a000 7fffffff 00000000 ................
c009bf5c: 00000000 ....
|