From 0a63c58f33dbbd93338263969434d1fbd03a3ede Mon Sep 17 00:00:00 2001 From: SchumBlubBlub <6bx0lm+7siazd414punk@sharklasers.com> Date: Thu, 9 Feb 2017 13:28:43 +0000 Subject: [PATCH] Add detailed Cf? --- libr/core/cmd_meta.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/libr/core/cmd_meta.c b/libr/core/cmd_meta.c index 1654fec691..622341fe1f 100644 --- a/libr/core/cmd_meta.c +++ b/libr/core/cmd_meta.c @@ -414,8 +414,21 @@ static int cmd_meta_hsdmf(RCore *core, const char *input) { switch (input[1]) { case '?': - eprintf ("See C?\n"); - break; + switch (input[0]) { + case 'f': + r_cons_println( + "Usage: Cf[-] [sz] [fmt..] [@addr]\n\n" + "'sz' indicates the byte size taken up by struct.\n" + "'fmt' is a 'pf?' style format string. It controls only the display format.\n\n" + "You may wish to have 'sz' != sizeof(fmt) when you have a large struct\n" + "but have only identified specific fields in it. In that case, use 'fmt'\n" + "to show the fields you know about (perhaps using 'skip' fields), and 'sz'\n" + "to match the total struct size in mem.\n"); + break; + default: + eprintf ("See C?\n"); + break; + } case '-': switch (input[2]) { case '*': @@ -789,7 +802,7 @@ static int cmd_meta(void *data, const char *input) { "Cz", "[@addr]", "add zero-terminated string", "Ch", "[-] [size] [@addr]", "hide data", "Cd", "[-] [size] [repeat] [@addr]", "hexdump data array (Cd 4 10 == dword [10])", - "Cf", "[-] [sz] [0|cnt][fmt..] [@addr]", "format memory (see pf?)", + "Cf", "[?][-] [sz] [0|cnt][fmt] [a0 a1...] [@addr]", "format memory (see pf?)", "CF", "[sz] [fcn-sign..] [@addr]", "function signature", "Cm", "[-] [sz] [fmt..] [@addr]", "magic parse (see pm?)", NULL};