public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] kdump: add dmesg gdbmacro into document
@ 2006-01-06  2:33 Akinobu Mita
  2006-01-06  2:34 ` [PATCH 2/2] doc: refer to kdump in oops-tracing.txt Akinobu Mita
  0 siblings, 1 reply; 2+ messages in thread
From: Akinobu Mita @ 2006-01-06  2:33 UTC (permalink / raw)
  To: fastboot, linux-kernel

Add gdb macro which print the kernel ring buffer into kdump docs

Signed-off-by: Akinobu Mita <mita@miraclelinux.com>

--- 2.6/Documentation/kdump/gdbmacros.txt.orig	2006-01-06 10:47:06.000000000 +0900
+++ 2.6/Documentation/kdump/gdbmacros.txt	2006-01-06 10:47:46.000000000 +0900
@@ -177,3 +177,25 @@ document trapinfo
 	'trapinfo <pid>' 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 2/2] doc: refer to kdump in oops-tracing.txt
  2006-01-06  2:33 [PATCH 1/2] kdump: add dmesg gdbmacro into document Akinobu Mita
@ 2006-01-06  2:34 ` Akinobu Mita
  0 siblings, 0 replies; 2+ messages in thread
From: Akinobu Mita @ 2006-01-06  2:34 UTC (permalink / raw)
  To: fastboot, linux-kernel

Kdump has been merged and supported on several architectures.
It is better to encourage to use kdump rather than non standard
kernel crash dump patches.

Signed-off-by: Akinobu Mita <mita@miraclelinux.com>

--- 2.6/Documentation/oops-tracing.txt.orig	2006-01-06 10:55:53.000000000 +0900
+++ 2.6/Documentation/oops-tracing.txt	2006-01-06 10:58:30.000000000 +0900
@@ -41,11 +41,9 @@ the disk is not available then you have 
     run a null modem to a second machine and capture the output there
     using your favourite communication program.  Minicom works well.
 
-(3) Patch the kernel with one of the crash dump patches.  These save
-    data to a floppy disk or video rom or a swap partition.  None of
-    these are standard kernel patches so you have to find and apply
-    them yourself.  Search kernel archives for kmsgdump, lkcd and
-    oops+smram.
+(3) Use Kdump (see Documentation/kdump/kdump.txt),
+    extract the kernel ring buffer from old memory with using dmesg
+    gdbmacro in Documentation/kdump/gdbmacros.txt.
 
 
 Full Information

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-06  2:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-06  2:33 [PATCH 1/2] kdump: add dmesg gdbmacro into document Akinobu Mita
2006-01-06  2:34 ` [PATCH 2/2] doc: refer to kdump in oops-tracing.txt Akinobu Mita

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox