pf[?][.nam] [fmt] print formatted data (pf.name, pf.name $\<expr>)
Tips
-
To print stacked data types, you can use
pf. For example, usepf xxS @ esp(this will print hex value 64 bit pointer at offset esp) -
It is possible to define arrays of structures with
pf. To do this, prefix the format string with a numeric value. You can also define a name for each field of the structure by appending them as space seperated arguments list. Examplepf 2*xs pointer type @ esp(radare2 book page 58) -
Use
pfi @ offsetto print offset as signed integer
-
pf?Show this help-
Use
pfto define binary structures. Example:pf obj=xxdz prev next size name# define an obj struct (hexflag hexflag hex string)pf.obj @ <addr># apply obj struct to addrpf.# list all formats
-
-
pf fmtShow data using the given format-string. See 'pf??' and 'pf???'. pf.fmt_nameShow data using named formatpf.fmt_name.field_nameShow specific data field using named formatpfj fmt_name|fmtShow data using (named) format in JSONpf* fmt_name|fmtShow data using (named) format as r2 flag create commandspfd.fmt_nameShow data using named format as graphviz commandspf.name [0|cnt]fmtDefine a new named format-
Example is
pf.somename i. The i is for sign integers but can be any combination of format specifiers. This can then be invoked aspf.somename @ offset. This can be used to print the offset as an integer pf.List all format definitionspf?fmt_nameShow the definition of a named formatpfoList all format definition files (fdf)pfo fdf_nameLoad a Format Definition File (fdf)pf.fmt_name.field_name=33Set new value for the specified field in named formatpfv.fmt_name[.field]Print value(s) only for named format. Useful for one-linerspfs fmt_name|fmtPrint the size of (named) format in bytes
pf pf?? pf??? pf. pfj pf* pfd pfo pf? pfv pfs