All of lore.kernel.org
 help / color / mirror / Atom feed
From: libfetion@gmail.com
To: jason.wessel@windriver.com, tim.bird@am.sony.com
Cc: linux-kernel@vger.kernel.org,
	kgdb-bugreport@lists.sourceforge.net,
	Dongdong Deng <libfetion@gmail.com>
Subject: [PATCH] debug_core: Add warn message for CONFIG_DEBUG_RODATA enable
Date: Thu, 22 Sep 2011 15:50:48 +0800	[thread overview]
Message-ID: <1316677848-10193-1-git-send-email-libfetion@gmail.com> (raw)

From: Dongdong Deng <libfetion@gmail.com>

The CONFIG_DEBUG_RODATA will limit KGDB/KDB's set breakpoint function,
and CONFIG_DEBUG_RODATA and CONFIG_KGDB could survive together.

Thus most of new user of KGDB/KDB get the set_breakpoint problem
caused by CONFIG_DEBUG_RODATA, and them have to send mail to
kgdb/kdb's mail-list for help.

This patch just adds an extra printk message to warn above case,
in order to provide some useful diagnostics to kgdb/kdb user.

Signed-off-by: Dongdong Deng <libfetion@gmail.com>
---
 kernel/debug/debug_core.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
index bad6786..c2d98c1 100644
--- a/kernel/debug/debug_core.c
+++ b/kernel/debug/debug_core.c
@@ -899,6 +899,11 @@ int kgdb_register_io_module(struct kgdb_io *new_dbg_io_ops)
 	if (kgdb_break_asap)
 		kgdb_initial_breakpoint();

+#ifdef CONFIG_DEBUG_RODATA
+	printk(KERN_WARNING "kgdb: May need to disable CONFIG_DEBUG_RODATA"
+			" in order to set breakpoints.\n");
+#endif
+
 	return 0;
 }
 EXPORT_SYMBOL_GPL(kgdb_register_io_module);
--
1.7.1


             reply	other threads:[~2011-09-22  7:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-22  7:50 libfetion [this message]
2011-09-22  7:56 ` [PATCH] debug_core: Add warn message for CONFIG_DEBUG_RODATA enable Dongdong Deng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1316677848-10193-1-git-send-email-libfetion@gmail.com \
    --to=libfetion@gmail.com \
    --cc=jason.wessel@windriver.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tim.bird@am.sony.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.