diff options
author | Howard Cochran <[email protected]> | 2013-11-01 17:53:56 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2013-11-04 14:34:43 -0300 |
commit | b30f75eba27a9ab0704cbc501e9be3b025ce56fe (patch) | |
tree | 37b19d95f7a22110ea8efe836b47cbedc6485730 /scripts/gdb | |
parent | 0970b5f438261216afcd0ccaa2fcfffc83df7ca2 (diff) |
tools lib traceevent: Handle __print_hex(__get_dynamic_array(fieldname), len)
The kernel has a few events with a format similar to this excerpt:
field:unsigned int len; offset:12; size:4; signed:0;
field:__data_loc unsigned char[] data_array; offset:16; size:4; signed:0;
print fmt: "%s", __print_hex(__get_dynamic_array(data_array), REC->len)
trace-cmd could already parse that arg correctly, but print_str_arg()
was unable to handle the first parameter being a dynamic array. (It
just printed a "field not found" warning).
Teach print_str_arg's PRINT_HEX case to handle the nested
PRINT_DYNAMIC_ARRAY correctly. The output now matches the kernel's own
formatting for this case.
Signed-off-by: Howard Cochran <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
[ Removed "polish compare", we don't do that here ]
Signed-off-by: Steven Rostedt <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'scripts/gdb')
0 files changed, 0 insertions, 0 deletions