From bb13fcbb6de6f222de97d64d3f1b87df5fff6792 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Wed, 11 Jan 2006 12:17:30 -0800 Subject: [PATCH] --- yaml --- r: 17895 b: refs/heads/master c: 8428cfe893c1f13eb22cd879669f12b65900738f h: refs/heads/master i: 17893: 551a60dc85d6498d5a458aaef4525c899275da91 17891: 526528120f4a6f2b127ceab05a0c6d411de1c0fc 17887: 805bfd611d6b9616a530830272ac64c7ca8c4b72 v: v3 --- [refs] | 2 +- trunk/Documentation/kdump/gdbmacros.txt | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 7112e96518a2..f3d4cc42e95a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: beb25c6e27b21d0c0f7b9c2769fa334f1f9a8c2c +refs/heads/master: 8428cfe893c1f13eb22cd879669f12b65900738f diff --git a/trunk/Documentation/kdump/gdbmacros.txt b/trunk/Documentation/kdump/gdbmacros.txt index bc1b9eb92ae1..dcf5580380ab 100644 --- a/trunk/Documentation/kdump/gdbmacros.txt +++ b/trunk/Documentation/kdump/gdbmacros.txt @@ -177,3 +177,25 @@ document trapinfo 'trapinfo ' will tell you by which trap & possibly addresthe kernel paniced. 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