Skip to content

Commit

Permalink
tracing: show proper address for trace-printk format
Browse files Browse the repository at this point in the history
Since the trace_printk may use pointers to the format fields
in the buffer, they are exported via debugfs/tracing/printk_formats.
This is used by utilities that read the ring buffer in binary format.
It helps the utilities map the address of the format in the binary
buffer to what the printf format looks like.

Unfortunately, the way the output code works, it exports the address
of the pointer to the format address, and not the format address
itself. This makes the file totally useless in trying to figure
out what format string a binary address belongs to.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Jul 23, 2009
1 parent 636eace commit 4c739ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/trace_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static int t_show(struct seq_file *m, void *v)
const char *str = *fmt;
int i;

seq_printf(m, "0x%lx : \"", (unsigned long)fmt);
seq_printf(m, "0x%lx : \"", *(unsigned long *)fmt);

/*
* Tabs and new lines need to be converted.
Expand Down

0 comments on commit 4c739ff

Please sign in to comment.