diff options
| author | Leonard Crestez <[email protected]> | 2017-07-12 21:34:16 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2017-07-12 23:26:01 +0000 |
| commit | c454756f47277b651ad41a5a163499294529e35d (patch) | |
| tree | 8df6e20f625e03d3548bdb6ee39fe26eeb67c03d /lib/fault-inject.c | |
| parent | scripts/gdb: add lx-fdtdump command (diff) | |
| download | kernel-c454756f47277b651ad41a5a163499294529e35d.tar.gz kernel-c454756f47277b651ad41a5a163499294529e35d.zip | |
scripts/gdb: lx-dmesg: cast log_buf to void* for addr fetch
In some cases it is possible for the str() conversion here to throw
encoding errors because log_buf might not point to valid ascii. For
example:
(gdb) python print str(gdb.parse_and_eval("log_buf"))
Traceback (most recent call last):
File "<string>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0303' in
position 24: ordinal not in range(128)
Avoid this by explicitly casting to (void *) inside the gdb expression.
Link: http://lkml.kernel.org/r/ba6f85dbb02ca980ebd0e2399b0649423399b565.1498481469.git.leonard.crestez@nxp.com
Signed-off-by: Leonard Crestez <[email protected]>
Reviewed-by: Jan Kiszka <[email protected]>
Cc: Jason Wessel <[email protected]>
Cc: Kieran Bingham <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/fault-inject.c')
0 files changed, 0 insertions, 0 deletions
