From 427484a86fc75452efa784e8dbb5f81b8024b5d0 Mon Sep 17 00:00:00 2001 From: Eugene Konev Date: Sun, 6 May 2007 15:25:02 +0000 Subject: ar7: Add minimal kgdb implementation (#114). git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7109 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/ar7-2.6/files/arch/mips/ar7/prom.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'target') diff --git a/target/linux/ar7-2.6/files/arch/mips/ar7/prom.c b/target/linux/ar7-2.6/files/arch/mips/ar7/prom.c index 99b528d447..00cb4a6de3 100644 --- a/target/linux/ar7-2.6/files/arch/mips/ar7/prom.c +++ b/target/linux/ar7-2.6/files/arch/mips/ar7/prom.c @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -243,6 +244,13 @@ static void __init console_config(void) if (strstr(prom_getcmdline(), "console=")) return; +#ifdef CONFIG_KGDB + strcat(prom_getcmdline(), " console=kgdb"); + prom_printf("Please connect GDB to this port\n"); + kgdb_enabled = 1; + return; +#endif + if ((s = prom_getenv("modetty0"))) { baud = simple_strtoul(s, &p, 10); s = p; @@ -301,4 +309,16 @@ int prom_putchar(char c) return 1; } +#ifdef CONFIG_KGDB +int putDebugChar(char c) +{ + return prom_putchar(c); +} + +char getDebugChar(void) +{ + return prom_getchar(); +} +#endif + EXPORT_SYMBOL(prom_getenv); -- cgit v1.2.3