* [PATCH] debug_core: Add warn message for CONFIG_DEBUG_RODATA enable
@ 2011-09-22 7:50 libfetion
2011-09-22 7:56 ` Dongdong Deng
0 siblings, 1 reply; 2+ messages in thread
From: libfetion @ 2011-09-22 7:50 UTC (permalink / raw)
To: jason.wessel, tim.bird; +Cc: linux-kernel, kgdb-bugreport, Dongdong Deng
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] debug_core: Add warn message for CONFIG_DEBUG_RODATA enable
2011-09-22 7:50 [PATCH] debug_core: Add warn message for CONFIG_DEBUG_RODATA enable libfetion
@ 2011-09-22 7:56 ` Dongdong Deng
0 siblings, 0 replies; 2+ messages in thread
From: Dongdong Deng @ 2011-09-22 7:56 UTC (permalink / raw)
To: Tim Bird; +Cc: linux-kernel, kgdb-bugreport, jason.wessel
On Thu, Sep 22, 2011 at 3:50 PM, <libfetion@gmail.com> wrote:
> 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
>
Hi Tim,
I am thinking about the case of KGDB, not only the KDB.
How about this patch? -- add the extra printk message to the debug_core init.
When debug_core init, and check the CONFIG_DEBUG_RODATA was enabled,
then warn the user that breakpoints will not work...
If it is OK to you, could you should Signed-off for this patch. :-)
-Dongdong
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-22 7:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-22 7:50 [PATCH] debug_core: Add warn message for CONFIG_DEBUG_RODATA enable libfetion
2011-09-22 7:56 ` Dongdong Deng
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.