From: George Anzinger <george@mvista.com>
To: Tom Rini <trini@kernel.crashing.org>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>,
Pavel Machek <pavel@suse.cz>,
amit@av.mvista.com, kgdb-bugreport@lists.sourceforge.net
Subject: Re: [Kgdb-bugreport] [KGDB PATCH][1/7] Add / use kernel/Kconfig.kgdb
Date: Fri, 27 Feb 2004 14:30:57 -0800 [thread overview]
Message-ID: <403FC521.7040508@mvista.com> (raw)
In-Reply-To: <20040227212301.GC1052@smtp.west.cox.net>
Comments below...
Tom Rini wrote:
> Hello. The following patch moves all of the config options into one file,
> kernel/Kconfig.kgdb.
>
> diff -zrupN linux-2.6.3+nothing/arch/i386/Kconfig linux-2.6.3+config+serial/arch/i386/Kconfig
> --- linux-2.6.3+nothing/arch/i386/Kconfig 2004-02-27 12:16:14.296187607 -0700
> +++ linux-2.6.3+config+serial/arch/i386/Kconfig 2004-02-27 12:16:13.707320867 -0700
> @@ -1253,36 +1253,7 @@ config DEBUG_SPINLOCK_SLEEP
> If you say Y here, various routines which may sleep will become very
> noisy if they are called with a spinlock held.
>
> -config KGDB
> - bool "KGDB: kernel debugging with remote gdb"
> - depends on DEBUG_KERNEL
> - select DEBUG_INFO
> - select FRAME_POINTER
> - help
> - If you say Y here, it will be possible to remotely debug the
> - kernel using gdb. This enlarges your kernel image disk size by
> - several megabytes and requires a machine with more than 128 MB
> - RAM to avoid excessive linking time.
> - Documentation of kernel debugger available at
> - http://kgdb.sourceforge.net
> - This is only useful for kernel hackers. If unsure, say N.
> -
> -config KGDB_THREAD
> - bool "KGDB: Thread analysis"
> - depends on KGDB
> - help
> - With thread analysis enabled, gdb can talk to kgdb stub to list
> - threads and to get stack trace for a thread. This option also enables
> - some code which helps gdb get exact status of thread. Thread analysis
> - adds some overhead to schedule and down functions. You can disable
> - this option if you do not want to compromise on speed.
> -
> -config KGDB_CONSOLE
> - bool "KGDB: Console messages through gdb"
> - depends on KGDB
> - help
> - If you say Y here, console messages will appear through gdb.
> - Other consoles such as tty or ttyS will continue to work as usual.
> +source "kernel/Kconfig.kgdb"
>
> config FRAME_POINTER
> bool "Compile the kernel with frame pointers"
> diff -zrupN linux-2.6.3+nothing/arch/ppc/Kconfig linux-2.6.3+config+serial/arch/ppc/Kconfig
> --- linux-2.6.3+nothing/arch/ppc/Kconfig 2004-02-27 12:16:14.403163398 -0700
> +++ linux-2.6.3+config+serial/arch/ppc/Kconfig 2004-02-27 12:16:13.771306387 -0700
> @@ -1170,52 +1170,7 @@ config DEBUG_SPINLOCK_SLEEP
> If you say Y here, various routines which may sleep will become very
> noisy if they are called with a spinlock held.
>
> -config KGDB
> - bool "Include kgdb kernel debugger"
> - depends on DEBUG_KERNEL
> - select DEBUG_INFO
> - select FRAME_POINTER
> - help
> - Include in-kernel hooks for kgdb, the Linux kernel source level
> - debugger. See <http://kgdb.sourceforge.net/> for more information.
> - Unless you are intending to debug the kernel, say N here.
> -
> -choice
> - prompt "Serial Port"
> - depends on KGDB
> - default KGDB_TTYS1
> -
> -config KGDB_TTYS0
> - bool "ttyS0"
> -
> -config KGDB_TTYS1
> - bool "ttyS1"
> -
> -config KGDB_TTYS2
> - bool "ttyS2"
> -
> -config KGDB_TTYS3
> - bool "ttyS3"
> -
> -endchoice
> -
> -config KGDB_THREAD
> - bool "KGDB: Thread analysis"
> - depends on KGDB
> - help
> - With thread analysis enabled, gdb can talk to kgdb stub to list
> - threads and to get stack trace for a thread. This option also enables
> - some code which helps gdb get exact status of thread. Thread analysis
> - adds some overhead to schedule and down functions. You can disable
> - this option if you do not want to compromise on speed.
> -
> -config KGDB_CONSOLE
> - bool "Enable serial console thru kgdb port"
> - depends on KGDB && 8xx || 8260
> - help
> - If you enable this, all serial console messages will be sent
> - over the gdb stub.
> - If unsure, say N.
> +source "kernel/Kconfig.kgdb"
>
> config XMON
> bool "Include xmon kernel debugger"
> diff -zrupN linux-2.6.3+nothing/arch/x86_64/Kconfig linux-2.6.3+config+serial/arch/x86_64/Kconfig
> --- linux-2.6.3+nothing/arch/x86_64/Kconfig 2004-02-27 12:16:14.350175389 -0700
> +++ linux-2.6.3+config+serial/arch/x86_64/Kconfig 2004-02-27 12:16:13.718318378 -0700
> @@ -465,37 +465,7 @@ config IOMMU_LEAK
> Add a simple leak tracer to the IOMMU code. This is useful when you
> are debugging a buggy device driver that leaks IOMMU mappings.
>
> -config KGDB
> - bool "KGDB: kernel debugging with remote gdb"
> - depends on DEBUG_KERNEL
> - select DEBUG_INFO
> - select FRAME_POINTER
> - help
> - If you say Y here, it will be possible to remotely debug the
> - kernel using gdb. This enlarges your kernel image disk size by
> - several megabytes and requires a machine with more than 128 MB
> - RAM to avoid excessive linking time.
> - Documentation of kernel debugger available at
> - http://kgdb.sourceforge.net
> - This is only useful for kernel hackers. If unsure, say N.
> -
> -config KGDB_THREAD
> - bool "KGDB: Thread analysis"
> - depends on KGDB
> - help
> - With thread analysis enabled, gdb can talk to kgdb stub to list
> - threads and to get stack trace for a thread. This option also enables
> - some code which helps gdb get exact status of thread. Thread analysis
> - adds some overhead to schedule and down functions. You can disable
> - this option if you do not want to compromise on speed.
> -
> -config KGDB_CONSOLE
> - bool "KGDB: Console messages through gdb"
> - depends on KGDB
> - help
> - If you say Y here, console messages will appear through gdb.
> - Other consoles such as tty or ttyS will continue to work as usual.
> -
> +source "kernel/Kconfig.kgdb"
> endmenu
>
> source "security/Kconfig"
> diff -zrupN linux-2.6.3+nothing/drivers/net/Kconfig linux-2.6.3+config+serial/drivers/net/Kconfig
> --- linux-2.6.3+nothing/drivers/net/Kconfig 2004-02-27 12:16:14.521136701 -0700
> +++ linux-2.6.3+config+serial/drivers/net/Kconfig 2004-02-27 12:06:22.000000000 -0700
> @@ -187,12 +187,6 @@ config NET_ETHERNET
> Note that the answer to this question won't directly affect the
> kernel: saying N will just cause the configurator to skip all
> the questions about Ethernet network cards. If unsure, say N.
> -
> -config KGDB_ETH
> - bool "KGDB: On ethernet"
> - depends on KGDB
> - help
> - Uses ethernet interface for kgdb.
>
> config MII
> tristate "Generic Media Independent Interface device support"
> diff -zrupN linux-2.6.3+nothing/drivers/serial/Kconfig linux-2.6.3+config+serial/drivers/serial/Kconfig
> --- linux-2.6.3+nothing/drivers/serial/Kconfig 2004-02-27 12:16:14.545131271 -0700
> +++ linux-2.6.3+config+serial/drivers/serial/Kconfig 2004-02-27 12:06:30.000000000 -0700
> @@ -6,34 +6,6 @@
>
> menu "Serial drivers"
>
> -config KGDB_8250
> - bool "KGDB: On generic serial port (8250)"
> - depends on KGDB
> - help
> - Uses generic serial port (8250) for kgdb. This is independent of the
> - option 9250/16550 and compatible serial port.
> -
> -config KGDB_PORT
> - hex "hex I/O port address of the debug serial port"
> - depends on KGDB_8250
> - default 3f8
> - help
> - Some systems (x86 family at this writing) allow the port
> - address to be configured. The number entered is assumed to be
> - hex, don't put 0x in front of it. The standard address are:
> - COM1 3f8 , irq 4 and COM2 2f8 irq 3. Setserial /dev/ttySx
> - will tell you what you have. It is good to test the serial
> - connection with a live system before trying to debug.
> -
> -config KGDB_IRQ
> - int "IRQ of the debug serial port"
> - depends on KGDB_8250
> - default 4
> - help
> - This is the irq for the debug port. If everything is working
> - correctly and the kernel has interrupts on a control C to the
> - port should cause a break into the kernel debug stub.
> -
> #
> # The new 8250/16550 serial drivers
> config SERIAL_8250
> diff -zrupN linux-2.6.3+nothing/kernel/Kconfig.kgdb linux-2.6.3+config+serial/kernel/Kconfig.kgdb
> --- linux-2.6.3+nothing/kernel/Kconfig.kgdb 1969-12-31 17:00:00.000000000 -0700
> +++ linux-2.6.3+config+serial/kernel/Kconfig.kgdb 2004-02-27 12:16:13.000000000 -0700
> @@ -0,0 +1,141 @@
> +config KGDB
> + bool "KGDB: kernel debugging with remote gdb"
> + depends on DEBUG_KERNEL
> + select DEBUG_INFO
> + select FRAME_POINTER
This is not needed and may not be what you want. It changes the code generated
(Heisenberg). With dwarf frames, it is no longer required or even useful.
> + # XXX: Doesn't work w/o this right now
> + select KGDB_THREAD if PPC32
> + help
> + If you say Y here, it will be possible to remotely debug the
> + kernel using gdb. This enlarges your kernel image disk size by
> + several megabytes and requires a machine with more than 128 MB
> + RAM to avoid excessive linking time.
> + Documentation of kernel debugger available at
> + http://kgdb.sourceforge.net
> + This is only useful for kernel hackers. If unsure, say N.
PLEASE, lets not use the word "hackers". Surly "coders" or some such is more
complementary. After all these are US.
> +
> +choice
> + prompt "Method for KGDB communication"
> + depends on KGDB
> + default PPC_SIMPLE_SERIAL if PPC32 && (8xx || 8260)
> + default KGDB_8250
> + help
> + There are a number of different ways in which you can communicate
> + with KGDB. The oldest is using a serial driver. A newer method
> + is to use UDP packets and a special network driver.
> +
> +config KGDB_8250
> + bool "KGDB: On generic serial port (8250)"
> + help
> + Uses generic serial port (8250) for kgdb. This is independent of the
> + option 9250/16550 and compatible serial port.
> +
> +config KGDB_ETH
> + bool "KGDB: On ethernet"
> + select NETPOLL
> + select NETPOLL_TRAP
> + select NETPOLL_RX
> + help
> + Uses ethernet interface for kgdb.
> +
> +config PPC_SIMPLE_SERIAL
> + bool "KGDB: On any serial port"
> + depends on PPC32
> + help
> + Use a very simple, and not necessarily feature complete serial
> + driver. This is the only serial option currently for MPC8xx or
> + MPC82xx based ports that do not offer an 8250-style UART.
> +
> +endchoice
> +
> +config KGDB_SIMPLE_SERIAL
> + bool "Simple selection of KGDB serial port"
> + depends on KGDB_8250 || PPC_SIMPLE_SERIAL
> + help
> + If you say Y here, you will only have to pick the baud rate
> + and serial port (ttyS) that you wish to use for KGDB. If you
> + say N, you will have provide the I/O port and IRQ number. Note
> + that if your serial ports are iomapped, then you must say Y here.
> + If in doubt, say Y.
> +
> +choice
> + depends on KGDB_8250 || PPC_SIMPLE_SERIAL
> + prompt "Debug serial port BAUD"
> + default KGDB_115200BAUD
> + help
> + Gdb and the kernel stub need to agree on the baud rate to be
> + used. Some systems (x86 family at this writing) allow this to
> + be configured.
Should this depend on the archs that can use it?
> +
> +config KGDB_9600BAUD
> + bool "9600"
> +
> +config KGDB_19200BAUD
> + bool "19200"
> +
> +config KGDB_38400BAUD
> + bool "38400"
> +
> +config KGDB_57600BAUD
> + bool "57600"
> +
> +config KGDB_115200BAUD
> + bool "115200"
> +endchoice
> +
> +choice
> + prompt "Serial port for KGDB"
> + depends on KGDB_SIMPLE_SERIAL
> + default KGDB_TTYS0
> +
> +config KGDB_TTYS0
> + bool "ttyS0"
> +
> +config KGDB_TTYS1
> + bool "ttyS1"
> +
> +config KGDB_TTYS2
> + bool "ttyS2"
> +
> +config KGDB_TTYS3
> + bool "ttyS3"
> +
> +endchoice
> +
> +config KGDB_PORT
> + hex "hex I/O port address of the debug serial port"
> + depends on !KGDB_SIMPLE_SERIAL && (KGDB_8250 || PPC_SIMPLE_SERIAL)
> + default 3f8
> + help
> + Some systems (x86 family at this writing) allow the port
> + address to be configured. The number entered is assumed to be
> + hex, don't put 0x in front of it. The standard address are:
> + COM1 3f8 , irq 4 and COM2 2f8 irq 3. Setserial /dev/ttySx
> + will tell you what you have. It is good to test the serial
> + connection with a live system before trying to debug.
> +
> +config KGDB_IRQ
> + int "IRQ of the debug serial port"
> + depends on !KGDB_SIMPLE_SERIAL && (KGDB_8250 || PPC_SIMPLE_SERIAL)
> + default 4
> + help
> + This is the irq for the debug port. If everything is working
> + correctly and the kernel has interrupts on a control C to the
> + port should cause a break into the kernel debug stub.
I think setserial will also spit this out.
> +
> +config KGDB_THREAD
> + bool "KGDB: Thread analysis"
> + depends on KGDB
> + help
> + With thread analysis enabled, gdb can talk to kgdb stub to list
> + threads and to get stack trace for a thread. This option also enables
> + some code which helps gdb get exact status of thread. Thread analysis
> + adds some overhead to schedule and down functions. You can disable
> + this option if you do not want to compromise on speed.
Lets remove the overhead and eliminate the need for this option in favor of
always having threads. Works in the mm kgdb...
> +
> +config KGDB_CONSOLE
> + bool "KGDB: Console messages through gdb"
> + depends on KGDB
> + help
> + If you say Y here, console messages will appear through gdb.
> + Other consoles such as tty or ttyS will continue to work as usual.
>
Might want to warn them of the need to connect prior to the first message from
the kernel....
--
George Anzinger george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml
next prev parent reply other threads:[~2004-02-27 22:31 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-27 21:23 [KGDB PATCH][1/7] Add / use kernel/Kconfig.kgdb Tom Rini
2004-02-27 21:25 ` [KGDB PATCH][2/7] Serial updates, take 2 Tom Rini
2004-02-27 21:32 ` [KGDB PATCH][3/7] SysRq-G Tom Rini
2004-02-27 21:40 ` [KGDB PATCH][4/7] Fix x86_64 hooks Tom Rini
2004-02-27 21:46 ` [KGDB PATCH][5/7] Fix ppc32 hooks Tom Rini
2004-02-27 21:52 ` [KGDB PATCH][6/7] KGDBOE fixes Tom Rini
2004-02-27 21:54 ` [KGDB PATCH][7/7] Move debugger_entry() Tom Rini
2004-02-27 22:53 ` [Kgdb-bugreport] " George Anzinger
2004-02-27 23:08 ` Tom Rini
2004-03-01 10:08 ` Amit S. Kale
2004-03-03 1:08 ` George Anzinger
2004-03-03 5:45 ` Amit S. Kale
2004-03-11 21:24 ` George Anzinger
2004-03-11 22:27 ` Tom Rini
2004-03-11 22:49 ` George Anzinger
2004-03-11 22:58 ` Tom Rini
2004-03-12 4:42 ` Amit S. Kale
2004-03-12 15:11 ` Tom Rini
2004-03-01 10:42 ` [KGDB PATCH][6/7] KGDBOE fixes Amit S. Kale
2004-03-01 12:31 ` [KGDB PATCH][5/7] Fix ppc32 hooks Amit S. Kale
2004-03-01 12:33 ` [KGDB PATCH][4/7] Fix x86_64 hooks Amit S. Kale
2004-02-27 22:49 ` [Kgdb-bugreport] [KGDB PATCH][3/7] SysRq-G George Anzinger
2004-03-01 10:05 ` Amit S. Kale
2004-02-27 22:44 ` [Kgdb-bugreport] [KGDB PATCH][2/7] Serial updates, take 2 George Anzinger
2004-02-27 23:11 ` Tom Rini
2004-02-27 23:53 ` George Anzinger
2004-03-01 15:28 ` Tom Rini
2004-03-02 11:36 ` Amit S. Kale
2004-03-02 15:04 ` Tom Rini
2004-02-27 22:30 ` George Anzinger [this message]
2004-02-27 22:39 ` [Kgdb-bugreport] [KGDB PATCH][1/7] Add / use kernel/Kconfig.kgdb Tom Rini
2004-02-27 23:50 ` Pavel Machek
2004-02-28 1:08 ` George Anzinger
2004-03-01 9:24 ` Amit S. Kale
2004-03-02 21:38 ` George Anzinger
2004-03-03 5:30 ` Amit S. Kale
2004-03-04 0:15 ` George Anzinger
2004-03-01 9:28 ` Amit S. Kale
2004-03-02 11:39 ` Amit S. Kale
2004-03-02 15:05 ` Tom Rini
2004-03-02 22:23 ` Pavel Machek
2004-03-02 22:34 ` Tom Rini
2004-03-02 22:35 ` Pavel Machek
2004-03-03 7:54 ` Amit S. Kale
-- strict thread matches above, loose matches on Subject: below --
2004-03-03 22:54 [Kgdb-bugreport] " Jim Houston
2004-03-03 23:52 ` George Anzinger
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=403FC521.7040508@mvista.com \
--to=george@mvista.com \
--cc=amit@av.mvista.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
--cc=trini@kernel.crashing.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox