aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorAkinobu Mita <mita@miraclelinux.com>2006-01-11 15:17:30 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 21:42:10 -0500
commit8428cfe893c1f13eb22cd879669f12b65900738f (patch)
treeaa6de3530fd1387c3929d2f10015749c7bad10d0 /Documentation
parentbeb25c6e27b21d0c0f7b9c2769fa334f1f9a8c2c (diff)
[PATCH] kdump: add dmesg gdbmacro into document
Add gdb macro which print the kernel ring buffer into kdump docs Signed-off-by: Akinobu Mita <mita@miraclelinux.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/kdump/gdbmacros.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/Documentation/kdump/gdbmacros.txt b/Documentation/kdump/gdbmacros.txt
index bc1b9eb92ae1..dcf5580380ab 100644
--- a/Documentation/kdump/gdbmacros.txt
+++ b/Documentation/kdump/gdbmacros.txt
@@ -177,3 +177,25 @@ document trapinfo
177 'trapinfo <pid>' will tell you by which trap & possibly 177 'trapinfo <pid>' will tell you by which trap & possibly
178 addresthe kernel paniced. 178 addresthe kernel paniced.
179end 179end
180
181
182define dmesg
183 set $i = 0
184 set $end_idx = (log_end - 1) & (log_buf_len - 1)
185
186 while ($i < logged_chars)
187 set $idx = (log_end - 1 - logged_chars + $i) & (log_buf_len - 1)
188
189 if ($idx + 100 <= $end_idx) || \
190 ($end_idx <= $idx && $idx + 100 < log_buf_len)
191 printf "%.100s", &log_buf[$idx]
192 set $i = $i + 100
193 else
194 printf "%c", log_buf[$idx]
195 set $i = $i + 1
196 end
197 end
198end
199document dmesg
200 print the kernel ring buffer
201end