From owner-kgdb@oss.sgi.com Mon Feb 26 14:59:12 2001 Received: by oss.sgi.com id ; Mon, 26 Feb 2001 14:58:53 -0800 Received: from spr2.ibd.com ([209.249.61.20]:34569 "EHLO imap.ultradevices.com") by oss.sgi.com with ESMTP id ; Mon, 26 Feb 2001 14:58:39 -0800 Received: from ultradevices.com ([38.184.255.98]) by imap.ultradevices.com (8.11.0/8.11.0) with ESMTP id f1QMuga16090 for ; Mon, 26 Feb 2001 14:56:42 -0800 Message-ID: <3A9AB529.6E7CDD20@ultradevices.com> Date: Mon, 26 Feb 2001 14:57:29 -0500 From: Manoj Ekbote Organization: Ultradevices Inc. X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.18br i686) X-Accept-Language: en MIME-Version: 1.0 To: kgdb@oss.sgi.com Subject: kgdb for 2.2.18 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing Hello all, I am running linux kernel v.2.2.18. I have applied the kgdb patch for linux kernel v.2.2.17 to the above version.But when I am building the kernel, I get the following errors: ...... ...... make[2]: Leaving directory `/usr/src/linux/arch/i386/lib' make[1]: Leaving directory `/usr/src/linux/arch/i386/lib' /usr/bin/kgcc -D__KERNEL__ -I/usr/src/linux/include -E -C -P -I/usr/src/linux/include -imacros /usr/src /linux/include/asm-i386/page_offset.h -Ui386 arch/i386/vmlinux.lds.S >arch/i386/vmlinux.lds ld -m elf_i386 -T /usr/src/linux/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o arch/i386/kerne l/init_task.o init/main.o init/version.o \ --start-group \ arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \ fs/filesystems.a \ net/network.a \ drivers/block/block.a drivers/char/char.o drivers/misc/misc.a drivers/net/net.a drivers/scsi/sc si.a drivers/cdrom/cdrom.a drivers/pci/pci.a drivers/video/video.a \ /usr/src/linux/arch/i386/lib/lib.a /usr/src/linux/lib/lib.a /usr/src/linux/arch/i386/lib/lib.a \ --end-group \ -o vmlinux init/main.o: In function `parse_options': /usr/src/linux/init/main.c:1306: undefined reference to `gdb_enter' /usr/src/linux/init/main.c:1310: undefined reference to `gdb_ttyS' /usr/src/linux/init/main.c:1314: undefined reference to `gdb_baud' init/main.o: In function `start_kernel': /usr/src/linux/init/main.c:1482: undefined reference to `gdb_enter' /usr/src/linux/init/main.c:1483: undefined reference to `gdb_hook' arch/i386/kernel/kernel.o: In function `getpacket': /usr/src/linux/arch/i386/kernel/gdbstub.c:204: undefined reference to `getDebugChar' /usr/src/linux/arch/i386/kernel/gdbstub.c:212: undefined reference to `getDebugChar' /usr/src/linux/arch/i386/kernel/gdbstub.c:221: undefined reference to `getDebugChar' /usr/src/linux/arch/i386/kernel/gdbstub.c:222: undefined reference to `getDebugChar' /usr/src/linux/arch/i386/kernel/gdbstub.c:228: undefined reference to `putDebugChar' /usr/src/linux/arch/i386/kernel/gdbstub.c:230: undefined reference to `putDebugChar' /usr/src/linux/arch/i386/kernel/gdbstub.c:233: undefined reference to `putDebugChar' /usr/src/linux/arch/i386/kernel/gdbstub.c:234: undefined reference to `putDebugChar' arch/i386/kernel/kernel.o: In function `putpacket': /usr/src/linux/arch/i386/kernel/gdbstub.c:263: undefined reference to `putDebugChar' arch/i386/kernel/kernel.o:/usr/src/linux/arch/i386/kernel/gdbstub.c:268: more undefined references to ` putDebugChar' follow arch/i386/kernel/kernel.o: In function `putpacket': /usr/src/linux/arch/i386/kernel/gdbstub.c:277: undefined reference to `getDebugChar' arch/i386/kernel/kernel.o: In function `set_debug_traps': /usr/src/linux/arch/i386/kernel/gdbstub.c:1238: undefined reference to `putDebugChar' drivers/char/char.o: In function `rs_ioctl': /usr/src/linux/drivers/char/serial.c:2181: undefined reference to `gdb_ttyS' /usr/src/linux/drivers/char/serial.c:2182: undefined reference to `gdb_baud' /usr/src/linux/drivers/char/serial.c:2183: undefined reference to `gdb_hook' make: *** [vmlinux] Error 1 What could be going wrong? TIA, manoj From owner-kgdb@oss.sgi.com Mon Feb 26 16:50:13 2001 Received: by oss.sgi.com id ; Mon, 26 Feb 2001 16:49:53 -0800 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:52760 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Mon, 26 Feb 2001 16:49:46 -0800 Received: from cthulhu.engr.sgi.com (gate3-relay.engr.sgi.com [130.62.1.234]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via ESMTP id QAA03761 for ; Mon, 26 Feb 2001 16:59:21 -0800 (PST) mail_from (sfoehner@illini.engr.sgi.com) Received: from illini.engr.sgi.com (illini.engr.sgi.com [163.154.5.81]) by cthulhu.engr.sgi.com (SGI-8.9.3/8.9.3) with ESMTP id QAA61550 for <@cthulhu.engr.sgi.com:kgdb@oss.sgi.com>; Mon, 26 Feb 2001 16:48:29 -0800 (PST) Received: (from sfoehner@localhost) by illini.engr.sgi.com (980427.SGI.8.8.8/980728.SGI.AUTOCF) id QAA39185 for kgdb@oss.sgi.com; Mon, 26 Feb 2001 16:47:59 -0800 (PST) Date: Mon, 26 Feb 2001 16:47:59 -0800 (PST) From: sfoehner@illini.engr.sgi.com (Scott Foehner) Message-Id: <10102261647.ZM111142@illini.engr.sgi.com> In-Reply-To: Manoj Ekbote "kgdb for 2.2.18" (Feb 26, 2:57pm) References: <3A9AB529.6E7CDD20@ultradevices.com> X-Mailer: Z-Mail-SGI (3.2S.3 08feb96 MediaMail) To: kgdb@oss.sgi.com Subject: Re: kgdb for 2.2.18 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing Where did you get a 2.2.17 patch? The most recent patch on the web site is for 2.2.16. I am hoping to get a 2.2.18 patch out soon. Scott On Feb 26, 2:57pm, Manoj Ekbote wrote: > I am running linux kernel v.2.2.18. > I have applied the kgdb patch for linux kernel v.2.2.17 to the above > version.But when I am > building the kernel, I get the following errors: -- Scott Foehner SGI Linux Scalability sfoehner@sgi.com 650.933.3473 From owner-kgdb@oss.sgi.com Mon Feb 26 17:11:25 2001 Received: by oss.sgi.com id ; Mon, 26 Feb 2001 17:11:15 -0800 Received: from spr2.ibd.com ([209.249.61.20]:41481 "EHLO imap.ultradevices.com") by oss.sgi.com with ESMTP id ; Mon, 26 Feb 2001 17:11:01 -0800 Received: from ultradevices.com ([38.184.255.98]) by imap.ultradevices.com (8.11.0/8.11.0) with ESMTP id f1R194a16692 for ; Mon, 26 Feb 2001 17:09:05 -0800 Message-ID: <3A9AD430.AF91AE92@ultradevices.com> Date: Mon, 26 Feb 2001 17:09:52 -0500 From: Manoj Ekbote Organization: Ultradevices Inc. X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.18br i686) X-Accept-Language: en MIME-Version: 1.0 To: kgdb@oss.sgi.com Subject: Re: kgdb for 2.2.18 References: <3A9AB529.6E7CDD20@ultradevices.com> <10102261647.ZM111142@illini.engr.sgi.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing I got it from http://www.kgdb.sourceforge.net. Scott Foehner wrote: > Where did you get a 2.2.17 patch? The most recent patch on the web site is for > 2.2.16. I am hoping to get a 2.2.18 patch out soon. > > Scott > > On Feb 26, 2:57pm, Manoj Ekbote wrote: > > > I am running linux kernel v.2.2.18. > > I have applied the kgdb patch for linux kernel v.2.2.17 to the above > > version.But when I am > > building the kernel, I get the following errors: > > -- > Scott Foehner SGI Linux Scalability sfoehner@sgi.com 650.933.3473 From owner-kgdb@oss.sgi.com Tue Feb 27 14:39:35 2001 Received: by oss.sgi.com id ; Tue, 27 Feb 2001 14:39:14 -0800 Received: from deliverator.sgi.com ([204.94.214.10]:4190 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Tue, 27 Feb 2001 14:38:48 -0800 Received: from cthulhu.engr.sgi.com (gate3-relay.engr.sgi.com [130.62.1.234]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id OAA14346 for ; Tue, 27 Feb 2001 14:37:43 -0800 (PST) mail_from (sfoehner@illini.engr.sgi.com) Received: from illini.engr.sgi.com (illini.engr.sgi.com [163.154.5.81]) by cthulhu.engr.sgi.com (SGI-8.9.3/8.9.3) with ESMTP id OAA74879 for <@cthulhu.engr.sgi.com:kgdb@oss.sgi.com>; Tue, 27 Feb 2001 14:37:31 -0800 (PST) Received: (from sfoehner@localhost) by illini.engr.sgi.com (980427.SGI.8.8.8/980728.SGI.AUTOCF) id OAA04238 for kgdb@oss.sgi.com; Tue, 27 Feb 2001 14:36:46 -0800 (PST) Date: Tue, 27 Feb 2001 14:36:46 -0800 (PST) From: sfoehner@illini.engr.sgi.com (Scott Foehner) Message-Id: <10102271436.ZM108532@illini.engr.sgi.com> X-Mailer: Z-Mail-SGI (3.2S.3 08feb96 MediaMail) To: kgdb@oss.sgi.com Subject: (Fwd) Re: kgdb for 2.2.18 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing I accidentally replied directly to Manoj instead of the mailing list yesteday. There is some useful information here regarding kgdb on the SGI web site, and what is on kgdb.sourceforge.net. Scott --- Forwarded mail from Manoj Ekbote Date: Mon, 26 Feb 2001 17:39:08 -0500 From: Manoj Ekbote To: Scott Foehner Subject: Re: kgdb for 2.2.18 Thanks for the info.I was pretty much confused by your previous mail. Manoj Scott Foehner wrote: > On Feb 26, 5:09pm, Manoj Ekbote wrote: > > Subject: Re: kgdb for 2.2.18 > > I got it from http://www.kgdb.sourceforge.net. > > Well, that patch is significantly different, so I can't speak for the problems > you are having with it. That patch is basically a back-port of the 2.4 series > patch. Note that it requires that you have SMP turned on. > > The 2.2 series patches on the SGI patches are not a back-port of the 2.4 > patches. They are simply kgdb as it stood on 2.2, plus the early-connect code > with was accepted by David Grothe into the 2.3 and later versions of kgdb. > > You can contact Amit Kale, who maintains the above web page about problems with > the patches on sourceforge. > > Also, I will hopefully have a 2.2.18 version of the SGI patch out soon, which > will work fine on kernels compiled UP. > > Scott > > -- > Scott Foehner SGI Linux Scalability sfoehner@sgi.com 650.933.3473 ---End of forwarded mail from Manoj Ekbote From owner-kgdb@oss.sgi.com Tue Feb 27 14:48:15 2001 Received: by oss.sgi.com id ; Tue, 27 Feb 2001 14:48:04 -0800 Received: from deliverator.sgi.com ([204.94.214.10]:33376 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Tue, 27 Feb 2001 14:47:52 -0800 Received: from cthulhu.engr.sgi.com (gate3-relay.engr.sgi.com [130.62.1.234]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id OAA15560 for ; Tue, 27 Feb 2001 14:46:47 -0800 (PST) mail_from (sfoehner@illini.engr.sgi.com) Received: from illini.engr.sgi.com (illini.engr.sgi.com [163.154.5.81]) by cthulhu.engr.sgi.com (SGI-8.9.3/8.9.3) with ESMTP id OAA61643 for <@cthulhu.engr.sgi.com:kgdb@oss.sgi.com>; Tue, 27 Feb 2001 14:46:34 -0800 (PST) Received: (from sfoehner@localhost) by illini.engr.sgi.com (980427.SGI.8.8.8/980728.SGI.AUTOCF) id OAA13016 for kgdb@oss.sgi.com; Tue, 27 Feb 2001 14:46:00 -0800 (PST) Date: Tue, 27 Feb 2001 14:46:00 -0800 (PST) From: sfoehner@illini.engr.sgi.com (Scott Foehner) Message-Id: <10102271446.ZM112792@illini.engr.sgi.com> In-Reply-To: Manoj Ekbote "remote debugging" (Feb 27, 2:06pm) References: <3A9BFAD1.DBC6FC13@ultradevices.com> X-Mailer: Z-Mail-SGI (3.2S.3 08feb96 MediaMail) To: kgdb@oss.sgi.com Subject: Re: remote debugging Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-kgdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kgdb-outgoing > I have applied a kgdb patch to kernel v.2.2.16.I could then build the > kernel succesfully. > > I copied the bzImage to target m/c. > On my host m/c, I run " gdb vmlinux" in /usr/src/linux directory.I have > a .gdbinit file in my home directory which contains the folllowing > lines: > > define rmt > set remotebaud 9600 > target remote /dev/ttyS0 > end > > I start the target m/c and when it asks for a gdb connection from the > host,I type "rmt" on the host m/c. > I get a message telling breakpoint () at gdb.c:702. > Next,I type "cont" at the gdb prompt.The booting process on the target > m/c resumes and finishes.On the host m/c,I don't get the gdb prompt > again.Why? The kernel will continue to run normally unless it is told to drop into the debugger. This should happen automatically if there is a fault, or the user can cause it to happen by setting a breakpoint, or simply by sending the "break" keystroke (usually ctrl-c) from the host machine. > Another question: What is the relationship between bzImage and > vmlinux?It could sound out of topic,but I would like to know the answer. Yeah, that has nothing to do with kgdb, but I can explain the basics. vmlinux is the actual OS kernel. bzImage is a compressed version of vmlinux. lilo uses bzImage. I believe this is because vmlinux is too large to fit into the boot sector. > When I do "file vmlinux", it tells me that it is an executable and > bzImage is a boot sector image.So does it mean to say that bzImage is > loaded first and then the control is passed on to vmlinux? No, bzImage is all you need on the target machine, if you are using lilo. If you are booting without lilo, you generally boot from /vmlinux. On the host machine, you need to tell kgdb to look at vmlinux for symbols and stuff. Scott -- Scott Foehner SGI Linux Scalability sfoehner@sgi.com 650.933.3473