Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 2.6] DEBUG_INFO, KGDB and etc...
@ 2004-01-15 19:22 Jun Sun
  2004-01-15 19:57 ` Kevin Paul Herbert
  0 siblings, 1 reply; 3+ messages in thread
From: Jun Sun @ 2004-01-15 19:22 UTC (permalink / raw)
  To: linux-mips; +Cc: jsun

[-- Attachment #1: Type: text/plain, Size: 283 bytes --]


This patch adds the missing "-g" gcc option when kgdb is configure.
Clean up some debugging related options (DEBUG_INFO really should
go under KGDB and depends its not being selected)

If no objection, will check it in later.

And yes, the good news is that kgdb works in 2.6.

Jun

[-- Attachment #2: junk1 --]
[-- Type: text/plain, Size: 2508 bytes --]

diff -Nru link/arch/mips/Makefile.orig link/arch/mips/Makefile
--- link/arch/mips/Makefile.orig	Thu Jan 15 10:55:57 2004
+++ link/arch/mips/Makefile	Thu Jan 15 10:59:19 2004
@@ -60,6 +60,7 @@
 LDFLAGS_vmlinux			+= -G 0 -static # -N
 MODFLAGS			+= -mlong-calls
 
+cflags-$(CONFIG_DEBUG_INFO)     += -g
 cflags-$(CONFIG_SB1XXX_CORELIS)	+= -mno-sched-prolog -fno-omit-frame-pointer
 
 check_warning = $(shell if $(CC) $(1) -c -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
diff -Nru link/arch/mips/Kconfig.orig link/arch/mips/Kconfig
--- link/arch/mips/Kconfig.orig	Thu Jan 15 10:55:57 2004
+++ link/arch/mips/Kconfig	Thu Jan 15 11:12:23 2004
@@ -1233,23 +1233,6 @@
 	  This allows applications to run more reliably even when the system is
 	  under load.
 
-config DEBUG_INFO
-	bool "Compile the kernel with debug info"
-	depends on DEBUG_KERNEL
-	default y if KGDB
-	help
-	  If you say Y here the resulting kernel image will include
-	  debugging info resulting in a larger kernel image.
-	  Say Y here only if you plan to use gdb to debug the kernel.
-	  If you don't debug the kernel, you can say N.
-
-config SB1XXX_CORELIS
-	bool "Corelis Debugger"
-	depends on SIBYTE_SB1xxx_SOC && DEBUG_INFO
-	help
-	  Select compile flags that produce code that can be processed by the
-	  Corelis mksym utility and UDB Emulator.
-
 config DEBUG_SPINLOCK
 	bool "Spinlock debugging"
 	depends on DEBUG_KERNEL
@@ -1471,6 +1454,7 @@
 config KGDB
 	bool "Remote GDB kernel debugging"
 	depends on DEBUG_KERNEL
+	select DEBUG_INFO
 	help
 	  If you say Y here, it will be possible to remotely debug the MIPS
 	  kernel using gdb. This enlarges your kernel image disk size by
@@ -1486,6 +1470,23 @@
 	  would like kernel messages to be formatted into GDB $O packets so
 	  that GDB prints them as program output, say 'Y'.
 
+config DEBUG_INFO
+	bool "Compile the kernel with debug info"
+	depends on DEBUG_KERNEL && !KGDB
+	default y if KGDB
+	help
+	  If you say Y here the resulting kernel image will include
+	  debugging info resulting in a larger kernel image.
+	  Say Y here only if you plan to use gdb to debug the kernel.
+	  If you don't debug the kernel, you can say N.
+
+config SB1XXX_CORELIS
+	bool "Corelis Debugger"
+	depends on SIBYTE_SB1xxx_SOC && DEBUG_INFO
+	help
+	  Select compile flags that produce code that can be processed by the
+	  Corelis mksym utility and UDB Emulator.
+
 config RUNTIME_DEBUG
 	bool "Enable run-time debugging"
 	depends on DEBUG_KERNEL

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

* Re: [PATCH 2.6] DEBUG_INFO, KGDB and etc...
  2004-01-15 19:22 [PATCH 2.6] DEBUG_INFO, KGDB and etc Jun Sun
@ 2004-01-15 19:57 ` Kevin Paul Herbert
  2004-01-15 22:09   ` Jun Sun
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Paul Herbert @ 2004-01-15 19:57 UTC (permalink / raw)
  To: Jun Sun; +Cc: linux-mips

In the top level makefile, there is already:

	ifdef CONFIG_DEBUG_INFO
	CFLAGS		+= -g
	endif

I don't see why you need to add it to arch/mips/Makefile. Your Kconfig
changes seem fine though.

Kevin

On Thu, 2004-01-15 at 11:22, Jun Sun wrote:
> This patch adds the missing "-g" gcc option when kgdb is configure.
> Clean up some debugging related options (DEBUG_INFO really should
> go under KGDB and depends its not being selected)
> 
> If no objection, will check it in later.
> 
> And yes, the good news is that kgdb works in 2.6.
> 
> Jun
-- 
Kevin Paul Herbert <kph@cisco.com>
cisco Systems, Inc.

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

* Re: [PATCH 2.6] DEBUG_INFO, KGDB and etc...
  2004-01-15 19:57 ` Kevin Paul Herbert
