X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=Documentation%2Fkdump%2Fgdbmacros.txt;h=9b9b454b048ad78e9745a3d12971aa0cff665fc5;hb=1b871826b3dfcdcd78140d17c00e452eec6c12a4;hp=bc1b9eb92ae129982ad34d6dbac4c61dbd58861b;hpb=a8b3e6f10f08f66ae1072efd087b30966a3654f6;p=linux-2.6-omap-h63xx.git diff --git a/Documentation/kdump/gdbmacros.txt b/Documentation/kdump/gdbmacros.txt index bc1b9eb92ae..9b9b454b048 100644 --- a/Documentation/kdump/gdbmacros.txt +++ b/Documentation/kdump/gdbmacros.txt @@ -175,5 +175,27 @@ end document trapinfo Run info threads and lookup pid of thread #1 'trapinfo ' will tell you by which trap & possibly - addresthe kernel paniced. + address the kernel panicked. +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