Commit 8428cfe8 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds

[PATCH] kdump: add dmesg gdbmacro into document

Add gdb macro which print the kernel ring buffer into kdump docs
Signed-off-by: default avatarAkinobu Mita <mita@miraclelinux.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent beb25c6e
...@@ -177,3 +177,25 @@ document trapinfo ...@@ -177,3 +177,25 @@ document trapinfo
'trapinfo <pid>' will tell you by which trap & possibly 'trapinfo <pid>' will tell you by which trap & possibly
addresthe kernel paniced. addresthe kernel paniced.
end end
define dmesg
set $i = 0
set $end_idx = (log_end - 1) & (log_buf_len - 1)
while ($i < logged_chars)
set $idx = (log_end - 1 - logged_chars + $i) & (log_buf_len - 1)
if ($idx + 100 <= $end_idx) || \
($end_idx <= $idx && $idx + 100 < log_buf_len)
printf "%.100s", &log_buf[$idx]
set $i = $i + 100
else
printf "%c", log_buf[$idx]
set $i = $i + 1
end
end
end
document dmesg
print the kernel ring buffer
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment