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.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/gdb/linux/dmesg.py b/scripts/gdb/linux/dmesg.py
index f9b92ece7834..5afd1098e33a 100644
--- a/scripts/gdb/linux/dmesg.py
+++ b/scripts/gdb/linux/dmesg.py
@@ -23,10 +23,11 @@ class LxDmesg(gdb.Command):
23 super(LxDmesg, self).__init__("lx-dmesg", gdb.COMMAND_DATA) 23 super(LxDmesg, self).__init__("lx-dmesg", gdb.COMMAND_DATA)
24 24
25 def invoke(self, arg, from_tty): 25 def invoke(self, arg, from_tty):
26 log_buf_addr = int(str(gdb.parse_and_eval("log_buf")).split()[0], 16) 26 log_buf_addr = int(str(gdb.parse_and_eval(
27 log_first_idx = int(gdb.parse_and_eval("log_first_idx")) 27 "'printk.c'::log_buf")).split()[0], 16)
28 log_next_idx = int(gdb.parse_and_eval("log_next_idx")) 28 log_first_idx = int(gdb.parse_and_eval("'printk.c'::log_first_idx"))
29 log_buf_len = int(gdb.parse_and_eval("log_buf_len")) 29 log_next_idx = int(gdb.parse_and_eval("'printk.c'::log_next_idx"))
30 log_buf_len = int(gdb.parse_and_eval("'printk.c'::log_buf_len"))
30 31
31 inf = gdb.inferiors()[0] 32 inf = gdb.inferiors()[0]
32 start = log_buf_addr + log_first_idx 33 start = log_buf_addr + log_first_idx