[PATCH] add syslog printing to xmon debugger.
Keith Owens
kaos at sgi.com
Thu Oct 28 16:30:15 EST 2004
On Fri, 22 Oct 2004 11:59:17 +1000,
Paul Mackerras <paulus at samba.org> wrote:
>Linas,
>
>> Andrew,
>>
>> Please apply at least the kernel/printk.c part of the patch,
>> if you are feeling at all charitable.
>
>Did you ever get any reaction to that?
I see that the printk.c patch was lifted straight from kdb - without
any mention of kdb. It even has the same bug as kdb, which was
corrected in kdb-v4.4-2.6.9-common-2. The current kdb patch to
printk.c is :-
Index: linux/kernel/printk.c
===================================================================
--- linux.orig/kernel/printk.c Tue Oct 19 07:55:35 2004
+++ linux/kernel/printk.c Thu Oct 21 18:06:28 2004
@@ -373,6 +373,20 @@ out:
return error;
}
+#ifdef CONFIG_KDB
+/* kdb dmesg command needs access to the syslog buffer. do_syslog() uses locks
+ * so it cannot be used during debugging. Just tell kdb where the start and
+ * end of the physical and logical logs are. This is equivalent to do_syslog(3).
+ */
+void kdb_syslog_data(char *syslog_data[4])
+{
+ syslog_data[0] = log_buf;
+ syslog_data[1] = log_buf + log_buf_len;
+ syslog_data[2] = log_buf + log_end - (logged_chars < log_buf_len ? logged_chars : log_buf_len);
+ syslog_data[3] = log_buf + log_end;
+}
+#endif /* CONFIG_KDB */
+
asmlinkage long sys_syslog(int type, char __user * buf, int len)
{
return do_syslog(type, buf, len);
More information about the Linuxppc64-dev
mailing list