aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gdb/linux/dmesg.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gdb/linux/dmesg.py')
-rw-r--r--scripts/gdb/linux/dmesg.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/gdb/linux/dmesg.py b/scripts/gdb/linux/dmesg.py
index 927d0d2a3145..04d6719067f2 100644
--- a/scripts/gdb/linux/dmesg.py
+++ b/scripts/gdb/linux/dmesg.py
@@ -33,11 +33,12 @@ class LxDmesg(gdb.Command):
33 if log_first_idx < log_next_idx: 33 if log_first_idx < log_next_idx:
34 log_buf_2nd_half = -1 34 log_buf_2nd_half = -1
35 length = log_next_idx - log_first_idx 35 length = log_next_idx - log_first_idx
36 log_buf = inf.read_memory(start, length) 36 log_buf = utils.read_memoryview(inf, start, length).tobytes()
37 else: 37 else:
38 log_buf_2nd_half = log_buf_len - log_first_idx 38 log_buf_2nd_half = log_buf_len - log_first_idx
39 log_buf = inf.read_memory(start, log_buf_2nd_half) + \ 39 a = utils.read_memoryview(inf, start, log_buf_2nd_half)
40 inf.read_memory(log_buf_addr, log_next_idx) 40 b = utils.read_memoryview(inf, log_buf_addr, log_next_idx)
41 log_buf = a.tobytes() + b.tobytes()
41 42
42 pos = 0 43 pos = 0
43 while pos < log_buf.__len__(): 44 while pos < log_buf.__len__():