aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/proc.py
diff options
context:
space:
mode:
authorLeonard Crestez <leonard.crestez@nxp.com>2021-01-07 14:52:27 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-12 19:49:03 +0100
commit393681bec3ce8157b62fd028c440619065c16c41 (patch)
treefa1722237b07f23eaa4853c409b3898c16448169 /scripts/gdb/linux/proc.py
parent68ee6d808bbecf303cdcb52faa0b8f4f8433af1e (diff)
scripts/gdb: lx-dmesg: cast log_buf to void* for addr fetch
commit c454756f47277b651ad41a5a163499294529e35d upstream 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 <leonard.crestez@nxp.com> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: Jason Wessel <jason.wessel@windriver.com> Cc: Kieran Bingham <kieran@ksquared.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/proc.py')
0 files changed, 0 insertions, 0 deletions