@ 2004-01-15 22:09   ` Jun Sun
  0 siblings, 0 replies; 3+ messages in thread
From: Jun Sun @ 2004-01-15 22:09 UTC (permalink / raw)
  To: Kevin Paul Herbert; +Cc: linux-mips, jsun

[-- Attachment #1: Type: text/plain, Size: 482 bytes --]

On Thu, Jan 15, 2004 at 11:57:35AM -0800, Kevin Paul Herbert wrote:
> In the top level makefile, there is already:
> 
> 	ifdef CONFIG_DEBUG_INFO
> 	CFLAGS		+= -g
> 	endif
> 
> I don't see why you need to add it to arch/mips/Makefile. Your Kconfig
> changes seem fine though.
> 

That is right.  Thanks for catching this.

The original problem started when KGDB did not cause "-g" to be included.
I simply looked at 2.4 and cooked the patch.  

The corrected patch is attached.

Jun

[-- Attachment #2: junk1 --]
[-- Type: text/plain, Size: 2000 bytes --]

diff -Nru link/arch/mips/Kconfig.orig link/arch/mips/Kconfig
--- link/arch/mips/Kconfig.orig	Thu Jan 15 10:55:57 2004
+++ link/arch/mips/Kconfig	Thu Jan 15 11:12:23 2004
@@ -1233,23 +1233,6 @@
 	  This allows applications to run more reliably even when the system is
 	  under load.
 
-config DEBUG_INFO
-	bool "Compile the kernel with debug info"
-	depends on DEBUG_KERNEL
-	default y if KGDB
-	help
-	  If you say Y here the resulting kernel image will include
-	  debugging info resulting in a larger kernel image.
-	  Say Y here only if you plan to use gdb to debug the kernel.
-	  If you don't debug the kernel, you can say N.
-
-config SB1XXX_CORELIS
-	bool "Corelis Debugger"
-	depends on SIBYTE_SB1xxx_SOC && DEBUG_INFO
-	help
-	  Select compile flags that produce code that can be processed by the
-	  Corelis mksym utility and UDB Emulator.
-
 config DEBUG_SPINLOCK
 	bool "Spinlock debugging"
 	depends on DEBUG_KERNEL
@@ -1471,6 +1454,7 @@
 config KGDB
 	bool "Remote GDB kernel debugging"
 	depends on DEBUG_KERNEL
+	select DEBUG_INFO
 	help
 	  If you say Y here, it will be possible to remotely debug the MIPS
 	  kernel using gdb. This enlarges your kernel image disk size by
@@ -1486,6 +1470,23 @@
 	  would like kernel messages to be formatted into GDB $O packets so
 	  that GDB prints them as program output, say 'Y'.
 
+config DEBUG_INFO
+	bool "Compile the kernel with debug info"
+	depends on DEBUG_KERNEL && !KGDB
+	default y if KGDB
+	help
+	  If you say Y here the resulting kernel image will include
+	  debugging info resulting in a larger kernel image.
+	  Say Y here only if you plan to use gdb to debug the kernel.
+	  If you don't debug the kernel, you can say N.
+
+config SB1XXX_CORELIS
+	bool "Corelis Debugger"
+	depends on SIBYTE_SB1xxx_SOC && DEBUG_INFO
+	help
+	  Select compile flags that produce code that can be processed by the
+	  Corelis mksym utility and UDB Emulator.
+
 config RUNTIME_DEBUG
 	bool "Enable run-time debugging"
 	depends on DEBUG_KERNEL

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

end of thread, other threads:[~2004-01-15 22:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-15 19:22 [PATCH 2.6] DEBUG_INFO, KGDB and etc Jun Sun
2004-01-15 19:57 ` Kevin Paul Herbert
2004-01-15 22:09   ` Jun Sun

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