The Official Radare2 Book - страница 18

стр.

%T The time in 24-hour notation (%H:%M:%S). (SU)

%y The year as a decimal number without a century (range 00 to 99).

%Y The year as a decimal number including the century.

%z The +hhmm or -hhmm numeric timezone (that is, the hour and minute offset from UTC). (SU)

%Z The timezone name or abbreviation.

There are print modes available for all basic types. If you are interested in a more complex structure, type pf?? for format characters and pf??? for examples:

[0x00499999]> pf??

|pf: pf[.k[.f[=v]]|[v]]|[n]|[0|cnt][fmt] [a0 a1 ...]

| Format:

| b byte (unsigned)

| B resolve enum bitfield (see t?)

| c char (signed byte)

| C byte in decimal

| d 0xHEX value (4 bytes) (see 'i' and 'x')

| D disassemble one opcode

| e temporally swap endian

| E resolve enum name (see t?)

| f float value (4 bytes)

| F double value (8 bytes)

| i signed integer value (4 bytes) (see 'd' and 'x')

| n next char specifies size of signed value (1, 2, 4 or 8 byte(s))

| N next char specifies size of unsigned value (1, 2, 4 or 8 byte(s))

| o octal value (4 byte)

| p pointer reference (2, 4 or 8 bytes)

| q quadword (8 bytes)

| r CPU register `pf r (eax)plop`

| s 32bit pointer to string (4 bytes)

| S 64bit pointer to string (8 bytes)

| t UNIX timestamp (4 bytes)

| T show Ten first bytes of buffer

| u uleb128 (variable length)

| w word (2 bytes unsigned short in hex)

| x 0xHEX value and flag (fd @ addr) (see 'd' and 'i')

| X show formatted hexpairs

| z null terminated string

| Z null terminated wide string

| ? data structure `pf ? (struct_name)example_name`

| * next char is pointer (honors asm.bits)

| + toggle show flags for each offset

| : skip 4 bytes

| . skip 1 byte

| ; rewind 4 bytes

| , rewind 1 byte

Use triple-question-mark pf??? to get some examples using print format strings.

[0x00499999]>

pf???

|pf: pf[.k[.f[=v]]|[v]]|[n]|[0|cnt][fmt] [a0 a1 ...]

| Examples:

| pf 3xi foo bar 3-array of struct, each

with named fields: 'foo' as hex, and 'bar' as int

| pf B (BitFldType)arg_name` bitfield type

| pf E (EnumType)arg_name` enum type

| pf.obj xxdz prev next size name Define the obj format as

xxdz

| pf obj=xxdz prev next size name Same as above

| pf *z*i*w nb name blob Print the pointers with

given labels

| pf iwq foo bar troll Print the iwq format with

foo, bar, troll as the respective names for the fields

| pf 0iwq foo bar troll Same as above, but

considered as a union (all fields at offset 0)

| pf.plop ? (troll)mystruct Use structure troll

previously defined

| pfj.plop @ 0x14 Apply format object at

the given offset

| pf 10xiz pointer length string Print a size 10 array of

the xiz struct with its field names

| pf 5sqw string quad word Print an array with sqw

struct along with its field names

| pf {integer}? (bifc) Print integer times the

following format (bifc)

| pf [4]w[7]i Print an array of 4 words

and then an array of 7 integers

| pf ic...?i foo bar "(pf xw yo foo)troll" yo Print nested anonymous

structures

| pf ;..x Print value located 6

bytes from current offset

| pf [10]z[3]i[10]Zb Print an fixed size str,

widechar, and var

| pfj +F @ 0x14 Print the content at

given offset with flag

| pf n2 print signed short (2

bytes) value. Use N instead of n for printing unsigned values

| pf [2]? (plop)structname @ 0 Prints an array of

structs

| pf eqew bigWord beef Swap endianness and print

with given labels

| pf.foo rr (eax)reg1 (eip)reg2 Create object referencing