(gdb) lx-dmesg
Python Exception
Error occurred in Python: argument 1 must be string without null bytes, not str
(gdb)
The reason of this is because the ascii string "msg" in dmesg.py get from the memory has the embedded null bytes. The fix is to replace these bytes with space or whatever you want, like this:
msg = msg.encode(encoding='utf8', errors='replace').replace('\x00', ' ')