diff options
Diffstat (limited to 'scripts/gdb/linux/dmesg.py')
-rw-r--r-- | scripts/gdb/linux/dmesg.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/gdb/linux/dmesg.py b/scripts/gdb/linux/dmesg.py index 7650f240ebcc..3c947f0c5dad 100644 --- a/scripts/gdb/linux/dmesg.py +++ b/scripts/gdb/linux/dmesg.py | |||
@@ -51,9 +51,10 @@ class LxDmesg(gdb.Command): | |||
51 | continue | 51 | continue |
52 | 52 | ||
53 | text_len = utils.read_u16(log_buf[pos + 10:pos + 12]) | 53 | text_len = utils.read_u16(log_buf[pos + 10:pos + 12]) |
54 | text = log_buf[pos + 16:pos + 16 + text_len] | ||
54 | time_stamp = utils.read_u64(log_buf[pos:pos + 8]) | 55 | time_stamp = utils.read_u64(log_buf[pos:pos + 8]) |
55 | 56 | ||
56 | for line in log_buf[pos + 16:pos + 16 + text_len].splitlines(): | 57 | for line in memoryview(text).tobytes().splitlines(): |
57 | gdb.write("[{time:12.6f}] {line}\n".format( | 58 | gdb.write("[{time:12.6f}] {line}\n".format( |
58 | time=time_stamp / 1000000000.0, | 59 | time=time_stamp / 1000000000.0, |
59 | line=line)) | 60 | line=line)) |